pt.digitalis.dif.controller.security.objects
Interface IDIFUser

All Superinterfaces:
IUserAuthorization
All Known Subinterfaces:
IDIFClonableUser, IDIFInternalUser
All Known Implementing Classes:
DIFUserImpl, DIFUserInSession

public interface IDIFUser
extends IUserAuthorization

Defines the DIF user features interface

Author:
Pedro Viegas pviegas@digitalis.pt, Rodrigo Gon�alves rgoncalves@digitalis.pt
Created on:
Dec 3, 2007

Method Summary
 void addTempGroup(String groupId)
          Adds the temporary group.
 void cleanCache()
          Clears any existing cache
 boolean containsAttribute(String id)
          Searches for a given attribute
 boolean containsParameter(String id)
          Searches for a given parameter
 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.
 IDIFGroup getProfile()
          Retrieves the user profile or default group
 String getProfileID()
          Retrieves the user profile or default group ID
 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
 
Methods inherited from interface pt.digitalis.dif.controller.security.objects.IUserAuthorization
canAccess, canAccess
 

Method Detail

addTempGroup

void addTempGroup(String groupId)
Adds the temporary group. This user group has the session life expectancy

Parameters:
groupId - the group id

cleanCache

void cleanCache()
Clears any existing cache


containsAttribute

boolean containsAttribute(String id)
Searches for a given attribute

Parameters:
id - the id of the attribute to search
Returns:
T if the attribute is present

containsParameter

boolean containsParameter(String id)
Searches for a given parameter

Parameters:
id - the id of the parameter to search
Returns:
T if the parameter is present

getAttribute

Object getAttribute(String id)
Gets the user attribute.

Parameters:
id - the id of the attribute
Returns:
the user attribute

getAttributes

pt.digitalis.utils.common.collections.CaseInsensitiveHashMap<Object> getAttributes()
Gets the user attribute list.

Returns:
the user attribute list

getAttributesToRemove

List<String> getAttributesToRemove()
Inspector for the 'attributesToRemove' attribute.

Returns:
the attributesToRemove value

getEmail

String getEmail()
Returns the user e-mail address.

Returns:
the user e-mail

getGroupIDs

Set<String> getGroupIDs()
                        throws IdentityManagerException
Retrieves the list of group ids associated with this user

Returns:
the groups
Throws:
IdentityManagerException - if the users can't be found on the identity manager

getGroups

Map<String,IDIFGroup> getGroups()
                                throws IdentityManagerException
Retrieves the list of groups associated with this user

Returns:
the groups
Throws:
IdentityManagerException - if the groups can't be found on the identity manager

getID

String getID()
Returns the user id.

Returns:
the user id

getName

String getName()
Returns the user full name.

Returns:
the user's full name

getNick

String getNick()
Returns the user's nick name.

Returns:
the user's nick name

getParameter

Object getParameter(String id)
Gets a user parameter.

Parameters:
id - the id of the parameter
Returns:
the user parameter

getParameters

Map<String,Object> getParameters()
Gets the user parameter list.

Returns:
the user parameter list

getProfile

IDIFGroup getProfile()
                     throws IdentityManagerException
Retrieves the user profile or default group

Returns:
the profile group
Throws:
IdentityManagerException - if the profile can't be found on the identity manager

getProfileID

String getProfileID()
                    throws IdentityManagerException
Retrieves the user profile or default group ID

Returns:
the profile group
Throws:
IdentityManagerException - if the profile can't be accessed

initializeAttributes

void initializeAttributes(Map<String,Object> attrs)
Parameters:
attrs - the new attributes to set

isDefault

boolean isDefault()
A default user is a user that is created by the default configuration of the application. As such it cannot be deleted. Only disabled.

Returns:
T if the user is a default user

isEnabled

boolean isEnabled()
A disabled user will not be able to log on

Returns:
T if the user is enabled

refresh

void refresh()
Refreshes the current user from the persistent layer


removeAttribute

void removeAttribute(String id)
Removes the user attribute.

Parameters:
id - the id of the attribute

removeParameter

void removeParameter(String id)
Removes the user parameter.

Parameters:
id - the id of the parameter

removeTempGroup

void removeTempGroup(String groupId)
Removes the temporary group.

Parameters:
groupId - the group id

setAttribute

void setAttribute(String id,
                  Object attribute)
                  throws InternalFrameworkException
Sets the user attribute.

Parameters:
id - the id of the attribute
attribute - the attribute to set
Throws:
InternalFrameworkException - if the attribute can't be set

setAttributes

void setAttributes(Map<String,Object> attributes)
                   throws InternalFrameworkException
Sets the attributes.

Parameters:
attributes - the attributes to set
Throws:
InternalFrameworkException - if the attribute can't be set

setDefault

void setDefault(boolean isDefault)
Sets the user as a default user.

Parameters:
isDefault -

setEmail

void setEmail(String email)
Sets the user e-mail address.

Parameters:
email - the email to set

setEnabled

void setEnabled(boolean enabled)
Parameters:
enabled - the enabled to set

setID

void setID(String id)
Sets the user id.

Parameters:
id - the id to set

setName

void setName(String name)
Sets the user full name.

Parameters:
name - the name to set

setNick

void setNick(String nick)
Sets the user nick name.

Parameters:
nick - the nick name to set

setParameter

void setParameter(String id,
                  Object parameter)
Sets the user parameters.

Parameters:
id - the id of the parameter
parameter - the parameter to set

setParameters

void setParameters(Map<String,Object> parameters)
Sets the parameters.

Parameters:
parameters - the parameters to set

setPassword

void setPassword(String password)
Sets the user password.

Parameters:
password - the password to set

setProfileID

void setProfileID(String profileGroupID)
Sets the profile ID or default group of the user

Parameters:
profileGroupID - the group to set as the profile


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