pt.digitalis.dif.controller.security.managers.impl
Class AbstractIdentityManager

java.lang.Object
  extended by pt.digitalis.dif.controller.security.managers.impl.AbstractIdentityManager
All Implemented Interfaces:
IIdentityManager, IIdentityManagerPrivate
Direct Known Subclasses:
IdentityManagerStaticImpl

public abstract class AbstractIdentityManager
extends Object
implements IIdentityManagerPrivate

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
2008/10/01

Field Summary
static String N_A
          The 'N/A' String literal.
 
Constructor Summary
AbstractIdentityManager()
           
 
Method Summary
 void addManagedAttribute(String attribute)
          Adds a managed attribute.
 void addManagedAttributes(String attributes)
          Adds a comma-separated list of managed attributes.
 boolean containsUserParameter(String userID, String parameterID)
          Checks if a parameter exists.
 int countAllGroupsOfUser(String userId, boolean parseGroupHierarchy)
          Counts all groups of a given user.
abstract  List<String> gatherManagedAttributes()
          Gathers the managed attributes.
 List<String> getManagedAttributes()
          Gets the framework managed attributes.
 Map<String,IDIFGroup> getUserGroups(String userID, boolean parseGroupHierarchy)
          Returns the list of groups of a given user
 Set<String> getUserGroupsIDs(String userID, boolean parseGroupHierarchy)
          Returns the list of group IDs of a given user
 Object getUserParameter(String userID, String parameterID)
          Gets a given parameter from a given user.
 Map<String,Object> getUserParameters(String userID)
          Gets all the parameters from a given user.
 boolean isUserInGroup(String userID, String groupID, boolean parseGroupHierarchy)
          Checks if a given user belongs to a given group.
 void removeUserParameter(String userID, String parameterID)
          Removes a given parameter from a given user.
 void setUserParameter(String userID, String parameterID, Object parameterValue)
          Sets an user parameter.
 void setUserParameters(String userID, Map<String,Object> parametersMap)
          Sets the user parameters as an whole.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pt.digitalis.dif.controller.security.managers.IIdentityManagerPrivate
persistUserAttribute, persistUserAttributes
 
Methods inherited from interface pt.digitalis.dif.controller.security.managers.IIdentityManager
addGroup, addUser, addUserToGroup, changePassword, countAllGroups, countAllGroupsOfUser, countAllUsers, countAllUsers, countUsers, getAllGroups, getAllUsers, getExclusionCharaters, getGroup, getGroupAttributeName, getGroupGroups, getGroups, getGroupUsers, getMailAttributeName, getNameAttributeName, getUser, getUserGroups, getUserGroupsIDs, getUserGroupsPagination, getUserIDsInGroup, getUserLoginAttributeName, getUserParentGroupAttributeName, getUsers, getUsersByAttribute, getUsersByAttributes, getUsersByAttributes, getUsersByEmail, groupExists, isIdentityValid, isReadOnly, isUserInGroup, removeGroup, removeUser, removeUserFromGroup, resetIdentityManager, updateGroup, updateUser, updateUserAttribute, updateUserAttributes, userExists
 

Field Detail

N_A

public static final String N_A
The 'N/A' String literal.

See Also:
Constant Field Values
Constructor Detail

AbstractIdentityManager

public AbstractIdentityManager()
Method Detail

addManagedAttribute

public void addManagedAttribute(String attribute)
Description copied from interface: IIdentityManager
Adds a managed attribute.

Specified by:
addManagedAttribute in interface IIdentityManager
Parameters:
attribute - The attribute
See Also:
IIdentityManager.addManagedAttribute(java.lang.String)

addManagedAttributes

public void addManagedAttributes(String attributes)
Description copied from interface: IIdentityManager
Adds a comma-separated list of managed attributes.

Specified by:
addManagedAttributes in interface IIdentityManager
Parameters:
attributes - The comma-separated list of managed attributes.
See Also:
IIdentityManager.addManagedAttributes(java.lang.String)

containsUserParameter

public boolean containsUserParameter(String userID,
                                     String parameterID)
Description copied from interface: IIdentityManager
Checks if a parameter exists.

Specified by:
containsUserParameter in interface IIdentityManager
Parameters:
userID - the user ID
parameterID - the parameter ID
Returns:
T if the parameter exists, F otherwise
See Also:
IIdentityManager.containsUserParameter(java.lang.String, java.lang.String)

countAllGroupsOfUser

public int countAllGroupsOfUser(String userId,
                                boolean parseGroupHierarchy)
                         throws IdentityManagerException
Description copied from interface: IIdentityManager
Counts all groups of a given user.

Specified by:
countAllGroupsOfUser in interface IIdentityManager
Parameters:
userId - The user identifier
parseGroupHierarchy - contemplates the group Hierarchy
Returns:
The number of groups of this user.
Throws:
IdentityManagerException
See Also:
IIdentityManager.countAllGroupsOfUser(java.lang.String, boolean)

gatherManagedAttributes

public abstract List<String> gatherManagedAttributes()
Description copied from interface: IIdentityManager
Gathers the managed attributes. This method must be used to initialize the managed attributes.

Specified by:
gatherManagedAttributes in interface IIdentityManager
Returns:
The list containing the managed attributes
See Also:
IIdentityManager.gatherManagedAttributes()

getManagedAttributes

public List<String> getManagedAttributes()
Description copied from interface: IIdentityManager
Gets the framework managed attributes.

Specified by:
getManagedAttributes in interface IIdentityManager
Returns:
the managedAttributes value
See Also:
IIdentityManager.getManagedAttributes()

getUserGroups

public Map<String,IDIFGroup> getUserGroups(String userID,
                                           boolean parseGroupHierarchy)
                                    throws IdentityManagerException
Description copied from interface: IIdentityManager
Returns the list of groups of a given user

Specified by:
getUserGroups in interface IIdentityManager
Parameters:
userID - the user
parseGroupHierarchy - contemplates the group Hierarchy
Returns:
the list of groups
Throws:
IdentityManagerException - if the group's users can't be found
See Also:
IIdentityManager.getUserGroups(java.lang.String, boolean)

getUserGroupsIDs

public Set<String> getUserGroupsIDs(String userID,
                                    boolean parseGroupHierarchy)
                             throws IdentityManagerException
Description copied from interface: IIdentityManager
Returns the list of group IDs of a given user

Specified by:
getUserGroupsIDs in interface IIdentityManager
Parameters:
userID - the user
parseGroupHierarchy - contemplates the group Hierarchy
Returns:
the list of groups
Throws:
IdentityManagerException - if the group's users can't be found
See Also:
IIdentityManager.getUserGroupsIDs(java.lang.String, boolean)

getUserParameter

public Object getUserParameter(String userID,
                               String parameterID)
Description copied from interface: IIdentityManager
Gets a given parameter from a given user.

Specified by:
getUserParameter in interface IIdentityManager
Returns:
the parameter value if it exists, null otherwise
See Also:
IIdentityManager.getUserParameter(java.lang.String, java.lang.String)

getUserParameters

public Map<String,Object> getUserParameters(String userID)
Description copied from interface: IIdentityManager
Gets all the parameters from a given user.

Specified by:
getUserParameters in interface IIdentityManager
Parameters:
userID - the user ID
Returns:
the parameters map if it exists, null otherwise
See Also:
IIdentityManager.getUserParameters(java.lang.String)

isUserInGroup

public boolean isUserInGroup(String userID,
                             String groupID,
                             boolean parseGroupHierarchy)
                      throws IdentityManagerException
Description copied from interface: IIdentityManager
Checks if a given user belongs to a given group.

Specified by:
isUserInGroup in interface IIdentityManager
Parameters:
userID - the user ID
groupID - the group ID
parseGroupHierarchy - contemplates the group Hierarchy
Returns:
T if the user belongs to the group, F otherwise
Throws:
IdentityManagerException - if the operation can't be executed
See Also:
IIdentityManager.isUserInGroup(java.lang.String, java.lang.String, boolean)

removeUserParameter

public void removeUserParameter(String userID,
                                String parameterID)
Description copied from interface: IIdentityManager
Removes a given parameter from a given user.

Specified by:
removeUserParameter in interface IIdentityManager
Parameters:
userID - the user ID
parameterID - the parameter ID
See Also:
IIdentityManager.removeUserParameter(java.lang.String, java.lang.String)

setUserParameter

public void setUserParameter(String userID,
                             String parameterID,
                             Object parameterValue)
Description copied from interface: IIdentityManager
Sets an user parameter.

Specified by:
setUserParameter in interface IIdentityManager
Parameters:
userID - the user ID
parameterID - the parameter ID
parameterValue - the parameter value
See Also:
IIdentityManager.setUserParameter(java.lang.String, java.lang.String, java.lang.Object)

setUserParameters

public void setUserParameters(String userID,
                              Map<String,Object> parametersMap)
Description copied from interface: IIdentityManager
Sets the user parameters as an whole.

Specified by:
setUserParameters in interface IIdentityManager
Parameters:
userID - the user ID
parametersMap - the parameters map
See Also:
IIdentityManager.setUserParameters(java.lang.String, java.util.Map)


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.