com.ibm.portal.um
Interface PumaLocator


public interface PumaLocator

The PumaLocator provides functions to lookup com.ibm.portal.um.User,com.ibm.portal.um.Group objects.
An instance of this Interface can be retrieved by calling com.ibm.portal.um.PumaHome, com.ibm.portal.um.portletservice.PumaHome or com.ibm.portal.um.portletservice.legacy.PumaHome

Since:
5.1.0.1
See Also:
PumaHome, PumaHome, PumaHome

Method Summary
 Group findGroupByIdentifier(java.lang.String aIdentifier)
          Returns the Group object referenced by the identifier (DN) within the user repository.
 Group findGroupByObjectID(ObjectID aId)
          Returns the Group object referenced by the given ObjectID.
If no group is found a PumaModelException is thrown
 java.util.List<Group> findGroupsByAttribute(java.lang.String aAttribute, java.lang.String aValue)
          Returns a List of Group where the attributes defined in the LDAP server matches the value of the given attribute.
 java.util.List<Group> findGroupsByDefaultAttribute(java.lang.String aValue)
          Returns Group by comparing the provided value to the default attribute type configured for the Group type For a LIKE comparision only the multi-character wild card is supported and the character used is '*'.
 java.util.List<Group> findGroupsByDefaultAttribute(java.lang.String aValue, boolean aSorted)
          Returns Group by comparing the provided value to the default attribute type configured for the Group type For a LIKE comparision only the multi-character wild card is supported and the character used is '*'.
 java.util.List<Group> findGroupsByPrincipal(Principal aPrincipal, boolean aNested)
          Returns the Groups where the given Principal is member of.
 java.util.List<Group> findGroupsByQuery(java.lang.String aQuery)
          Returns a List of Group representing the resultset of the provided Query.
 java.util.List<Group> findGroupsByQuery(java.lang.String aQuery, SortControl aControl)
          Returns a List of Group representing the resultset of the provided Query.
 java.util.List<Principal> findMembersByGroup(Group aGroup, boolean aNested)
          Returns the mebers for a given Group.
 User findUserByIdentifier(java.lang.String aIdentifier)
          Returns the User object referenced by the given identifier.
 User findUserByObjectID(ObjectID aId)
          Returns the User object referenced by the given ObjectID.
If no user is found a PumaModelException is thrown
 java.util.List<User> findUsersByAttribute(java.lang.String aAttribute, java.lang.String aValue)
          Returns a List of User where the attribute defined in the LDAP server matches the given value.
 java.util.List<User> findUsersByAttributeRecursively(User user, java.lang.String attribute, int depth)
          Returns a List of Principals that are linked by the given attribute.
 java.util.List<User> findUsersByDefaultAttribute(java.lang.String aValue)
          Returns User by comparing the provided value to the default attribute type configured for the User type.
 java.util.List<User> findUsersByDefaultAttribute(java.lang.String aValue, boolean aSorted)
          Returns User by comparing the provided value to the default attribute type configured for the User type.
 java.util.List<User> findUsersByQuery(java.lang.String aQuery)
          Returns a List of User representing the resultset of the provided Query.
 java.util.List<User> findUsersByQuery(java.lang.String aQuery, SortControl aControl)
          Returns a List of User representing the resultset of the provided Query.
 java.util.List<Group> searchGroupByName(java.lang.String name)
          Returns a list of Groups that have a name that matches the given name.
 java.util.List<User> searchUserByName(java.lang.String aName)
          Returns a list of Users that have a name that matches the given name.
 

Method Detail

findUserByIdentifier

User findUserByIdentifier(java.lang.String aIdentifier)
                          throws PumaSystemException,
                                 PumaModelException,
                                 PumaMissingAccessRightsException
Returns the User object referenced by the given identifier. The identifier is String refers to the String provided by WSCredential.getUniqueSecurityName() or by PumaProfile.getIdentifier(Principal).
If no user is found a PumaModelException is thrown
The character encoding used as input for the identifier must match the encoding acceptable by the user store

Parameters:
aIdentifier - a unique Identifier of a User object within the User Repository
Returns:
The User object available by the given identifier
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if no User could be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

findUserByObjectID

User findUserByObjectID(ObjectID aId)
                        throws PumaSystemException,
                               PumaModelException,
                               PumaMissingAccessRightsException
Returns the User object referenced by the given ObjectID.
If no user is found a PumaModelException is thrown

Parameters:
aId - WebSphere Portal Identifier of a User
Returns:
The User object available by the given ObjectID
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if no User could be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

findGroupByObjectID

Group findGroupByObjectID(ObjectID aId)
                          throws PumaSystemException,
                                 PumaModelException,
                                 PumaMissingAccessRightsException
Returns the Group object referenced by the given ObjectID.
If no group is found a PumaModelException is thrown

Parameters:
aId - WebSphere Portal Identifier of a Group
Returns:
The Group object available by the given ObjectID
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if no Group could be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

findGroupByIdentifier

Group findGroupByIdentifier(java.lang.String aIdentifier)
                            throws PumaSystemException,
                                   PumaModelException,
                                   PumaMissingAccessRightsException
Returns the Group object referenced by the identifier (DN) within the user repository. If no group is found a PumaModelException is thrown
The character encoding used as input for the identifier must match the encoding acceptable by the user store

Parameters:
aIdentifier - a unique Identifier of a Group object within the Repository
Returns:
The Group object available by the given identifier
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if no Group could be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

findUsersByDefaultAttribute

java.util.List<User> findUsersByDefaultAttribute(java.lang.String aValue)
                                                 throws PumaSystemException,
                                                        PumaAttributeException,
                                                        PumaMissingAccessRightsException
Returns User by comparing the provided value to the default attribute type configured for the User type. For a LIKE comparision only the multi-character wild card is supported and the character used is '*'. The '*' can appear in the value any number of times and at any place. Any '*' character part of the value must be escaped using the backslash ('\') character.
The character encoding used as input for attribute key must match the encoding acceptable by the user store

Parameters:
aValue - NULL is not allowed as input
Returns:
List read-only List containing User. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
See Also:
User, List

findUsersByDefaultAttribute

java.util.List<User> findUsersByDefaultAttribute(java.lang.String aValue,
                                                 boolean aSorted)
                                                 throws PumaSystemException,
                                                        PumaAttributeException,
                                                        PumaMissingAccessRightsException
Returns User by comparing the provided value to the default attribute type configured for the User type. For a LIKE comparision only the multi-character wild card is supported and the character used is '*'. The '*' can appear in the value any number of times and at any place. Any '*' character part of the value must be escaped using the backslash ('\') character.
The character encoding used as input for attribute key must match the encoding acceptable by the user store

Parameters:
aValue - NULL is not allowed as input
aSorted - defines if the result should be sorted. if true the result will be sorted ascending based on the defaultattribute.
Returns:
List read-only List containing User. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
Since:
6.1
See Also:
User, List

findGroupsByDefaultAttribute

java.util.List<Group> findGroupsByDefaultAttribute(java.lang.String aValue)
                                                   throws PumaSystemException,
                                                          PumaMissingAccessRightsException
Returns Group by comparing the provided value to the default attribute type configured for the Group type For a LIKE comparision only the multi-character wild card is supported and the character used is '*'. The '*' can appear in the value any number of times and at any place. Any '*' character part of the value must be escaped using the backslash ('\') character.
The character encoding used as input for attribute key must match the encoding acceptable by the user store

Parameters:
aValue - NULL is not allowed as input
Returns:
List read-only List containing com.ibm.portal.um.Group. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
See Also:
Group, List

findGroupsByDefaultAttribute

java.util.List<Group> findGroupsByDefaultAttribute(java.lang.String aValue,
                                                   boolean aSorted)
                                                   throws PumaSystemException,
                                                          PumaAttributeException,
                                                          PumaMissingAccessRightsException
Returns Group by comparing the provided value to the default attribute type configured for the Group type For a LIKE comparision only the multi-character wild card is supported and the character used is '*'. The '*' can appear in the value any number of times and at any place. Any '*' character part of the value must be escaped using the backslash ('\') character.
The character encoding used as input for attribute key must match the encoding acceptable by the user store

Parameters:
aValue - NULL is not allowed as input
aSorted - defines if the result should be sorted. if true the result will be sorted ascending based on the defaultattribute.
Returns:
List read-only List containing com.ibm.portal.um.Group. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
See Also:
Group, List

findUsersByAttribute

java.util.List<User> findUsersByAttribute(java.lang.String aAttribute,
                                          java.lang.String aValue)
                                          throws PumaSystemException,
                                                 PumaAttributeException,
                                                 PumaMissingAccessRightsException
Returns a List of User where the attribute defined in the LDAP server matches the given value. Only attributes of type can be used for this search. For a LIKE comparision only the multi-character wild card is supported and the character used is '*'. The '*' can appear in the value any number of times and at any place. Any '*' character part of the value must be escaped using the backslash ('\') character.
The character encoding used as input for attribute key and value must match the encoding acceptable by the user store

Parameters:
aAttribute - User attribute of type where the value is stored in
aValue - Value to compare with
Returns:
List read-only List containing com.ibm.portal.um.User. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
See Also:
User, List

findGroupsByAttribute

java.util.List<Group> findGroupsByAttribute(java.lang.String aAttribute,
                                            java.lang.String aValue)
                                            throws PumaSystemException,
                                                   PumaAttributeException,
                                                   PumaMissingAccessRightsException
Returns a List of Group where the attributes defined in the LDAP server matches the value of the given attribute. The two values will be checked based on a LIKE pattern. Only attributes of type can be used for this search.
For a LIKE comparision only the multi-character wild card is supported and the character used is '*'. The '*' can appear in the value any number of times and at any place. Any '*' character part of the value must be escaped using the backslash ('\') character. The character encoding used as input for attribute key and value must match the encoding acceptable by the user store

Parameters:
aAttribute - Group attribute of type where the value is stored in
aValue - the Value to compare with
Returns:
List read-only List containing com.ibm.portal.um.Group. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
See Also:
Group, List

findMembersByGroup

java.util.List<Principal> findMembersByGroup(Group aGroup,
                                             boolean aNested)
                                             throws PumaSystemException,
                                                    PumaModelException,
                                                    PumaMissingAccessRightsException
Returns the mebers for a given Group. It is possible to retrieve the flat members or nested members of the given group based on the Nested flag
Calls for Nested membership might take long, bacause of the potentinal large amount of groups

Parameters:
aGroup - Group to get Member for. null is not allowed as input parameter
aNested - if set to true nested members will be returned. if set to false only the first hirarchy level will be returned
Returns:
List read-only List containing com.ibm.portal.um.Principal. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
PumaModelException
See Also:
Principal, List

findGroupsByPrincipal

java.util.List<Group> findGroupsByPrincipal(Principal aPrincipal,
                                            boolean aNested)
                                            throws PumaSystemException,
                                                   PumaModelException,
                                                   PumaMissingAccessRightsException
Returns the Groups where the given Principal is member of. Dependent on the aNested attribute either the first level of membership or all nested memberships are returned.
Note that virtual groups that the Principal is member of - like the one returned by PumaEnvironment#getAllAuthenticatedUserGroup() - are not included in the result list.
Calls for Nested membership might take long, bacause of the potential large amount of groups

Parameters:
aPrincipal - the Principal to get its membership, null is not allowed as input parameter
aNested - if set to true nested members will be returned. if set to false only the first hirarchy level will be returned
Returns:
List read-only List containing com.ibm.portal.um.Group. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
PumaModelException
See Also:
Group, List

findUsersByQuery

java.util.List<User> findUsersByQuery(java.lang.String aQuery)
                                      throws PumaSystemException,
                                             PumaAttributeException,
                                             PumaMissingAccessRightsException
Returns a List of User representing the resultset of the provided Query. The query is based on the XPath query language

Parameters:
aQuery - aXpath defines the Query
Returns:
List read-only List containing com.ibm.portal.um.User. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
Since:
6.1
See Also:
User, List

findGroupsByQuery

java.util.List<Group> findGroupsByQuery(java.lang.String aQuery)
                                        throws PumaSystemException,
                                               PumaAttributeException,
                                               PumaMissingAccessRightsException
Returns a List of Group representing the resultset of the provided Query. The query is based on the XPath query language

Parameters:
aQuery - aXpath defines the Query
Returns:
List read-only List containing com.ibm.portal.um.Group. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
Since:
6.1
See Also:
User, List

findUsersByQuery

java.util.List<User> findUsersByQuery(java.lang.String aQuery,
                                      SortControl aControl)
                                      throws PumaSystemException,
                                             PumaAttributeException,
                                             PumaMissingAccessRightsException
Returns a List of User representing the resultset of the provided Query. The query is based on the XPath query language

Parameters:
aQuery - aXpath defines the Query
aControl - defines how the result set should be sorted
Returns:
List read-only List containing com.ibm.portal.um.User. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
Since:
6.1
See Also:
User, List

findGroupsByQuery

java.util.List<Group> findGroupsByQuery(java.lang.String aQuery,
                                        SortControl aControl)
                                        throws PumaSystemException,
                                               PumaAttributeException,
                                               PumaMissingAccessRightsException
Returns a List of Group representing the resultset of the provided Query. The query is based on the XPath query language

Parameters:
aQuery - aXpath defines the Query
aControl - defines how the result set should be sorted
Returns:
List read-only List containing com.ibm.portal.um.Group. If nothing is found an empty java.util.List will be returned
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaAttributeException - will be thrown if attributes are not defined
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
Since:
6.1
See Also:
User, List

searchUserByName

java.util.List<User> searchUserByName(java.lang.String aName)
                                      throws PumaSystemException,
                                             PumaModelException,
                                             PumaMissingAccessRightsException
Returns a list of Users that have a name that matches the given name. The query used for finding the users considers those attributes that are typically used as name and matches their values against the given name.

Parameters:
name - defines the string to be used in the query
Returns:
List of User objects
Throws:
PumaSystemException
PumaModelException
PumaMissingAccessRightsException
Since:
6.1

searchGroupByName

java.util.List<Group> searchGroupByName(java.lang.String name)
                                        throws PumaSystemException,
                                               PumaModelException,
                                               PumaMissingAccessRightsException
Returns a list of Groups that have a name that matches the given name. The query used for finding the groups considers those attributes that are typically used as name and matches their values against the given name.

Parameters:
name - defines the string to be used in the query
Returns:
List of Group objects
Throws:
PumaSystemException
PumaModelException
PumaMissingAccessRightsException
Since:
6.1

findUsersByAttributeRecursively

java.util.List<User> findUsersByAttributeRecursively(User user,
                                                     java.lang.String attribute,
                                                     int depth)
                                                     throws PumaSystemException,
                                                            PumaAttributeException,
                                                            PumaMissingAccessRightsException,
                                                            MemberNotFoundException
Returns a List of Principals that are linked by the given attribute. This method can only be applied on an attribute of the type AttributeDefinition.MEMBERDN. The (n+1)th user in the list is identified by the value of the given attribute of the nth user. If the given attribute is multi-valued, only the first value is considered. The computation will stop either at the first principal where the attribute is null or at the level where the current User does not have the necessary permissions or at the given depth.

Parameters:
user - start point to fetch all dependent principals, null is not allowed as input parameter
attribute - the attribute to look at
depth - the maximum size of the list to be returned; use -1 for "unrestricted"
Returns:
a List containing the chain of principals available form the given user
Throws:
PumaSystemException
PumaAttributeException
PumaMissingAccessRightsException
MemberNotFoundException - - if the user referred to by parameter aUser is not available
Since:
6.1