|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpt.digitalis.dif.controller.security.objects.DIFUserImpl
public class DIFUserImpl
Default implementation VALIDATE: Check the Cloneable usage good/bad practice!
| Constructor Summary | |
|---|---|
DIFUserImpl()
Default constructor |
|
DIFUserImpl(IDIFUser user,
String password)
Constructor from a IDIFUser object |
|
| Method Summary | |
|---|---|
void |
addTempGroup(String groupId)
Adds the temporary group. |
boolean |
canAccess(Entity resourceType,
String resourceId)
Checks if the user can access a given resource. |
boolean |
canAccess(IStage stage)
Checks if the user can access a given stage. |
void |
cleanCache()
Clears any existing cache |
protected Object |
clone()
|
IDIFClonableUser |
cloneUser()
|
boolean |
containsAttribute(String id)
Searches for a given attribute |
boolean |
containsParameter(String id)
Searches for a given parameter |
boolean |
equals(Object obj)
|
Object |
getAttribute(String id)
Gets the user attribute. |
pt.digitalis.utils.common.collections.CaseInsensitiveHashMap<Object> |
getAttributes()
Gets the user attribute list. |
List<String> |
getAttributesToRemove()
Inspector for the 'attributesToRemove' attribute. |
String |
getEmail()
Returns the user e-mail address. |
Set<String> |
getGroupIDs()
Retrieves the list of group ids associated with this user |
Map<String,IDIFGroup> |
getGroups()
Retrieves the list of groups associated with this user |
String |
getID()
Returns the user id. |
String |
getName()
Returns the user full name. |
String |
getNick()
Returns the user's nick name. |
Object |
getParameter(String id)
Gets a user parameter. |
Map<String,Object> |
getParameters()
Gets the user parameter list. |
String |
getPassword()
|
IDIFGroup |
getProfile()
Retrieves the user profile or default group |
String |
getProfileID()
Retrieves the user profile or default group ID |
int |
hashCode()
|
void |
initializeAttributes(Map<String,Object> attrs)
|
boolean |
isDefault()
A default user is a user that is created by the default configuration of the application. |
boolean |
isEnabled()
A disabled user will not be able to log on |
void |
refresh()
Refreshes the current user from the persistent layer |
void |
removeAttribute(String id)
Removes the user attribute. |
void |
removeParameter(String id)
Removes the user parameter. |
void |
removeTempGroup(String groupId)
Removes the temporary group. |
void |
setAttribute(String id,
Object attribute)
Sets the user attribute. |
void |
setAttributes(Map<String,Object> attributes)
Sets the attributes. |
void |
setDefault(boolean isDefault)
Sets the user as a default user. |
void |
setEmail(String email)
Sets the user e-mail address. |
void |
setEnabled(boolean enabled)
|
void |
setID(String id)
Sets the user id. |
void |
setName(String name)
Sets the user full name. |
void |
setNick(String nick)
Sets the user nick name. |
void |
setParameter(String id,
Object parameter)
Sets the user parameters. |
void |
setParameters(Map<String,Object> parameters)
Sets the parameters. |
void |
setPassword(String password)
Sets the user password. |
void |
setProfileID(String profileGroupID)
Sets the profile ID or default group of the user |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DIFUserImpl()
public DIFUserImpl(IDIFUser user,
String password)
throws IdentityManagerException
user - the IDIFUser to use as a base for the new user to createpassword - the password to set
IdentityManagerException - if the profile can't be accessed| Method Detail |
|---|
public void addTempGroup(String groupId)
IDIFUser
addTempGroup in interface IDIFUsergroupId - the group idIDIFUser.addTempGroup(java.lang.String)
public boolean canAccess(Entity resourceType,
String resourceId)
IUserAuthorization
canAccess in interface IUserAuthorizationresourceType - the resource (entity) type.resourceId - the id of the resource to check access
IUserAuthorization.canAccess(pt.digitalis.dif.dem.Entity,
java.lang.String)public boolean canAccess(IStage stage)
IUserAuthorization
canAccess in interface IUserAuthorizationstage - the stage to check
IUserAuthorization.canAccess(pt.digitalis.dif.dem.interfaces.IStage)public void cleanCache()
IDIFUser
cleanCache in interface IDIFUserIDIFUser.cleanCache()
protected Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionObject.clone()public IDIFClonableUser cloneUser()
cloneUser in interface IDIFClonableUserIDIFClonableUser.cloneUser()public boolean containsAttribute(String id)
IDIFUser
containsAttribute in interface IDIFUserid - the id of the attribute to search
IDIFUser.containsAttribute(java.lang.String)public boolean containsParameter(String id)
IDIFUser
containsParameter in interface IDIFUserid - the id of the parameter to search
IDIFUser.containsParameter(java.lang.String)public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public Object getAttribute(String id)
IDIFUser
getAttribute in interface IDIFUserid - the id of the attribute
IDIFUser.getAttribute(java.lang.String)public pt.digitalis.utils.common.collections.CaseInsensitiveHashMap<Object> getAttributes()
IDIFUser
getAttributes in interface IDIFUserIDIFUser.getAttributes()public List<String> getAttributesToRemove()
IDIFUser
getAttributesToRemove in interface IDIFUserIDIFUser.getAttributesToRemove()public String getEmail()
IDIFUser
getEmail in interface IDIFUserIDIFUser.getEmail()
public Set<String> getGroupIDs()
throws IdentityManagerException
IDIFUser
getGroupIDs in interface IDIFUserIdentityManagerException - if the users can't be found on the identity managerIDIFUser.getGroupIDs()
public Map<String,IDIFGroup> getGroups()
throws IdentityManagerException
IDIFUser
getGroups in interface IDIFUserIdentityManagerException - if the groups can't be found on the identity managerIDIFUser.getGroups()public String getID()
IDIFUser
getID in interface IDIFUserIDIFUser.getID()public String getName()
IDIFUser
getName in interface IDIFUserIDIFUser.getName()public String getNick()
IDIFUser
getNick in interface IDIFUserIDIFUser.getNick()public Object getParameter(String id)
IDIFUser
getParameter in interface IDIFUserid - the id of the parameter
IDIFUser.getParameter(String)public Map<String,Object> getParameters()
IDIFUser
getParameters in interface IDIFUserIDIFUser.getParameters()public String getPassword()
getPassword in interface IDIFInternalUser
public IDIFGroup getProfile()
throws IdentityManagerException
IDIFUser
getProfile in interface IDIFUserIdentityManagerException - if the profile can't be found on the identity managerIDIFUser.getProfile()public String getProfileID()
IDIFUser
getProfileID in interface IDIFUserIDIFUser.getProfileID()public int hashCode()
hashCode in class ObjectObject.hashCode()public void initializeAttributes(Map<String,Object> attrs)
initializeAttributes in interface IDIFUserattrs - the new attributes to setIDIFUser.initializeAttributes(java.util.Map)public boolean isDefault()
IDIFUser
isDefault in interface IDIFUserIDIFUser.isDefault()public boolean isEnabled()
IDIFUser
isEnabled in interface IDIFUserIDIFUser.isEnabled()public void refresh()
IDIFUser
refresh in interface IDIFUserIDIFUser.refresh()public void removeAttribute(String id)
IDIFUser
removeAttribute in interface IDIFUserid - the id of the attributeIDIFUser.removeAttribute(java.lang.String)public void removeParameter(String id)
IDIFUser
removeParameter in interface IDIFUserid - the id of the parameterIDIFUser.removeParameter(java.lang.String)public void removeTempGroup(String groupId)
IDIFUser
removeTempGroup in interface IDIFUsergroupId - the group idIDIFUser.removeTempGroup(java.lang.String)
public void setAttribute(String id,
Object attribute)
throws InternalFrameworkException
IDIFUser
setAttribute in interface IDIFUserid - the id of the attributeattribute - the attribute to set
InternalFrameworkException - if the attribute can't be setIDIFUser.setAttribute(java.lang.String, java.lang.Object)
public void setAttributes(Map<String,Object> attributes)
throws InternalFrameworkException
IDIFUser
setAttributes in interface IDIFUserattributes - the attributes to set
InternalFrameworkException - if the attribute can't be setIDIFUser.setAttributes(java.util.Map)public void setDefault(boolean isDefault)
IDIFUser
setDefault in interface IDIFUserIDIFUser.setDefault(boolean)public void setEmail(String email)
IDIFUser
setEmail in interface IDIFUseremail - the email to setIDIFUser.setEmail(java.lang.String)public void setEnabled(boolean enabled)
setEnabled in interface IDIFUserenabled - the enabled to setIDIFUser.setEnabled(boolean)public void setID(String id)
IDIFUser
setID in interface IDIFUserid - the id to setIDIFUser.setID(java.lang.String)public void setName(String name)
IDIFUser
setName in interface IDIFUsername - the name to setIDIFUser.setName(java.lang.String)public void setNick(String nick)
IDIFUser
setNick in interface IDIFUsernick - the nick name to setIDIFUser.setNick(java.lang.String)
public void setParameter(String id,
Object parameter)
IDIFUser
setParameter in interface IDIFUserid - the id of the parameterparameter - the parameter to setIDIFUser.setParameter(java.lang.String, java.lang.Object)public void setParameters(Map<String,Object> parameters)
IDIFUser
setParameters in interface IDIFUserparameters - the parameters to setIDIFUser.setParameters(java.util.Map)public void setPassword(String password)
IDIFUser
setPassword in interface IDIFUserpassword - the password to setIDIFUser.setPassword(java.lang.String)public void setProfileID(String profileGroupID)
IDIFUser
setProfileID in interface IDIFUserprofileGroupID - the group to set as the profileIDIFUser.setProfileID(java.lang.String)public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||