Skip navigation links

Oracle Fusion Middleware Identity Governance Framework Identity Directory Java API Reference
11g Release 1 (11.1.1)

E39432-01


oracle.igf.ids
Class User

java.lang.Object
  extended by oracle.igf.ids.Entity
      extended by oracle.igf.ids.User


public class User
extends Entity

Class holding the list of attributes of the User entity fetched using search or read methods. This User entity class also holds the UserManager handle and provides methods to modify attribute values in the repository and the methods for getting the related entities per the entity relationship definitions.


Method Summary
 void addMemberOf(Group group, ModifyOptions opts)
          Adds this user as a member to input group
 void addOwnerOf(Group group, ModifyOptions opts)
          Adds this user as owner of the given group
 void changePassword(char[] oldPassword, char[] newPassword, ModifyOptions opts)
          Changes user password given the old and new password
 User clone()
          Clones this object
 void deleteMemberOf(Group group, ModifyOptions opts)
          Deletes this user as a member to input group
 void deleteOwnerOf(Group group, ModifyOptions opts)
          Deletes this user as owner of the given group
 ResultSet<User> getManagementChain(int nLevels, SearchOptions opts)
          Gets the management chain for this user
 java.util.List<User> getManagementChain(int nLevels, java.lang.String manager, java.lang.String title, SearchOptions opts)
          Gets the management chain for this user upto the requested levels or the manager mataches the input manager or title
 ResultSet<Group> getMemberOfGroups(int nLevels, SearchFilter targetFilter, SearchOptions opts)
          Gets all the groups this user is a member of and matching the given filter criteria
 ResultSet<Group> getMemberOfGroups(SearchFilter targetFilter, SearchOptions opts)
          Gets all the groups this user is a member of and matching the given filter criteria.
 ResultSet<Group> getOwnedGroups(int nLevels, SearchFilter targetFilter, SearchOptions opts)
          Gets all the groups owned by this user matching the given filter condition
 ResultSet<User> getReportees(int nLevels, SearchFilter targetFilter, SearchOptions opts)
          Gets all the reportees of this user
 boolean isManager(User user, boolean direct, ReadOptions opts)
          Checks if the given user is manager of this user
 boolean isMemberOf(Group group, boolean direct, ReadOptions opts)
          Checks if this user is a member of the given group
 boolean isMemberOf(Group group, ReadOptions opts)
          Checks if this user is a member of the given group.
 boolean isMemberOfGroup(Group group, boolean direct, ReadOptions opts)
          Deprecated. 
 boolean isOwnerOf(Group group, boolean direct, ReadOptions opts)
          Checks if this user is owner of given group
 void resetPassword(char[] password, ModifyOptions opts)
          Resets user password
 void setManager(User user, ModifyOptions opts)
          Sets the input user as manager of this user

 

Methods inherited from class oracle.igf.ids.Entity
getAllAttributes, getAttribute, getAttributeLocaleValue, getAttributeValue, getCanonicalName, getEntityName, getGuid, getId, getName, getPrincipal, getRelatedEntities, getSubjectName, modify, setAttributeValue

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

changePassword

public void changePassword(char[] oldPassword,
                           char[] newPassword,
                           ModifyOptions opts)
                    throws AuthenticationException,
                           OperationNotSupportedException,
                           EntityNotFoundException,
                           AuthorizationException,
                           IDSException
Changes user password given the old and new password
Parameters:
oldPassword - Old password of the user
newPassword - New password of the user
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When this user is not found
OperationNotSupportedException - If the user authenticate operation is not supported
AuthenticationException - If user authentication failed
AuthorizationException - If user does not have sufficient privileges

resetPassword

public void resetPassword(char[] password,
                          ModifyOptions opts)
                   throws OperationNotSupportedException,
                          EntityNotFoundException,
                          AuthorizationException,
                          IDSException
Resets user password
Parameters:
password - User's new password
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When this user is not found
OperationNotSupportedException - If the user authenticate operation is not supported
AuthorizationException - If user does not have sufficient privileges

getManagementChain

public ResultSet<User> getManagementChain(int nLevels,
                                          SearchOptions opts)
                                   throws IDSException,
                                          EntityNotFoundException,
                                          InvalidAttributesException,
                                          AuthorizationException,
                                          OperationNotSupportedException
Gets the management chain for this user
Parameters:
nLevels - Number of levels the managers to be fetched recursively. 0 means all levels.
opts - Search options
Returns:
management chain of this user
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When this user is not found
InvalidAttributesException - If the requested attributes are invalid
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

getManagementChain

public java.util.List<User> getManagementChain(int nLevels,
                                               java.lang.String manager,
                                               java.lang.String title,
                                               SearchOptions opts)
                                        throws IDSException,
                                               EntityNotFoundException,
                                               InvalidAttributesException,
                                               AuthorizationException,
                                               OperationNotSupportedException
Gets the management chain for this user upto the requested levels or the manager mataches the input manager or title
Parameters:
nLevels - Number of levels the managers to be fetched recursively. 0 means all levels.
manager - upto this manager (principal name)
title - upto this title
opts - Search options
Returns:
managment chain of this user
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When this user is not found
InvalidAttributesException - If the requested attributes are invalid
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

isManager

public boolean isManager(User user,
                         boolean direct,
                         ReadOptions opts)
                  throws IDSException,
                         EntityNotFoundException,
                         AuthorizationException,
                         OperationNotSupportedException
Checks if the given user is manager of this user
Parameters:
user - User object
direct - if set to true checks only the direct manager, otherwise checks the entire management chain
opts - Read options
Returns:
true if the given user is manager of this user ; false otherwise
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When either of the users not found
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

setManager

public void setManager(User user,
                       ModifyOptions opts)
                throws IDSException,
                       EntityNotFoundException,
                       AuthorizationException,
                       OperationNotSupportedException
Sets the input user as manager of this user
Parameters:
user - User entity
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When either of the users not found
OperationNotSupportedException - If tthis method is not supported
AuthorizationException - If user does not have sufficient privileges

getReportees

public ResultSet<User> getReportees(int nLevels,
                                    SearchFilter targetFilter,
                                    SearchOptions opts)
                             throws IDSException,
                                    EntityNotFoundException,
                                    InvalidAttributesException,
                                    AuthorizationException,
                                    OperationNotSupportedException
Gets all the reportees of this user
Parameters:
nLevels - Number of levels the reportees to be fetched recursively. 0 means all levels
targetFilter - Filter condition to be applied on the resulting reportee entities
opts - Search options
Returns:
reportees of this user
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - When this user is not found
InvalidAttributesException - If the requested attributes or the attributes in the target search filter are invalid
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

getMemberOfGroups

public ResultSet<Group> getMemberOfGroups(SearchFilter targetFilter,
                                          SearchOptions opts)
                                   throws IDSException,
                                          EntityNotFoundException,
                                          InvalidFilterException,
                                          InvalidAttributesException,
                                          AuthorizationException,
                                          OperationNotSupportedException
Gets all the groups this user is a member of and matching the given filter criteria. Group membership is checked recursively in all the nested groups. For OPSS IdentityStore, nested group memberships are evaluated as configured in OPSS.
Parameters:
targetFilter - Filter criteria to be applied on the related entities
opts - Search options
Returns:
all the groups this user is a member of
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If the entity for which related entities to be fetched is not found
InvalidAttributesException - If the requsted attributes or the attributes in the target search filter are invalid
AuthorizationException - If user does not have sufficient privileges
InvalidFilterException
OperationNotSupportedException

getMemberOfGroups

public ResultSet<Group> getMemberOfGroups(int nLevels,
                                          SearchFilter targetFilter,
                                          SearchOptions opts)
                                   throws IDSException,
                                          EntityNotFoundException,
                                          InvalidFilterException,
                                          InvalidAttributesException,
                                          AuthorizationException,
                                          OperationNotSupportedException
Gets all the groups this user is a member of and matching the given filter criteria
Parameters:
nLevels - Number of levels to be searched for the nested relationships. 0 means all levels.
targetFilter - Filter criteria to be applied on the related entities
opts - Search options
Returns:
all the groups this user is a member of
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If the entity for which related entities to be fetched is not found
InvalidAttributesException - If the requsted attributes or the attributes in the target search filter are invalid
AuthorizationException - If user does not have sufficient privileges
InvalidFilterException
OperationNotSupportedException

isMemberOf

public boolean isMemberOf(Group group,
                          ReadOptions opts)
                   throws IDSException,
                          EntityNotFoundException,
                          AuthorizationException,
                          OperationNotSupportedException
Checks if this user is a member of the given group. Group membership is checked recursively in all the nested groups. For OPSS IdentityStore, nested group memberships are evaluated as configured in OPSS.
Parameters:
group - Group entity
opts - Read options
Returns:
true if this user is a member of the given group ; false otherwise
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If either user or group entity is not found
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

isMemberOf

public boolean isMemberOf(Group group,
                          boolean direct,
                          ReadOptions opts)
                   throws IDSException,
                          EntityNotFoundException,
                          AuthorizationException,
                          OperationNotSupportedException
Checks if this user is a member of the given group
Parameters:
group - Group entity
direct - if true checks only the direct memberhship otherwise checks all levels recursively
opts - Read options
Returns:
true if this user is a member of the given group ; false otherwise
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If either user or group entity is not found
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

isMemberOfGroup

@Deprecated
public boolean isMemberOfGroup(Group group,
                                          boolean direct,
                                          ReadOptions opts)
                        throws IDSException,
                               EntityNotFoundException,
                               OperationNotSupportedException
Deprecated. 
Throws:
IDSException
EntityNotFoundException
OperationNotSupportedException

addMemberOf

public void addMemberOf(Group group,
                        ModifyOptions opts)
                 throws IDSException,
                        EntityNotFoundException,
                        OperationNotSupportedException,
                        AuthorizationException,
                        InvalidAttributesException
Adds this user as a member to input group
Parameters:
group - Group entity
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If either user or group entity not found
OperationNotSupportedException - If add member of is not supported
AuthorizationException - If user does not have sufficient privileges
InvalidAttributesException

deleteMemberOf

public void deleteMemberOf(Group group,
                           ModifyOptions opts)
                    throws IDSException,
                           EntityNotFoundException,
                           OperationNotSupportedException,
                           AuthorizationException,
                           InvalidAttributesException
Deletes this user as a member to input group
Parameters:
group - Group entity
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If either user or group entity not found
OperationNotSupportedException - If delete member of is not supported
AuthorizationException - If user does not have sufficient privileges
InvalidAttributesException

getOwnedGroups

public ResultSet<Group> getOwnedGroups(int nLevels,
                                       SearchFilter targetFilter,
                                       SearchOptions opts)
                                throws IDSException,
                                       AuthorizationException,
                                       OperationNotSupportedException
Gets all the groups owned by this user matching the given filter condition
Parameters:
nLevels - Number of levels to be searched recursively for the group ownership. 0 means all levels.
targetFilter - Filter condition to be applied on the resulting owned groups
opts - Search options
Returns:
the groups owned by this user
Throws:
IDSException - Generic Identity Directory Service exception
AuthorizationException - If user does not have sufficient privileges
OperationNotSupportedException

isOwnerOf

public boolean isOwnerOf(Group group,
                         boolean direct,
                         ReadOptions opts)
                  throws AuthorizationException,
                         IDSException
Checks if this user is owner of given group
Parameters:
group - Group entity
direct - if true checks only the direct ownership otherwise checks all levels recursively
opts - Read options
Returns:
true if this user is owner of given group ; false otherwise
Throws:
IDSException - Generic Identity Directory Service exception
AuthorizationException - If user does not have sufficient privileges

addOwnerOf

public void addOwnerOf(Group group,
                       ModifyOptions opts)
                throws IDSException,
                       EntityNotFoundException,
                       OperationNotSupportedException,
                       AuthorizationException,
                       InvalidAttributesException
Adds this user as owner of the given group
Parameters:
group - Group entity
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If either user or group entity not found
OperationNotSupportedException - If add owner of is not supported
AuthorizationException - If user does not have sufficient privileges
InvalidAttributesException

deleteOwnerOf

public void deleteOwnerOf(Group group,
                          ModifyOptions opts)
                   throws IDSException,
                          EntityNotFoundException,
                          OperationNotSupportedException,
                          AuthorizationException,
                          InvalidAttributesException
Deletes this user as owner of the given group
Parameters:
group - Group entity
opts - Modify options
Throws:
IDSException - Generic Identity Directory Service exception
EntityNotFoundException - If either user or group entity not found
OperationNotSupportedException - If delete owner of is not supported
AuthorizationException - If user does not have sufficient privileges
InvalidAttributesException

clone

public User clone()
Clones this object
Overrides:
clone in class Entity
Returns:
copy of this object

Skip navigation links

Oracle Fusion Middleware Identity Governance Framework Identity Directory Java API Reference
11g Release 1 (11.1.1)

E39432-01


Copyright © 2013 Oracle. All Rights Reserved.