# com.bea.p13n.usermgmt.profile.taglib
CreateProfileTag Class

public class CreateProfileTag
extends `ResultTag`

Corresponds to `<profile:createProfile>`.

The `<profile:createProfile>` tag creates the profile corresponding to the provided profile key.

Along with the profile key, an explicit successor key can be specified. This successor will then be used, along with the retrieved profile, in subsequent invocations of the `<ugm:getProperty>` tag to ensure property inheritance from the successor. If no successor is retrieved, standard ConfigurableEntity successor search patterns will apply to retrieved properties.

Tag Attribute | Required | Type | Description
profileKey | yes | String | A unique identifier that can be used to retrieve the profile which is sought. Example: "`<%=username%>`"
successorKey | no | String | A unique identifier that can be used to retrieve the profile successor. Example: "`<%=defaultGroup%>`"
groupOnly | no | String | Specifies to retrieve a Group rather than a User for the default profile type. No successor will be retrieved when this value is true. Defaults to false.
profileId | no | String | A variable name from which the retrieved profile is available for the duration of the JSP's page scope.
successorId | no | String | A variable name from which the retrieved successor is available for the duration of the JSP's page scope.
scope | no | String | The HTTP scope of the retreived profile. Pass "`request`" or "`session`" as the value. Defaults to session.
result | no | String | A variable name from which the result of the operation is available. Possible Values: Success: `ProfileManagementTag.CREATE_PROFILE_OK` Errors encountered: `ProfileManagementTag.CREATE_PROFILE_NO_SUCH_USER` `ProfileManagementTag.CREATE_PROFILE_FAILED`

Hierarchy
  `Object`
  `TagSupport`
  `ProfileManagementTag`
  `ResultTag`
  `CreateProfileTag`

All Implemented Interfaces
  `IterationTag`, `Serializable`, `Tag`

## Field Summary

Fields from com.bea.p13n.usermgmt.profile.taglib`.`ResultTag``
``result``

Fields from com.bea.p13n.usermgmt.profile.taglib`.`ProfileManagementTag``
``CREATE_PROFILE_FAILED`, `CREATE_PROFILE_NO_SUCH_USER`, `CREATE_PROFILE_OK`, `GET_PROFILE_FAILED`, `GET_PROFILE_OK`, `NO_SUCH_PROFILE`, `NO_SUCH_SUCCESSOR`, `SET_PROPERTY_FAILED`, `SET_PROPERTY_OK``

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`

## Constructor Summary

CreateProfileTag()

## Method Summary

`public int` | `doStartTag`() Check to see if the profile has already been retrieved; if not, retrieve it and set it in the request or session so that it can be used by the getProperty and setProperty tags.
`public `String`` | `getGroupOnly`() Get the flag indicating to retrieve a group's profile
`public `String`` | `getProfileId`() Get the id to assign the retrieved profile to
`public `String`` | `getProfileKey`() Get the key of the profile to retrieve
`public `String`` | `getScope`() Get the scope to use (request or session)
`public `String`` | `getSuccessorId`() Get the id to assign the retrieved successor to
`public `String`` | `getSuccessorKey`() Get the key of the successor to retrieve
`public void` | `release`() Reset the tag's attributes
`public void` | `setGroupOnly`(`String` s) Set the flag indicating to retrieve a group's profile
`public void` | `setProfileId`(`String` s) Set the id to assign the retrieved profile to
`public void` | `setProfileKey`(`String` s) Set the key of the profile to retrieve
`public void` | `setScope`(`String` s) Set the scope to use (request or session)
`public void` | `setSuccessorId`(`String` s) Set the id to assign the retrieved successor to
`public void` | `setSuccessorKey`(`String` s) Set the key of the successor to retrieve

Methods from `com.bea.p13n.usermgmt.profile.taglib.`ResultTag``
``getResult`, `setResult``

Methods from `com.bea.p13n.usermgmt.profile.taglib.`ProfileManagementTag``
``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

### CreateProfileTag

    public CreateProfileTag()

## Method Detail

### doStartTag() Method

    public int doStartTag()
         throws JspException

Check to see if the profile has already been retrieved; if not, retrieve it and set it in the request or session so that it can be used by the getProperty and setProperty tags.

Overrides
  `TagSupport.doStartTag()`

#### Exceptions

``JspException``

### getGroupOnly() Method

    public String getGroupOnly()

Get the flag indicating to retrieve a group's profile

### getProfileId() Method

    public String getProfileId()

Get the id to assign the retrieved profile to

### getProfileKey() Method

    public String getProfileKey()

Get the key of the profile to retrieve

### getScope() Method

    public String getScope()

Get the scope to use (request or session)

### getSuccessorId() Method

    public String getSuccessorId()

Get the id to assign the retrieved successor to

### getSuccessorKey() Method

    public String getSuccessorKey()

Get the key of the successor to retrieve

### release() Method

    public void release()

Reset the tag's attributes

Overrides
  `ResultTag.release()`

### setGroupOnly(String) Method

    public void setGroupOnly(String s)

Set the flag indicating to retrieve a group's profile

### setProfileId(String) Method

    public void setProfileId(String s)

Set the id to assign the retrieved profile to

### setProfileKey(String) Method

    public void setProfileKey(String s)

Set the key of the profile to retrieve

### setScope(String) Method

    public void setScope(String s)

Set the scope to use (request or session)

### setSuccessorId(String) Method

    public void setSuccessorId(String s)

Set the id to assign the retrieved successor to

### setSuccessorKey(String) Method

    public void setSuccessorKey(String s)

Set the key of the successor to retrieve