Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.controls.profile
Interface ProfileControl

    @ControlInterface
    public interface ProfileControl

Control to create, retrieve, and remove user and group profiles. Access to profile data is provided by ProfileWrapper objects which are obtained through this control. Additionally, a ProfileWrapper is available in every Session, regardless of whether the user is registered. To get the ProfileWrapper from the request, use ProfileControl.getProfileFromRequest().

This control is not compatible with the deprecated UserManagerControl and GroupManagerControl. Instead, use this control with the UserProviderControl and GroupProviderControl.
Security requirements: Are determined by the settings on the AtnSecurityProviderMBean.

See Also
  `ProfileWrapper`

Method Summary
`void` | `cleanupMisconfiguredGroups()` Removes misconfigured groups.
`void` | `cleanupMisconfiguredUsers()` Removes misconfigured users.
`ProfileWrapper` | `createGroupProfile(String groupname)` Create a new group profile
`ProfileWrapper` | `createUserProfile(String username)` Create a new user profile
`ProfileWrapper` | `getGroupProfile(String groupname)` Access the ProfileWrapper for the given groupname, if the group profile exists
`ProfileManager` | `getGroupProfileManager()` Returns the GroupProfileManager EJB, a stateless session bean used to access profile values.
`String[]` | `getGroupProfileNames()` Returns just the groups found in the database.
`String[]` | `getMisconfiguredGroups()` Returns the group names that have profiles, but do not exist in the realm (no group created).
`String[]` | `getMisconfiguredUsers()` Returns the usernames that have profiles, but do not exist in the realm as users.
`ProfileWrapper` | `getProfile(String username, String groupname)` Get the profile wrapper for this user, using the group profile as the successor.
`ProfileWrapper` | `getProfileFromRequest(javax.servlet.http.HttpServletRequest request)` Get the existing ProfileWrapper from the request, or return null if none exists.
`ProfileWrapper` | `getUserProfile(String username)` Access the profile wrapper for this user, if the user profile exists.
`ProfileManager` | `getUserProfileManager()` Returns the UserProfileManager EJB, a stateless session bean used to access profile values.
`String[]` | `getUserProfileNames()` Returns just the users found in the database.
`boolean` | `groupProfileExists(String groupname)` Determine whether the group profile exists
`void` | `removeGroupProfile(String groupname)` Remove this group's profile.
`void` | `removeUserProfile(String username)` Remove this user's profile.
`boolean` | `userProfileExists(String username)` Determine whether the user profile exists

Method Detail

### getProfileFromRequest

    ProfileWrapper getProfileFromRequest(javax.servlet.http.HttpServletRequest request)

  Get the existing ProfileWrapper from the request, or return null if none exists.

  Parameters
    `request` - the request object
  Returns
    an initialized ProfileWrapper

### userProfileExists

    boolean userProfileExists(String username)
                              throws P13nControlException

  Determine whether the user profile exists

  Returns
    true if exists, false if not
  Throws
    `P13nControlException`

### createUserProfile

    ProfileWrapper createUserProfile(String username)
                                     throws P13nControlException

  Create a new user profile

  Returns
    a new profile wrapper representing the profile for this user.
  Throws
    `P13nControlException`

### getUserProfile

    ProfileWrapper getUserProfile(String username)
                                  throws P13nControlException

  Access the profile wrapper for this user, if the user profile exists. No successor will be assumed. Use getProfile(username, groupname) if you want the user profile to use the group profile as its successor.

  Parameters
    `username` - the username of the profile
  Returns
    an initialized ProfileWrapper if the user profile exists, null otherwise
  Throws
    `P13nControlException` - errors are encountered accessing the user profile.

### getProfile

    ProfileWrapper getProfile(String username,
                              String groupname)
                              throws P13nControlException

  Get the profile wrapper for this user, using the group profile as the successor.

  This method assumes the profile already exists for the user and group. Neither the username nor groupname can be null.

  Parameters
    `username` - the username of the profile. Cannot be null.
    `groupname` - the groupname of the profile. Cannot be null.
  Returns
    an initialized ProfileWrapper if the user and group profiles exist, null otherwise.
  Throws
    `P13nControlException`

### removeUserProfile

    void removeUserProfile(String username)
                           throws P13nControlException

  Remove this user's profile. If profile does not exist, this method returns with no exceptions. Caller must be in the role of PortalSystemAdminstrator

  Throws
    `P13nControlException` - if caller is not in allowed role

### groupProfileExists

    boolean groupProfileExists(String groupname)
                               throws P13nControlException

  Determine whether the group profile exists

  Returns
    true if exists, false if not
  Throws
    `P13nControlException`

### createGroupProfile

    ProfileWrapper createGroupProfile(String groupname)
                                      throws P13nControlException

  Create a new group profile

  Returns
    a new profile wrapper representing the profile for this group.
  Throws
    `P13nControlException`

### getGroupProfile

    ProfileWrapper getGroupProfile(String groupname)
                                   throws P13nControlException

  Access the ProfileWrapper for the given groupname, if the group profile exists

  Parameters
    `groupname` - the groupname of the profile
  Returns
    an initialized ProfileWrapper if the group profile exists, null otherwise
  Throws
    `P13nControlException` - errors are encountered accessing the group profile

### getUserProfileManager

    ProfileManager getUserProfileManager()
                                         throws P13nControlException

  Returns the UserProfileManager EJB, a stateless session bean used to access profile values. It coordinates successor searches and mapping properties to different datasources.

  Returns
    The profile manager used for this control
  Throws
    `P13nControlException`

### getUserProfileNames

    String[] getUserProfileNames()
                                 throws P13nControlException

  Returns just the users found in the database. Caller must be in the role of PortalSystemAdminstrator

  Returns
    a list of usernames in the database
  Throws
    `P13nControlException` - if errors accessing the database, or if caller is not in allowed role

### getMisconfiguredUsers

    String[] getMisconfiguredUsers()
                                   throws P13nControlException

  Returns the usernames that have profiles, but do not exist in the realm as users. Caller must be in the role of PortalSystemAdminstrator

  Returns
    the usersnames for the users that are misconfigured
  Throws
    `P13nControlException` - if user find error, or if caller is not in allowed role

### cleanupMisconfiguredUsers

    void cleanupMisconfiguredUsers()
                                   throws P13nControlException

  Removes misconfigured users. Caller must be in the role of PortalSystemAdminstrator

  Throws
    `P13nControlException` - if errors cleaning up users, or if caller is not in allowed role

### getGroupProfileManager

    ProfileManager getGroupProfileManager()
                                          throws P13nControlException

  Returns the GroupProfileManager EJB, a stateless session bean used to access profile values. It coordinates successor searches and mapping properties to different datasources.

  Returns
    The profile manager used for this control
  Throws
    `P13nControlException`

### getGroupProfileNames

    String[] getGroupProfileNames()
                                  throws P13nControlException

  Returns just the groups found in the database. Caller must be in the role of PortalSystemAdminstrator

  Returns
    a list of groups in the database
  Throws
    `P13nControlException` - if errors accessing the database, or if caller is not in allowed role

### removeGroupProfile

    void removeGroupProfile(String groupname)
                            throws P13nControlException

  Remove this group's profile. If profile does not exist, this method returns with no exceptions. Caller must be in the role of PortalSystemAdminstrator

  Throws
    `P13nControlException` - if caller is not in allowed role

### getMisconfiguredGroups

    String[] getMisconfiguredGroups()
                                    throws P13nControlException

  Returns the group names that have profiles, but do not exist in the realm (no group created). Caller must be in the role of PortalSystemAdminstrator

  Returns
    the names for the groups that are misconfigured
  Throws
    `P13nControlException` - if user find error, or if caller is not in allowed role

### cleanupMisconfiguredGroups

    void cleanupMisconfiguredGroups()
                                    throws P13nControlException

  Removes misconfigured groups. Caller must be in the role of PortalSystemAdminstrator

  Throws
    `P13nControlException` - if errors cleaning up groups, or if caller is not in allowed role

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.