|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpt.digitalis.dif.controller.security.managers.impl.AbstractIdentityManager
pt.digitalis.dif.controller.security.managers.impl.IdentityManagerStaticImpl
public class IdentityManagerStaticImpl
Default implementation for the identity manager.
| Field Summary |
|---|
| Fields inherited from class pt.digitalis.dif.controller.security.managers.impl.AbstractIdentityManager |
|---|
N_A |
| Constructor Summary | |
|---|---|
IdentityManagerStaticImpl()
|
|
| Method Summary | |
|---|---|
void |
addGroup(IDIFGroup newGroup)
Adds a new group to the manager. |
void |
addUser(IDIFUser newUser)
Adds a new user to the manager. |
void |
addUserToGroup(String userID,
String groupID)
Adds an existing user to an existing group. |
void |
changePassword(String userID,
String newPassword)
Changes the password for the supplied user. |
int |
countAllGroups()
Counts the number of groups in the system |
int |
countAllGroupsOfUser(String userId)
Counts all groups of a given user. |
int |
countAllUsers()
Counts the number of users in the system |
int |
countAllUsers(String groupID)
Counts all users of a given group. |
int |
countUsers(Map<String,String> attributes)
Count the number of users in the system which match all of the provided attributes |
List<String> |
gatherManagedAttributes()
Gathers the managed attributes. |
Set<IDIFGroup> |
getAllGroups()
Get all the groups registered in the system |
Set<IDIFUser> |
getAllUsers()
Get all the users in the system |
String |
getExclusionCharaters()
Get the exclusion charaters |
IDIFGroup |
getGroup(String groupID)
Returns null if the group doesn't exist. |
String |
getGroupAttributeName()
Gets the group attribute name |
Map<String,IDIFGroup> |
getGroupGroups(String parentGroupID)
Returns the list of groups whose parent group is the given group |
Set<IDIFGroup> |
getGroups(Pagination page)
Returns a subset of all groups in the system, according to the parameters |
Map<String,IDIFUser> |
getGroupUsers(String groupID)
Returns the list of users of a given group |
String |
getMailAttributeName()
Gets the mail attribute name |
String |
getNameAttributeName()
Gets the name attribute name |
IDIFUser |
getUser(String userID)
Returns null if the user doesn't exist. |
Map<String,IDIFGroup> |
getUserGroups(String userID)
Returns the list of groups of a given user |
Set<String> |
getUserGroupsIDs(String userID)
Returns the list of group IDs of a given user |
Map<String,IDIFGroup> |
getUserGroupsPagination(String userID,
Pagination page)
Returns the list of groups of a given user, with pagination. |
Set<String> |
getUserIDsInGroup(String groupID)
Returns the list of user IDs of a given group |
String |
getUserLoginAttributeName()
Gets the user login attribute name |
String |
getUserParentGroupAttributeName()
Returns the user parent group attribute name |
Set<IDIFUser> |
getUsers(Pagination page)
Returns a subset of all users in the system, according to the parameters |
Set<IDIFUser> |
getUsersByAttribute(String attribute,
String value)
Returns the list of users with a given attribute value. |
Set<IDIFUser> |
getUsersByAttributes(Map<String,String> attributes)
Get users that match specified attributes. |
Set<IDIFUser> |
getUsersByAttributes(Map<String,String> attributes,
Pagination page)
Get users that match specified attributes. |
Set<IDIFUser> |
getUsersByEmail(String value)
Returns the list of users with a given email attribute value. |
boolean |
groupExists(String groupID)
Checks if a group exists on the manager. |
void |
initializeStaticCustomUsers()
Initializes users from custom static file "users.xml" |
boolean |
isIdentityValid(String userID,
String suppliedPassword)
Checks if the supplied password matches the one defined for a user with a given ID. |
boolean |
isReadOnly()
Get the ldap readOnly configuration value. |
boolean |
isUserInGroup(String userID,
String groupID)
Checks if a given user belongs to a given group. |
void |
persistUserAttribute(String userID,
String attributeID,
Object attributeValue)
Persists an attribute value on a given user on the underlying repository. |
void |
persistUserAttributes(String userID,
Map<String,Object> attributes)
Persists all attributes values on a given user on the underlying repository. |
void |
removeGroup(String groupID)
Removes an existing group from the manager, if it exists. |
void |
removeUser(String userID)
Removes an existing user from the manager, if it exists. |
void |
removeUserFromGroup(String userID,
String groupID)
Removes an existing user from an existing group. |
void |
resetIdentityManager()
Resets the identity manager. |
String |
toString()
|
void |
updateGroup(IDIFGroup existingGroup)
Updates an existing group. |
void |
updateUser(IDIFUser existingUser,
String userID)
Updates an existing user. |
void |
updateUserAttribute(String userID,
String attributeID,
Object attributeValue)
Updates an attribute value on a given user and persists it. |
void |
updateUserAttributes(String userID,
Map<String,Object> attributes)
Updates all of the user's attributes. |
boolean |
userExists(String userID)
Checks if a user exists on the manager. |
| Methods inherited from class pt.digitalis.dif.controller.security.managers.impl.AbstractIdentityManager |
|---|
addManagedAttribute, addManagedAttributes, containsUserParameter, countAllGroupsOfUser, getManagedAttributes, getUserGroups, getUserGroupsIDs, getUserParameter, getUserParameters, isUserInGroup, removeUserParameter, setUserParameter, setUserParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IdentityManagerStaticImpl()
| Method Detail |
|---|
public void addGroup(IDIFGroup newGroup)
throws IdentityManagerException
IIdentityManager
newGroup - the group to add
IdentityManagerException - if the user can't be addedIIdentityManager.addGroup(IDIFGroup)
public void addUser(IDIFUser newUser)
throws IdentityManagerException
IIdentityManager
newUser - the new user to add to the manager
IdentityManagerException - if the user can't be addedIIdentityManager.addUser(IDIFUser)
public void addUserToGroup(String userID,
String groupID)
IIdentityManager
userID - the user IDgroupID - the group IDIIdentityManager.addUserToGroup(String, String)
public void changePassword(String userID,
String newPassword)
throws IdentityManagerException
IIdentityManager
userID - the user IDnewPassword - the new password
IdentityManagerException - if the password can't be changedIIdentityManager.changePassword(java.lang.String,
java.lang.String)
public int countAllGroups()
throws IdentityManagerException
IIdentityManager
IdentityManagerException - * If the operation cannot be executedIIdentityManager.countAllGroups()
public int countAllGroupsOfUser(String userId)
throws IdentityManagerException
IIdentityManager
userId - The user identifier
IdentityManagerExceptionIIdentityManager.countAllGroupsOfUser(String)
public int countAllUsers()
throws IdentityManagerException
IIdentityManager
IdentityManagerException - If the operation cannot be executedIIdentityManager.countAllUsers()
public int countAllUsers(String groupID)
throws IdentityManagerException
IIdentityManager
groupID - The group identifier
IdentityManagerExceptionIIdentityManager.countAllUsers(java.lang.String)
public int countUsers(Map<String,String> attributes)
throws IdentityManagerException
IIdentityManager
attributes - The attributes
IdentityManagerException - If the operation cannot be executedIIdentityManager.countUsers(java.util.Map)public List<String> gatherManagedAttributes()
IIdentityManager
gatherManagedAttributes in interface IIdentityManagergatherManagedAttributes in class AbstractIdentityManagerAbstractIdentityManager.gatherManagedAttributes()public Set<IDIFGroup> getAllGroups()
IIdentityManager
IIdentityManager.getAllGroups()public Set<IDIFUser> getAllUsers()
IIdentityManager
IIdentityManager.getAllUsers()public String getExclusionCharaters()
IIdentityManager
IIdentityManager.getExclusionCharaters()public IDIFGroup getGroup(String groupID)
groupID - the group id
IIdentityManager.getGroup(String)public String getGroupAttributeName()
IIdentityManager
IIdentityManager.getGroupAttributeName()
public Map<String,IDIFGroup> getGroupGroups(String parentGroupID)
throws IdentityManagerException
IIdentityManager
parentGroupID - the parent group to search for children groups
IdentityManagerException - if the group's groups can't be foundIIdentityManager.getGroupGroups(java.lang.String)
public Set<IDIFGroup> getGroups(Pagination page)
throws IdentityManagerException
IIdentityManager
page - The required page
IdentityManagerException - If the operation can't be executedIIdentityManager.getGroups(Pagination)public Map<String,IDIFUser> getGroupUsers(String groupID)
IIdentityManager
groupID - the group
IIdentityManager.getGroupUsers(java.lang.String)public String getMailAttributeName()
IIdentityManager
IIdentityManager.getMailAttributeName()public String getNameAttributeName()
IIdentityManager
IIdentityManager.getNameAttributeName()public IDIFUser getUser(String userID)
userID - the user id
IIdentityManager.getUser(String)
public Map<String,IDIFGroup> getUserGroups(String userID)
throws IdentityManagerException
IIdentityManager
userID - the user
IdentityManagerException - if the group's users can't be foundIIdentityManager.getUserGroups(java.lang.String)public Set<String> getUserGroupsIDs(String userID)
IIdentityManager
userID - the user
IIdentityManager.getUserGroupsIDs(java.lang.String)
public Map<String,IDIFGroup> getUserGroupsPagination(String userID,
Pagination page)
throws IdentityManagerException
IIdentityManager
userID - the userpage - The page to be returned
IdentityManagerException - if the group's users can't be foundIIdentityManager.getUserGroupsPagination(java.lang.String,
pt.digitalis.dif.utils.Pagination)public Set<String> getUserIDsInGroup(String groupID)
IIdentityManager
groupID - the group
IIdentityManager.getUserIDsInGroup(java.lang.String)public String getUserLoginAttributeName()
IIdentityManager
IIdentityManager.getUserLoginAttributeName()public String getUserParentGroupAttributeName()
IIdentityManager
IIdentityManager.getUserParentGroupAttributeName()
public Set<IDIFUser> getUsers(Pagination page)
throws IdentityManagerException
IIdentityManager
page - The required page
IdentityManagerException - If the operation can't be executedIIdentityManager.getUsers(Pagination)
public Set<IDIFUser> getUsersByAttribute(String attribute,
String value)
throws IdentityManagerException
IIdentityManager
attribute - the attribute to searchvalue - the value for the attribute
IdentityManagerException - if the operation cannot be executedIIdentityManager.getUsersByAttribute(java.lang.String,
java.lang.String)
public Set<IDIFUser> getUsersByAttributes(Map<String,String> attributes)
throws IdentityManagerException
IIdentityManager
attributes - A map of attributes to be searched, where the keys are the attribute names, and the values are the
attribute values.
IdentityManagerException - If the operation cannot be completed.IIdentityManager.getUsersByAttributes(java.util.Map)
public Set<IDIFUser> getUsersByAttributes(Map<String,String> attributes,
Pagination page)
throws IdentityManagerException
IIdentityManager
attributes - A map of attributes to be searched, where the keys are the attribute names, and the values are the
attribute values.page - The page to be obtained
IdentityManagerException - If the operation can't be executedIIdentityManager.getUsersByAttributes(java.util.Map,
pt.digitalis.dif.utils.Pagination)
public Set<IDIFUser> getUsersByEmail(String value)
throws IdentityManagerException
IIdentityManager
value - the value for the attribute email
IdentityManagerException - if the operation cannot be executedIIdentityManager.getUsersByEmail(java.lang.String)public boolean groupExists(String groupID)
IIdentityManager
groupID - the ID of the group
IIdentityManager.groupExists(String)public void initializeStaticCustomUsers()
public boolean isIdentityValid(String userID,
String suppliedPassword)
IIdentityManager
userID - the user IDsuppliedPassword - the supplied user password
IIdentityManager.isIdentityValid(java.lang.String,
java.lang.String)public boolean isReadOnly()
IIdentityManager
IIdentityManager.isReadOnly()
public boolean isUserInGroup(String userID,
String groupID)
IIdentityManager
userID - the user IDgroupID - the group ID
IIdentityManager.isUserInGroup(String, String)
public void persistUserAttribute(String userID,
String attributeID,
Object attributeValue)
throws IdentityManagerException
IIdentityManagerPrivate
userID - the ID of the user to updateattributeID - the ID of the attribute to updateattributeValue - the value of the attribute to update
IdentityManagerException - if the attribute can't be updatedIIdentityManagerPrivate.persistUserAttribute(java.lang.String,
java.lang.String, java.lang.Object)
public void persistUserAttributes(String userID,
Map<String,Object> attributes)
throws IdentityManagerException
IIdentityManagerPrivate
userID - the ID of the user to updateattributes - the attributes to update
IdentityManagerException - if the attribute can't be updatedIIdentityManagerPrivate.persistUserAttributes(java.lang.String,
java.util.Map)public void removeGroup(String groupID)
IIdentityManager
groupID - the id of the group to removeIIdentityManager.removeGroup(String)public void removeUser(String userID)
IIdentityManager
userID - the id of the user to removeIIdentityManager.removeUser(String)
public void removeUserFromGroup(String userID,
String groupID)
IIdentityManager
userID - the user IDgroupID - the group IDIIdentityManager.removeUserFromGroup(String, String)public void resetIdentityManager()
IIdentityManager
IIdentityManager.resetIdentityManager()public String toString()
toString in class ObjectObject.toString()public void updateGroup(IDIFGroup existingGroup)
IIdentityManager
existingGroup - the group to updateIIdentityManager.updateGroup(IDIFGroup)
public void updateUser(IDIFUser existingUser,
String userID)
IIdentityManager
existingUser - the user to updateuserID - the user ID (must be supplied separately to ensure data integrity if the user ID is changed)IIdentityManager.updateUser(pt.digitalis.dif.controller.security.objects.IDIFUser,
java.lang.String)
public void updateUserAttribute(String userID,
String attributeID,
Object attributeValue)
throws IdentityManagerException
IIdentityManager
userID - the ID of the user to updateattributeID - the ID of the attribute to updateattributeValue - the value of the attribute to update
IdentityManagerException - if the attribute can't be updatedIIdentityManager.updateUserAttribute(java.lang.String,
java.lang.String, java.lang.Object)
public void updateUserAttributes(String userID,
Map<String,Object> attributes)
throws IdentityManagerException
IIdentityManager
userID - the ID of the user to updateattributes - the attributes to update
IdentityManagerException - if the attribute can't be updatedIIdentityManager.updateUserAttributes(java.lang.String,
java.util.Map)public boolean userExists(String userID)
IIdentityManager
userID - the ID of the user
IIdentityManager.userExists(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||