public abstract class CustomGroupManager extends GroupManager
| Constructor and Description |
|---|
CustomGroupManager(IdentityDirectory ids,
java.lang.String entityName)
This is the constructor any custom GroupManager must use to get
the GroupManager object instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareEntityAttr(java.security.Principal principal,
java.lang.String attrname,
char[] attrvalue)
This method can be implemented to provide a
functionality to compared the attribute value for a
particular attribute name.
|
boolean |
compareEntityAttr(java.security.Principal principal,
java.lang.String attrname,
java.lang.String attrvalue)
This method can be implemented to provide a
functionality to compared the attribute value for a
particular attribute name.
|
java.security.Principal |
createGroup(java.util.List<Attribute> attrVals,
CreateOptions opts)
This method should be implemented by any custom
GroupManager implementations to create group in the
repository with given list of attribute values
|
void |
deleteGroup(java.security.Principal principal,
DeleteOptions opts)
This method should be implemented by any custom
GroupManager implementations to deletes the group from
the repository for given user principal.
|
void |
deleteGroup(java.lang.String id,
DeleteOptions opts)
This method should be implemented by any custom
GroupManager implementations to delete the group from the
repository for a given id attribute value
|
void |
deleteGroup(java.lang.String attrName,
java.lang.String attrVal,
DeleteOptions opts)
This method should be implemented by any custom
GroupManagaer implementations to deletes the group from
the repository for the given unique attribute name and value.
|
AttributeDef |
getAttributeDef(java.lang.String attrName)
Gets attribute definition for a given attribute name.
|
AttributeRef |
getAttributeRef(java.lang.String attrName)
Gets entity attribute reference for given attribute name.
|
EntityCapabilities |
getCapabilities()
This method is used to get the capabilities for any group
to run the following operations - Create, Read, Update ,
Delete.
|
java.util.List<java.lang.String> |
getEntityAttributes()
Get entity attributes from entity definition
Return default attributes unless modified
using the custom IdentityDirectory
implementation.
|
EntityDef |
getEntityDef()
Returns the entity definition.
|
java.util.List<EntityRelationship> |
getEntityRelationships()
Gets all entity relationships where current entity is part of the entity
relationship definition
|
java.lang.String |
getGlobalCommonIdAttribute(java.lang.String entityName)
This method can be implemented to get the
global common id attribute name configured in the
entity definition, as required.
|
Group |
getGroup(java.security.Principal principal,
ReadOptions opts)
This method should be implemented by any custom
GroupManager implementations to get the group for the
given principal identifier
|
java.lang.String |
getIdAttribute()
This method can be implemented to get the
id attribute corresponding to a given entityName.
|
void |
modify(java.security.Principal principal,
java.util.List<ModAttribute> attrVals,
ModifyOptions opts)
This method can be implemented to provide a
functionality to modify the attributes of a group, identified
by the Principal cast object of the group.
|
void |
modify(java.lang.String id,
java.util.List<ModAttribute> attrVals,
ModifyOptions opts)
This method can be implemented to provide a
functionality to modify the attributes of a group, identified
by an id.
|
void |
modify(java.lang.String attrName,
java.lang.String attrVal,
java.util.List<ModAttribute> attrVals,
ModifyOptions opts)
This method can be implemented to provide a
functionality to modify the attributes of a group, identified
by an attribute value matching an attribute name
|
void |
rename(java.security.Principal principal,
java.lang.String newName,
java.lang.String newContainer,
ModifyOptions opts)
This method can be implemented to provide a
functionality to rename a group, identified by the Principal
cast object of the group.
|
Group |
searchGroup(java.lang.String id,
ReadOptions opts)
This method should be implemented by any custom
GroupManager implementations to search for group matching
given id attribute value that uniquely identifies the user
|
Group |
searchGroup(java.lang.String attrName,
java.lang.String attrVal,
ReadOptions opts)
This method should be implemented by any custom
GroupManager implementations to find a group matching
given attribute name and value
|
Group |
searchGroupByGuid(java.lang.String guid,
ReadOptions opts)
This method should be implemented by any custom
GroupManager implementations to search for a group
matching given GUID value that uniquely identifies the group
|
ResultSet<Group> |
searchGroups(SearchFilter filter,
SearchOptions opts)
This method should be implemented by any custom
GroupManager implementations to search the repository and
returns list of group matching the given filter condition
.Pagesize, Sorting and other options can be specified in the
search options.
|
public CustomGroupManager(IdentityDirectory ids, java.lang.String entityName)
ids - Is the IdentityDirectory object which uses the custom Group
Manager implementationentityName - Is the entityName with which this custom GroupManager
implementation is related.public java.security.Principal createGroup(java.util.List<Attribute> attrVals, CreateOptions opts) throws IDSException, EntityAlreadyExistsException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
createGroup in class GroupManagerattrVals - List of attribute valuesopts - Create operation optionsIDSException - Generic Identity Directory Service exceptionEntityAlreadyExistsException - When the group to be created already existsOperationNotSupportedException - If the group create operation is not supportedInvalidAttributesException - When the add attributes list is invalidAuthorizationException - If user does not have sufficient privilegespublic Group getGroup(java.security.Principal principal, ReadOptions opts) throws EntityNotFoundException, IDSException, AuthorizationException, InvalidAttributesException
getGroup in class GroupManagerprincipal - Principal identifier of the groupopts - Read operation optionsEntityNotFoundException - When there is no group in the repository for given group principalIDSException - Generic Identity Directory Service exceptionInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic Group searchGroup(java.lang.String id, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, AuthorizationException, InvalidAttributesException
searchGroup in class GroupManagerid - Value of the group's id attributeopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When there is no group found for given ID valueEntityNotUniqueException - When the given filter condition does not uniquely identify the groupInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic Group searchGroup(java.lang.String attrName, java.lang.String attrVal, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, InvalidFilterException, AuthorizationException, InvalidAttributesException
searchGroup in class GroupManagerattrName - Name of the attributeattrVal - Attribute valueopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no group found for given search filterEntityNotUniqueException - When the given filter condition does not uniquely identify the groupInvalidFilterException - If the attribute is invalid filter attributeInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic Group searchGroupByGuid(java.lang.String guid, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, AuthorizationException, InvalidAttributesException
searchGroupByGuid in class GroupManagerguid - guid value of groupopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When there is no group found for given GUID valueEntityNotUniqueException - When the given GUID values does not uniquely identify the groupInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic ResultSet<Group> searchGroups(SearchFilter filter, SearchOptions opts) throws IDSException, InvalidFilterException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
searchGroups in class GroupManagerfilter - Search filteropts - Search operation optionsIDSException - Generic Identity Directory Service exceptionInvalidFilterException - When the input search filter is not validOperationNotSupportedException - When this user search operation is not supportedInvalidAttributesException - When the requested attributes or the attributes in the search
filter are invalidAuthorizationException - If user does not have sufficient privilegespublic void deleteGroup(java.security.Principal principal,
DeleteOptions opts)
throws EntityNotFoundException,
IDSException,
AuthorizationException,
OperationNotSupportedException
deleteGroup in class GroupManagerprincipal - Group principalopts - Delete operation optionsEntityNotFoundException - When there is no group in the repository for given group principalIDSException - Generic Identity Directory Service exceptionOperationNotSupportedException - If the group delete operation is not supportedAuthorizationException - If user does not have sufficient privilegespublic void deleteGroup(java.lang.String id,
DeleteOptions opts)
throws EntityNotFoundException,
IDSException,
AuthorizationException,
OperationNotSupportedException
deleteGroup in class GroupManagerid - id valueopts - Delete operation optionsEntityNotFoundException - When there is no group in the repository for given id valueIDSException - Generic Identity Directory Service exceptionOperationNotSupportedException - If the group delete operation is not supportedAuthorizationException - If user does not have sufficient privilegespublic void deleteGroup(java.lang.String attrName,
java.lang.String attrVal,
DeleteOptions opts)
throws EntityNotFoundException,
IDSException,
AuthorizationException,
OperationNotSupportedException
deleteGroup in class GroupManagerattrName - Name of the attributeattrVal - Attribute valueopts - Delete operation optionsEntityNotFoundException - When there is no group in the repository for given group principalIDSException - Generic Identity Directory Service exceptionOperationNotSupportedException - If the group delete operation is not supportedAuthorizationException - If user does not have sufficient privilegespublic EntityCapabilities getCapabilities()
getCapabilities in class GroupManagerpublic EntityDef getEntityDef()
getEntityDef in class AbstractEntityManagerpublic java.util.List<java.lang.String> getEntityAttributes()
getEntityAttributes in class AbstractEntityManagerpublic AttributeDef getAttributeDef(java.lang.String attrName)
getAttributeDef in class AbstractEntityManagerattrName - Name of the attributepublic AttributeRef getAttributeRef(java.lang.String attrName)
getAttributeRef in class AbstractEntityManagerattrName - Name of the attributepublic java.util.List<EntityRelationship> getEntityRelationships()
getEntityRelationships in class AbstractEntityManagerpublic java.lang.String getIdAttribute()
getIdAttribute in class AbstractEntityManagerpublic java.lang.String getGlobalCommonIdAttribute(java.lang.String entityName)
getGlobalCommonIdAttribute in class AbstractEntityManagerpublic boolean compareEntityAttr(java.security.Principal principal,
java.lang.String attrname,
java.lang.String attrvalue)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException
compareEntityAttr in class AbstractEntityManagerprincipal - Is a Principal object cast of the group on which
the compare operation is run.attrname - Is the name of the attribute to compare.attrvalue - Is the value of the attribute to be compared.IDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueOperationNotSupportedException - If the user authenticate operation is not supportedpublic boolean compareEntityAttr(java.security.Principal principal,
java.lang.String attrname,
char[] attrvalue)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException
compareEntityAttr in class AbstractEntityManagerprincipal - Is a Principal object cast of the group on which
the compare operation is run.attrname - Is the name of the attribute to compare.attrvalue - Is the value of the attribute to be compared.IDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueOperationNotSupportedException - If the user authenticate operation is not supportedpublic void modify(java.lang.String id,
java.util.List<ModAttribute> attrVals,
ModifyOptions opts)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthorizationException,
InvalidAttributesException
modify in class AbstractEntityManagerid - Is the id of the group for which the attributes have
to be modified.attrVals - Is a list of ModAttribute objects specifying the
values of the attributes to be modified.opts - Is a ModifyOptions object that can be used to specify
the options related to this modify command.IDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When the entity to be modified is not foundOperationNotSupportedException - When this entity modify operation is not supportedInvalidAttributesException - When the mod attributes are invalidAuthorizationException - If user does not have sufficient privilegespublic void modify(java.security.Principal principal,
java.util.List<ModAttribute> attrVals,
ModifyOptions opts)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthorizationException,
InvalidAttributesException
modify in class AbstractEntityManagerprincipal - Is the Principal cast object of the group for which
the attributes have to be modified.attrVals - Is a list of ModAttribute objects specifying the
values of the attributes to be modified.opts - Is a ModifyOptions object that can be used to specify
the options related to this modify command,IDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When the entity to be modified is not foundOperationNotSupportedException - When this entity modify operation is not supportedInvalidAttributesException - When the mod attributes are invalidAuthorizationException - If user does not have sufficient privilegespublic void modify(java.lang.String attrName,
java.lang.String attrVal,
java.util.List<ModAttribute> attrVals,
ModifyOptions opts)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthorizationException,
InvalidAttributesException
modify in class AbstractEntityManagerattrName - Is the name of the attribute used for matching.attrVal - Is the value used for matching the attribute given
as attrName.attrVals - Is a list of ModAttribute objects specifying the
values of the attributes to be modified.opts - Is a ModifyOptions object that can be used to specify
the options related to this modify command.IDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When the entity to be modified is not foundOperationNotSupportedException - When this entity modify operation is not supportedInvalidAttributesException - When the mod attributes are invalidAuthorizationException - If user does not have sufficient privilegespublic void rename(java.security.Principal principal,
java.lang.String newName,
java.lang.String newContainer,
ModifyOptions opts)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthorizationException,
InvalidAttributesException
rename in class AbstractEntityManagerprincipal - Is the Principal cast object of the group to rename.newName - Is the new name of the group, to be set.newContainer - Is the new Container of the group, to be set.opts - Is a ModifyOptions object that can be used to specify
the options related to this modify command.IDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When the entity to be modified is not foundOperationNotSupportedException - When this entity modify operation is not supportedInvalidAttributesException - When the mod attributes are invalidAuthorizationException - If user does not have sufficient privileges