CreateUserTag Class

com.bea.p13n.usermgmt.taglib
CreateUserTag Class

public class CreateUserTag

    extends ResultTag

Corresponds to <ugm:createUser>.

The <ugm:createUser> tag creates a new useer with the specified name and sets the user's password to the given password. If the saveAnonymous attribute is "true", and an AnonymousProfile exists, any properties defined in the AnonymousProfile will be set for the new user. The tag has no enclosed body.

Tag Attribute

Required

Type

Description

atnProvider

no

String

The name of the authentication provider in which the user will be created.

The default provider will be used if not specified.

Example: "<%=atnProvider%>"

username

yes

String

The name of the new user.

Example: "<%=username%>"

password

no

String

The password for the new user.

Example: "<%=password%>"

doPostProcess

no

String

Whether to do the post-user-creation process as an all-or-nothing operation. Unless the default tag attributes 'saveAnonymous', 'login', and 'fireEvent' (all are true) are overridden, ALL will be performed if 'doPostProcess' is true, and NONE will be performed if 'doPostProcess' is false.

If any of the tag attributes 'saveAnonymous', 'login', and 'fireEvent' are overridden, 'doPostProcess' is ignored, and those attributes settings take precedence.

See javadocs in com.bea.p13n.usermgmt.SessionHelper.postCreateUser() for more details on what happens during postProcessing.

Defaults to true.

Example: "false"

saveAnonymous

no

String

Whether to persist current anonymous user profile attributes in the newly-created user's profile during the post-user-creation process. Defaults to true.

Example: "false"

fireEvent

no

String

Whether to fire a UserRegistrationEvent when the user is created during the post-user-creation process. Defaults to true.

Example: "false"

login

no

String

Whether to login the user during the post-user-creation process. Defaults to true.

Example: "false"

result

yes

String

The name of an Integer variable to which the result of the create user operation is assigned.

Possible values:
Success:
UserManagerTagConstants.CREATE_USER_OK

Error Encountered:
UserManagerTagConstants.CREATE_USER_FAILED

A user with the specified username already exists:
UserManagerTagConstants.USER_EXISTS


Hierarchy
Object
  TagSupport
    UserManagementTag
      ResultTag
        CreateUserTag
All Implemented Interfaces

IterationTag, Serializable, Tag, UserManagementTagConstants

Field Summary

   
Fields from  com.bea.p13n.usermgmt.taglib.ResultTag
result
 
Fields from  javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields from interface com.bea.p13n.usermgmt.taglib.UserManagementTagConstants
ADD_GROUP_FAILED, ADD_GROUP_OK, ADD_USER_FAILED, ADD_USER_OK, CREATE_GROUP_FAILED, CREATE_GROUP_OK, CREATE_USER_FAILED, CREATE_USER_OK, DEFAULT_SEARCH_EXP, DEFAULT_USER_LIMIT, GET_PROFILE_FAILED, GET_PROFILE_OK, GROUP_CHANGE_FAILED, GROUP_CHANGE_OK, GROUP_EXISTS, LOGIN_ERROR, LOGIN_FAILED, LOGIN_OK, NO_SUCH_PROFILE, NO_SUCH_SUCCESSOR, REMOVE_GROUP_FAILED, REMOVE_GROUP_OK, REMOVE_USER_FAILED, REMOVE_USER_OK, RESERVED_GROUP_NAME, RESERVED_USER_NAME, SET_PASSWORD_FAILED, SET_PASSWORD_OK, SET_PROPERTY_FAILED, SET_PROPERTY_OK, USER_EXISTS, USER_LIMIT_EXCEEDED, USER_SEARCH_FAILED, USER_SEARCH_OK
 

Constructor Summary

CreateUserTag()

 

Method Summary

public int
doStartTag()
Create a User through the UserManager session bean, and optionally transfer properties from an AnonymousProfile to the new User.
public String
getAtnProvider()
Get the name of the authentication provider
public String
getDoPostProcess()
Get the flag to do the post-user-creation process.
public String
getFireEvent()
Get the flag to fire a UserRegistrationEvent
public String
getLogin()
Get the flag to do the login during post-user-creation process.
public String
getPassword()
Get the password of the new user
public String
getSaveAnonymous()
Get the flag to transfer the AnonymousProfile to the new user
public String
getUsername()
Get the name of the new user
public void
release()
Reset all tag attributes
public void
setAtnProvider(String atnProvider)
Set the name of the authentication provider
public void
setDoPostProcess(String s)
Set the flag to do the post-user-creation process.
public void
setFireEvent(String s)
Set the flag to fire a UserRegistrationEvent
public void
setLogin(String s)
Set the flag to do the login during post-user-creation process.
public void
setPassword(String s)
Set the password of the new user
public void
setSaveAnonymous(String s)
Set the flag to transfer the AnonymousProfile to the new user
public void
setUsername(String s)
Set the name of the new user
 
Methods from  com.bea.p13n.usermgmt.taglib.ResultTag
getResult, setResult
 
Methods from  com.bea.p13n.usermgmt.taglib.UserManagementTag
getAtnManagerProxy, release
 
Methods from  javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
 
Methods from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

CreateUserTag

public CreateUserTag()
 

Method Detail

doStartTag() Method

public int doStartTag()
throws JspException
Create a User through the UserManager session bean, and optionally transfer properties from an AnonymousProfile to the new User.

Overrides
TagSupport.doStartTag()

Exceptions

JspException

getAtnProvider() Method

public String getAtnProvider()
Get the name of the authentication provider


getDoPostProcess() Method

public String getDoPostProcess()
Get the flag to do the post-user-creation process.


getFireEvent() Method

public String getFireEvent()
Get the flag to fire a UserRegistrationEvent


getLogin() Method

public String getLogin()
Get the flag to do the login during post-user-creation process.


getPassword() Method

public String getPassword()
Get the password of the new user


getSaveAnonymous() Method

public String getSaveAnonymous()
Get the flag to transfer the AnonymousProfile to the new user


getUsername() Method

public String getUsername()
Get the name of the new user


release() Method

public void release()
Reset all tag attributes

Overrides
ResultTag.release()

setAtnProvider(String) Method

public void setAtnProvider(String atnProvider)
Set the name of the authentication provider


setDoPostProcess(String) Method

public void setDoPostProcess(String s)
Set the flag to do the post-user-creation process.


setFireEvent(String) Method

public void setFireEvent(String s)
Set the flag to fire a UserRegistrationEvent


setLogin(String) Method

public void setLogin(String s)
Set the flag to do the login during post-user-creation process.


setPassword(String) Method

public void setPassword(String s)
Set the password of the new user


setSaveAnonymous(String) Method

public void setSaveAnonymous(String s)
Set the flag to transfer the AnonymousProfile to the new user


setUsername(String) Method

public void setUsername(String s)
Set the name of the new user