public class User extends Entity
Modifier and Type | Method and Description |
---|---|
void |
addManagerOf(Group group, ModifyOptions opts)
Adds this user as manager of the given group
|
void |
addMemberOf(Group group, ModifyOptions opts)
Adds this user as a member to input group
|
void |
addMemberOf(java.util.List<java.security.Principal> groups, ModifyOptions opts)
Adds this user as a member to list of groups
|
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 |
deleteManagerOf(Group group, ModifyOptions opts)
Deletes this user as manager of the given group
|
void |
deleteMemberOf(Group group, ModifyOptions opts)
Deletes this user as a member to input group
|
void |
deleteMemberOf(java.util.List<java.security.Principal> groups, ModifyOptions opts)
Deletes this user as a member from list of groups
|
void |
deleteOwnerOf(Group group, ModifyOptions opts)
Deletes this user as owner of the given group
|
java.lang.String |
getChallengeAns()
Returns User challengeAns
|
java.lang.String |
getChallengeQn()
Returns User challengeQn
|
java.lang.String |
getFirstname()
Returns User firstname
|
java.lang.String |
getLastname()
Returns User lastname
|
ResultSet<Group> |
getManagedGroups(int nLevels, SearchFilter targetFilter, SearchOptions opts)
Gets all the groups managed by this user matching the given filter condition
|
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 |
isManagerOf(Group group, boolean direct, ReadOptions opts)
Checks if this user is manager of given group
|
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
|
getAllAttributes, getAttribute, getAttributeLocaleValue, getAttributeLocaleValues, getAttributeValue, getCanonicalName, getCommonId, getDescription, getDisplayname, getEntityName, getGuid, getId, getMail, getName, getObjectClasses, getPrincipal, getRelatedEntities, getSubjectName, modify, setAttributeValue
public void changePassword(char[] oldPassword, char[] newPassword, ModifyOptions opts) throws AuthenticationException, OperationNotSupportedException, EntityNotFoundException, AuthorizationException, PasswordPolicyException, IDSException
oldPassword
- Old password of the usernewPassword
- New password of the useropts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When this user is not foundOperationNotSupportedException
- If the user authenticate operation is not supportedAuthenticationException
- If user authentication failedPasswordPolicyException
- If there are any password policy errorsAuthorizationException
- If user does not have sufficient privilegespublic void resetPassword(char[] password, ModifyOptions opts) throws OperationNotSupportedException, EntityNotFoundException, AuthorizationException, PasswordPolicyException, IDSException
password
- User's new passwordopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When this user is not foundOperationNotSupportedException
- If the user authenticate operation is not supportedPasswordPolicyException
- If there are any password policy errorsAuthorizationException
- If user does not have sufficient privilegespublic ResultSet<User> getManagementChain(int nLevels, SearchOptions opts) throws IDSException, EntityNotFoundException, InvalidAttributesException, AuthorizationException, OperationNotSupportedException
nLevels
- Number of levels the managers to be fetched recursively. 0 means all levels.opts
- Search optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When this user is not foundInvalidAttributesException
- If the requested attributes are invalidAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public java.util.List<User> getManagementChain(int nLevels, java.lang.String manager, java.lang.String title, SearchOptions opts) throws IDSException, EntityNotFoundException, InvalidAttributesException, AuthorizationException, OperationNotSupportedException
nLevels
- Number of levels the managers to be fetched recursively. 0 means all levels.manager
- upto this manager (principal name)title
- upto this titleopts
- Search optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When this user is not foundInvalidAttributesException
- If the requested attributes are invalidAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public boolean isManager(User user, boolean direct, ReadOptions opts) throws IDSException, EntityNotFoundException, AuthorizationException, OperationNotSupportedException
user
- User objectdirect
- if set to true checks only the direct manager, otherwise checks the entire management chainopts
- Read optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When either of the users not foundAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public void setManager(User user, ModifyOptions opts) throws IDSException, EntityNotFoundException, AuthorizationException, OperationNotSupportedException
user
- User entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When either of the users not foundOperationNotSupportedException
- If tthis method is not supportedAuthorizationException
- If user does not have sufficient privilegespublic ResultSet<User> getReportees(int nLevels, SearchFilter targetFilter, SearchOptions opts) throws IDSException, EntityNotFoundException, InvalidAttributesException, AuthorizationException, OperationNotSupportedException
nLevels
- Number of levels the reportees to be fetched recursively. 0 means all levelstargetFilter
- Filter condition to be applied on the resulting reportee entitiesopts
- Search optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- When this user is not foundInvalidAttributesException
- If the requested attributes or the attributes in the target search filter are invalidAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public ResultSet<Group> getMemberOfGroups(SearchFilter targetFilter, SearchOptions opts) throws IDSException, EntityNotFoundException, InvalidFilterException, InvalidAttributesException, AuthorizationException, OperationNotSupportedException
targetFilter
- Filter criteria to be applied on the related entitiesopts
- Search optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If the entity for which related entities to be fetched is not foundInvalidAttributesException
- If the requsted attributes or the attributes in the target search filter are invalidAuthorizationException
- If user does not have sufficient privilegesInvalidFilterException
OperationNotSupportedException
public ResultSet<Group> getMemberOfGroups(int nLevels, SearchFilter targetFilter, SearchOptions opts) throws IDSException, EntityNotFoundException, InvalidFilterException, InvalidAttributesException, AuthorizationException, OperationNotSupportedException
nLevels
- Number of levels to be searched for the nested relationships. 0 means all levels.targetFilter
- Filter criteria to be applied on the related entitiesopts
- Search optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If the entity for which related entities to be fetched is not foundInvalidAttributesException
- If the requsted attributes or the attributes in the target search filter are invalidAuthorizationException
- If user does not have sufficient privilegesInvalidFilterException
OperationNotSupportedException
public boolean isMemberOf(Group group, ReadOptions opts) throws IDSException, EntityNotFoundException, AuthorizationException, OperationNotSupportedException
group
- Group entityopts
- Read optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity is not foundAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public boolean isMemberOf(Group group, boolean direct, ReadOptions opts) throws IDSException, EntityNotFoundException, AuthorizationException, OperationNotSupportedException
group
- Group entitydirect
- if true checks only the direct memberhship otherwise checks all levels recursivelyopts
- Read optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity is not foundAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
@Deprecated public boolean isMemberOfGroup(Group group, boolean direct, ReadOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException
public void addMemberOf(Group group, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If add member of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public void addMemberOf(java.util.List<java.security.Principal> groups, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- List of Group principalsopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If add member of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public void deleteMemberOf(Group group, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If delete member of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public void deleteMemberOf(java.util.List<java.security.Principal> groups, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If delete member of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public ResultSet<Group> getOwnedGroups(int nLevels, SearchFilter targetFilter, SearchOptions opts) throws IDSException, AuthorizationException, OperationNotSupportedException
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 groupsopts
- Search optionsIDSException
- Generic Identity Directory Service exceptionAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public boolean isOwnerOf(Group group, boolean direct, ReadOptions opts) throws AuthorizationException, IDSException
group
- Group entitydirect
- if true checks only the direct ownership otherwise checks all levels recursivelyopts
- Read optionsIDSException
- Generic Identity Directory Service exceptionAuthorizationException
- If user does not have sufficient privilegespublic void addOwnerOf(Group group, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If add owner of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public void deleteOwnerOf(Group group, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If delete owner of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public ResultSet<Group> getManagedGroups(int nLevels, SearchFilter targetFilter, SearchOptions opts) throws IDSException, AuthorizationException, OperationNotSupportedException
nLevels
- Number of levels to be searched recursively for the group manager. 0 means all levels.targetFilter
- Filter condition to be applied on the resulting managed groupsopts
- Search optionsIDSException
- Generic Identity Directory Service exceptionAuthorizationException
- If user does not have sufficient privilegesOperationNotSupportedException
public boolean isManagerOf(Group group, boolean direct, ReadOptions opts) throws AuthorizationException, IDSException
group
- Group entitydirect
- if true checks only the direct manager otherwise checks all levels recursivelyopts
- Read optionsIDSException
- Generic Identity Directory Service exceptionAuthorizationException
- If user does not have sufficient privilegespublic void addManagerOf(Group group, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If add manager of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public void deleteManagerOf(Group group, ModifyOptions opts) throws IDSException, EntityNotFoundException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
group
- Group entityopts
- Modify optionsIDSException
- Generic Identity Directory Service exceptionEntityNotFoundException
- If either user or group entity not foundOperationNotSupportedException
- If delete manager of is not supportedAuthorizationException
- If user does not have sufficient privilegesInvalidAttributesException
public java.lang.String getFirstname() throws OperationNotSupportedException
OperationNotSupportedException
- If firstnameAttr not configured in Entity definitionpublic java.lang.String getLastname() throws OperationNotSupportedException
OperationNotSupportedException
- If lastnameAttr not configured in Entity definitionpublic java.lang.String getChallengeQn() throws OperationNotSupportedException
OperationNotSupportedException
- If challengeQnAttr not configured in Entity definitionpublic java.lang.String getChallengeAns() throws OperationNotSupportedException
OperationNotSupportedException
- If challengeAnsAttr not configured in Entity definition