public interface IdentityManager extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
add(IdentityType identityType)
Adds the given
IdentityType instance to the configured identity store. |
void |
add(Relationship relationship)
Adds the given
Relationship instance to the configured identity store. |
void |
addToGroup(Agent agent,
Group group)
|
<T extends IdentityType> |
createIdentityQuery(Class<T> identityType)
Creates an
IdentityQuery that can be used to query for IdentityType instances. |
<T extends Relationship> |
createRelationshipQuery(Class<T> relationshipType)
Creates an
RelationshipQuery that can be used to query for Relationship instances. |
Agent |
getAgent(String loginName)
Returns an
Agent with the given loginName. |
Group |
getGroup(String groupPath)
Returns the
Group with the specified groupPath. |
Group |
getGroup(String groupName,
Group parent)
|
Role |
getRole(String name)
Returns an
Role with the given name. |
User |
getUser(String loginName)
Returns an
User with the given loginName. |
void |
grantGroupRole(IdentityType assignee,
Role role,
Group group)
|
void |
grantRole(IdentityType identityType,
Role role)
Grants the given
Role to the provided IdentityType. |
boolean |
hasGroupRole(IdentityType assignee,
Role role,
Group group)
|
boolean |
hasRole(IdentityType identityType,
Role role)
Checks if the given
Role is granted to the provided IdentityType. |
boolean |
isMember(IdentityType identityType,
Group group)
Checks if the given
IdentityType is a member of a specific Group. |
void |
loadAttribute(IdentityType identityType,
String attributeName) |
<T extends IdentityType> |
lookupIdentityById(Class<T> identityType,
String id)
Retrieves an
IdentityType with the given identifier. |
void |
remove(IdentityType value)
Removes the given
IdentityType instance from the configured identity store. |
void |
remove(Relationship relationship)
Removes the given
Relationship instance. |
void |
removeFromGroup(Agent member,
Group group)
|
<T extends CredentialStorage> |
retrieveCredentials(Agent agent,
Class<T> storageClass)
Returns a list of all stored credential values for the specified agent and credential storage class
|
<T extends CredentialStorage> |
retrieveCurrentCredential(Agent agent,
Class<T> storageClass)
Returns the current stored credential value for the specific agent and credential storage class
|
void |
revokeGroupRole(IdentityType assignee,
Role role,
Group group)
|
void |
revokeRole(IdentityType identityType,
Role role)
Revokes the given
Role from the provided IdentityType. |
void |
update(IdentityType identityType)
Updates the given
IdentityType instance. |
void |
update(Relationship relationship)
Updates the given
Relationship instance. |
void |
updateCredential(Agent agent,
Object credential)
Updates a credential for the given
Agent. |
void |
updateCredential(Agent agent,
Object credential,
Date effectiveDate,
Date expiryDate)
Updates a credential for the given
Agent. |
void |
validateCredentials(Credentials credentials)
Validates the given
Credentials. |
void add(IdentityType identityType) throws IdentityManagementException
Adds the given IdentityType instance to the configured identity store.
identityType - IdentityManagementException - If cannot store the provided IdentityType instance.void update(IdentityType identityType) throws IdentityManagementException
Updates the given IdentityType instance. The instance must have an identifier, otherwise a exception will be
thrown.
identityType - IdentityManagementException - If cannot update the provided IdentityType instance.void remove(IdentityType value) throws IdentityManagementException
Removes the given IdentityType instance from the configured identity store. The instance must have an identifier,
otherwise a exception will be thrown.
value - IdentityManagementException - If cannot remove the provided IdentityType instance.void add(Relationship relationship) throws IdentityManagementException
Adds the given Relationship instance to the configured identity store.
relationship - IdentityManagementException - If cannot add the provided Relationship instance.void update(Relationship relationship)
Updates the given Relationship instance. The instance must have an identifier, otherwise a exception will be
thrown.
relationship - IdentityManagementException - If cannot update the provided Relationship instance.void remove(Relationship relationship)
Removes the given Relationship instance. The instance must have an identifier, otherwise a exception will be
thrown.
relationship - IdentityManagementException - If cannot remove the provided Relationship instance.Agent getAgent(String loginName) throws IdentityManagementException
Returns an Agent with the given loginName. User are also agents, so if the
loginName maps to the an User it will be returned.
loginName - IdentityManagementException - If cannot retrieve the Agent.User getUser(String loginName)
Returns an User with the given loginName.
loginName - User with the given loginName this method returns null.Role getRole(String name)
Returns an Role with the given name.
loginName - Role with the given name this method returns null.Group getGroup(String groupPath)
Returns the Group with the specified groupPath. Eg.: /groupA/groupB/groupC.
You can also provide the name only. In this case, the group returned will be the root group. Eg.: /Administrators.
groupPath - Group with the given groupPath this method returns null.boolean isMember(IdentityType identityType, Group group)
Checks if the given IdentityType is a member of a specific Group.
identityType - Must be a Agent or Group instance.group - IdentityType is a member of the provided Group.boolean hasGroupRole(IdentityType assignee, Role role, Group group)
Checks if the given IdentityType, Role and Group instances maps to a GroupRole
relationship.
assignee - role - group - void grantGroupRole(IdentityType assignee, Role role, Group group)
Creates a GroupRole relationship for the given IdentityType, Role and Group instances.
assignee - role - group - void revokeGroupRole(IdentityType assignee, Role role, Group group)
Revokes a GroupRole relationship for the given IdentityType, Role and Group instances.
assignee - role - group - boolean hasRole(IdentityType identityType, Role role)
Checks if the given Role is granted to the provided IdentityType.
identityType - role - void grantRole(IdentityType identityType, Role role)
Grants the given Role to the provided IdentityType.
identityType - role - void revokeRole(IdentityType identityType, Role role)
Revokes the given Role from the provided IdentityType.
identityType - role - <T extends IdentityType> T lookupIdentityById(Class<T> identityType, String id)
Retrieves an IdentityType with the given identifier.
The first argument tells which IdentityType type should be returned. If you provide the IdentityType base
interface any IdentityType instance that matches the given identifier will be returned.
identityType - id - IdentityType is found with the given identifier this method returns null.<T extends IdentityType> IdentityQuery<T> createIdentityQuery(Class<T> identityType)
Creates an IdentityQuery that can be used to query for IdentityType instances.
The first argument tells which IdentityType type should be returned. If you provide the IdentityType base
interface any IdentityType instance that matches the provided query parameters will be returned.
identityType - <T extends Relationship> RelationshipQuery<T> createRelationshipQuery(Class<T> relationshipType)
Creates an RelationshipQuery that can be used to query for Relationship instances.
The first argument tells which Relationship type should be returned. If you provide the Relationship base
interface any Relationship instance that matches the provided query parameters will be returned.
identityType - void validateCredentials(Credentials credentials)
Validates the given Credentials.
To check the validation status you should use the Credentials.getStatus method.
credentials - void updateCredential(Agent agent, Object credential)
Updates a credential for the given Agent.
agent - credential - The credential must be a object supported by any CredentialHandler. Examples of
credentials are the Password and Digest types.void updateCredential(Agent agent, Object credential, Date effectiveDate, Date expiryDate)
Updates a credential for the given Agent.
This methods also allows to specify the expiration and effective date for the credential.
agent - credential - The credential must be a object supported by any CredentialHandler. Examples of
credentials are the Password and Digest types.<T extends CredentialStorage> T retrieveCurrentCredential(Agent agent, Class<T> storageClass)
agent - storageClass - <T extends CredentialStorage> List<T> retrieveCredentials(Agent agent, Class<T> storageClass)
agent - storageClass - void loadAttribute(IdentityType identityType, String attributeName)
identityType - attributeName - Copyright © 2013. All Rights Reserved.