DEPRECATED com.bea.portal is only useful in the compatibility domain. For the new portal framework please use the classes under the com.bea.netuix package

# com.bea.portal.admin.ejb
VisitorUserManager Interface

public interface VisitorUserManager
extends `EJBObject`

Handles all visitor-user admin functionality.

All Superinterfaces
  `EJBObject`, `Remote`

## Method Summary

`public void` | `addUserToGroup`(`ProfileIdentity` user, `GroupPortal` groupPortal) Admin adds an end user to a user group
`public boolean` | `canAdminManageUser`(`ProfileIdentity` user, `ProfileIdentity` admin, `PortalIdentifier` portalId, `List` groupPortals) Checks if an admin can manage a particular visitor user - returns true if admin is a System Admin or - if admin is a PA or GA - they have exclusive rights to manage that user
`public `ProfileWrapper`` | `createUser`(`ProfileIdentity` user, `String` password, `String` profileType, `GroupPortal` groupPortal) Create a visitor user and add to the given group portal's user group
`public `ProfileWrapper`` | `createUser`(`ProfileIdentity` user, `String` password, `GroupPortal` groupPortal) Create a visitor user and add to the given group portal's user group
`public `List`` | `getAllVisitorUserGroups`() Retrieve all visitor user groups Filters out existing group portal users.
`public `List`` | `getGroupPortalEligibleVisitorUsers`(`GroupPortal` groupPortal, `String` searchExpression, int limit) Retrieve all visitor users with the intention of adding them to a group portal.
`public `ProfileWrapper`` | `getGroupProfile`(`GroupPortal` groupPortal) Retrieve Profile for a user
`public `List`` | `getUsernamesForVisitorUserGroup`(`GroupPortal` groupPortal, `String` searchExpression, int limit) Retrieve the users for a given user group
`public `List`` | `getUsernamesForVisitorUserGroupSubGroups`(`GroupPortal` groupPortal, `String` groupName, `String` searchExpression, int limit) Retrieve the users for a given user group sub groups
`public `ProfileWrapper`` | `getUserProfile`(`ProfileIdentity` user, `GroupPortal` groupPortal, `PortalIdentifier` portalId, `List` groupPortals) Retrieve Profile for a user
`public `List`` | `getVisitorUserGroupNamesForUser`(`ProfileIdentity` user) Retrieve the group names for a given user
`public boolean` | `isWritableRealm`() Checks if the underlying user realm is writable or not
`public void` | `removeUser`(`ProfileIdentity` user, `GroupPortal` groupPortal, `PortalIdentifier` portalId, `List` groupPortals) Removes an end user
`public void` | `removeUserFromGroup`(`ProfileIdentity` user, `GroupPortal` groupPortal) Admin removes an end user from a user group
`public void` | `setPassword`(`ProfileIdentity` user, `String` password, `GroupPortal` groupPortal, `PortalIdentifier` portalId, `List` groupPortals) Set an end user password

Methods from interface `javax.ejb.`EJBObject``
`getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

## Method Detail

### addUserToGroup(ProfileIdentity, GroupPortal) Method

    public void addUserToGroup(ProfileIdentity user,
                               GroupPortal groupPortal)
         throws RealmNotWritableAddException, RemoteException

Admin adds an end user to a user group

#### Parameters

user
  the User to add

groupPortal
  the GroupPortal to receive the user

#### Exceptions

``RealmNotWritableAddException``
  thrown if the underlying realm is not writable (ie. LDAP)
``RemoteException``
  because of EJB contract

### canAdminManageUser(ProfileIdentity, ProfileIdentity, PortalIdentifier, List) Method

    public boolean canAdminManageUser(ProfileIdentity user,
                                      ProfileIdentity admin,
                                      PortalIdentifier portalId,
                                      List groupPortals)
         throws RemoteException

Checks if an admin can manage a particular visitor user - returns true if admin is a System Admin or - if admin is a PA or GA - they have exclusive rights to manage that user

#### Parameters

user
  the visitor user

admin
  the admin user

portalId
  the portal

groupPortals
  ALL of the portal's contained group portals (must use ARM.getAllGroupPortals())

#### Returns

true if admin can manage the user

#### Exceptions

``RemoteException``
  because of EJB contract

### createUser(ProfileIdentity, String, String, GroupPortal) Method

    public ProfileWrapper createUser(ProfileIdentity user,
                                     String password,
                                     String profileType,
                                     GroupPortal groupPortal)
         throws UserAlreadyExistsException, InvalidUsernameException, InvalidPasswordException, RealmNotWritableAddException, RemoteException

Create a visitor user and add to the given group portal's user group

#### Parameters

user
  the user to create

password
  the user's password

profileType
  the user's profile type

groupPortal
  the group portal - used to verify the admin has User Mgmt access

#### Returns

ProfileWrapper

#### Exceptions

``UserAlreadyExistsException``
  if the user already exists
``InvalidUsernameException``
``InvalidPasswordException``
  if the password is invalid
``RealmNotWritableAddException``
  thrown if the underlying realm is not writable (ie. LDAP)
``RemoteException``
  because of EJB contract

### createUser(ProfileIdentity, String, GroupPortal) Method

    public ProfileWrapper createUser(ProfileIdentity user,
                                     String password,
                                     GroupPortal groupPortal)
         throws UserAlreadyExistsException, InvalidUsernameException, InvalidPasswordException, RealmNotWritableAddException, RemoteException

Create a visitor user and add to the given group portal's user group

#### Parameters

user
  the user to create

password
  the user's password

groupPortal
  the group portal - used to verify the admin has User Mgmt access

#### Returns

ProfileWrapper

#### Exceptions

``UserAlreadyExistsException``
  if the user already exists
``InvalidUsernameException``
``InvalidPasswordException``
  if the password is invalid
``RealmNotWritableAddException``
  thrown if the underlying realm is not writable (ie. LDAP)
``RemoteException``
  because of EJB contract

### getAllVisitorUserGroups() Method

    public List getAllVisitorUserGroups()
         throws RemoteException

Retrieve all visitor user groups Filters out existing group portal users.

#### Returns

List of user groups (Strings)

#### Exceptions

``RemoteException``
  because of EJB contract

### getGroupPortalEligibleVisitorUsers(GroupPortal, String, int) Method

    public List getGroupPortalEligibleVisitorUsers(GroupPortal groupPortal,
                                                   String searchExpression,
                                                   int limit)
         throws RemoteException

Retrieve all visitor users with the intention of adding them to a group portal. Filters out existing group portal users.

#### Parameters

groupPortal
  the group portal to filter users for

searchExpression
  "*" wildcard is supported

limit
  limit of number of users to return

#### Returns

List of usernames (Strings)

#### Exceptions

``RemoteException``
  because of EJB contract

### getGroupProfile(GroupPortal) Method

    public ProfileWrapper getGroupProfile(GroupPortal groupPortal)
         throws ProfileNotFoundException, PrincipalNotExclusivelyManagedByAdminException, RemoteException

Retrieve Profile for a user

#### Parameters

groupPortal
  the group portal - used to verify the admin has User Mgmt access Note: All subsequent setProperty calls must occur on ProfileWrapper

#### Returns

ProfileWrapper

#### Exceptions

``ProfileNotFoundException``
  if the profile is not found
``PrincipalNotExclusivelyManagedByAdminException``
  thrown if the user is part of another Portal or Group Portal that the admin does not have access to
``RemoteException``
  because of EJB contract

### getUsernamesForVisitorUserGroup(GroupPortal, String, int) Method

    public List getUsernamesForVisitorUserGroup(GroupPortal groupPortal,
                                                String searchExpression,
                                                int limit)
         throws RemoteException

Retrieve the users for a given user group

#### Parameters

groupPortal
  the user Group Identifier (String)

searchExpression
  "*" wildcard is supported

limit
  limit of number of users to return

#### Returns

List of usernames (Strings) in this group

#### Exceptions

``RemoteException``
  because of EJB contract

### getUsernamesForVisitorUserGroupSubGroups(GroupPortal, String, String, int) Method

    public List getUsernamesForVisitorUserGroupSubGroups(GroupPortal groupPortal,
                                                         String groupName,
                                                         String searchExpression,
                                                         int limit)
         throws RemoteException

Retrieve the users for a given user group sub groups

#### Parameters

groupPortal
  the group portal that the user group belongs to

groupName
  the user Group Identifier (String)

searchExpression
  "*" wildcard is supported

limit
  limit of number of users to return

#### Returns

List of usernames (Strings) in this group

#### Exceptions

``RemoteException``
  because of EJB contract

### getUserProfile(ProfileIdentity, GroupPortal, PortalIdentifier, List) Method

    public ProfileWrapper getUserProfile(ProfileIdentity user,
                                         GroupPortal groupPortal,
                                         PortalIdentifier portalId,
                                         List groupPortals)
         throws ProfileNotFoundException, PrincipalNotExclusivelyManagedByAdminException, RemoteException

Retrieve Profile for a user

#### Parameters

user
  the User

groupPortal
  the group portal - used to verify the admin has User Mgmt access

portalId
  the PortalIdentifier of the Portal to ensure that the user is exclusively managed

groupPortals
  all Group Portals for the Portal to remove Note: All subsequent setProperty calls must occur on ProfileWrapper

#### Returns

ProfileWrapper

#### Exceptions

``ProfileNotFoundException``
  if the profile is not found
``PrincipalNotExclusivelyManagedByAdminException``
  thrown if the user is part of another Portal or Group Portal that the admin does not have access to
``RemoteException``
  because of EJB contract

### getVisitorUserGroupNamesForUser(ProfileIdentity) Method

    public List getVisitorUserGroupNamesForUser(ProfileIdentity user)
         throws RemoteException

Retrieve the group names for a given user

#### Parameters

user
  the user

#### Returns

List of groupnames (Strings) in this user

#### Exceptions

``RemoteException``
  because of EJB contract

### isWritableRealm() Method

    public boolean isWritableRealm()
         throws RemoteException

Checks if the underlying user realm is writable or not

#### Returns

true if realm is writable

#### Exceptions

``RemoteException``

### removeUser(ProfileIdentity, GroupPortal, PortalIdentifier, List) Method

    public void removeUser(ProfileIdentity user,
                           GroupPortal groupPortal,
                           PortalIdentifier portalId,
                           List groupPortals)
         throws PrincipalNotExclusivelyManagedByAdminException, RealmNotWritableRemoveException, RemoteException

Removes an end user

#### Parameters

user
  the User to remove

groupPortal
  the group portal - used to verify the admin has User Mgmt access

portalId
  the PortalIdentifier of the Portal to remove any PA associations

groupPortals
  all Group Portals for the Portal to remove any GA associations

#### Exceptions

``PrincipalNotExclusivelyManagedByAdminException``
  thrown if the user is part of another Portal or Group Portal that the admin does not have access to
``RealmNotWritableRemoveException``
  thrown if the underlying realm is not writable (ie. LDAP)
``RemoteException``
  because of EJB contract

### removeUserFromGroup(ProfileIdentity, GroupPortal) Method

    public void removeUserFromGroup(ProfileIdentity user,
                                    GroupPortal groupPortal)
         throws RealmNotWritableRemoveException, RemoteException

Admin removes an end user from a user group

#### Parameters

user
  the User to remove

groupPortal
  the Group to remove the User from

#### Exceptions

``RealmNotWritableRemoveException``
  thrown if the underlying realm is not writable (ie. LDAP)
``RemoteException``
  because of EJB contract

### setPassword(ProfileIdentity, String, GroupPortal, PortalIdentifier, List) Method

    public void setPassword(ProfileIdentity user,
                            String password,
                            GroupPortal groupPortal,
                            PortalIdentifier portalId,
                            List groupPortals)
         throws PrincipalNotExclusivelyManagedByAdminException, InvalidPasswordException, RealmNotWritableAddException, RemoteException

Set an end user password

#### Parameters

user
  the User

password
  the password

groupPortal
  the group portal - used to verify the admin has User Mgmt access

portalId
  the PortalIdentifier of the Portal to remove any PA associations

groupPortals
  all Group Portals for the Portal to remove any GA associations

#### Exceptions

``PrincipalNotExclusivelyManagedByAdminException``
  thrown if the user is part of another Portal or Group Portal
``InvalidPasswordException``
  if the password is invalid
``RealmNotWritableAddException``
  thrown if the underlying realm is not writable (ie. LDAP)
``RemoteException``
  because of EJB contract