it.eng.spagobi.commons.bo
Class UserProfile

java.lang.Object
  extended by it.eng.spagobi.commons.bo.UserProfile
All Implemented Interfaces:
it.eng.spago.security.IEngUserProfile, java.io.Serializable

public class UserProfile
extends java.lang.Object
implements it.eng.spago.security.IEngUserProfile

This class contain the information about the user

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface it.eng.spago.security.IEngUserProfile
ENG_USER_PROFILE
 
Constructor Summary
UserProfile(SpagoBIUserProfile profile)
          The Constructor.
UserProfile(java.lang.String user)
          The Constructor.
 
Method Summary
static UserProfile createSchedulerUserProfile()
          Usato solo per lanciare i job.
static UserProfile createWorkFlowUserProfile()
          Usato solo nel workflow.
 java.util.Collection getFunctionalities()
           
 java.util.Collection getFunctionalitiesByRole(java.lang.String arg0)
           
 java.util.Collection getRoles()
           
 java.lang.Object getUserAttribute(java.lang.String attributeName)
           
 java.util.Collection getUserAttributeNames()
           
 java.lang.Object getUserId()
           
 java.lang.Object getUserName()
           
 java.lang.Object getUserUniqueIdentifier()
           
 boolean hasRole(java.lang.String roleName)
           
 boolean isAbleToExecuteAction(java.lang.String actionName)
           
 boolean isAbleToExecuteModuleInPage(java.lang.String pageName, java.lang.String moduleName)
           
static boolean isSchedulerUser(java.lang.String userid)
          Checks if is scheduler user.
static boolean isWorkflowUser(java.lang.String userid)
          Checks if is scheduler user.
 void setApplication(java.lang.String arg0)
           
 void setAttributes(java.util.Map attrs)
          Sets the attributes.
 void setFunctionalities(java.util.Collection functs)
          Sets the functionalities.
 void setRoles(java.util.Collection rols)
          Sets the roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProfile

public UserProfile(SpagoBIUserProfile profile)
The Constructor.

Parameters:
profile - SpagoBIUserProfile

UserProfile

public UserProfile(java.lang.String user)
The Constructor.

Parameters:
user - String
Method Detail

createWorkFlowUserProfile

public static final UserProfile createWorkFlowUserProfile()
Usato solo nel workflow.

Returns:
the user profile

createSchedulerUserProfile

public static final UserProfile createSchedulerUserProfile()
Usato solo per lanciare i job.

Returns:
the user profile

isWorkflowUser

public static boolean isWorkflowUser(java.lang.String userid)
Checks if is scheduler user.

Parameters:
userid - String
Returns:
true, if checks if is scheduler user

isSchedulerUser

public static boolean isSchedulerUser(java.lang.String userid)
Checks if is scheduler user.

Parameters:
userid - String
Returns:
true, if checks if is scheduler user

getFunctionalities

public java.util.Collection getFunctionalities()
                                        throws it.eng.spago.error.EMFInternalError
Specified by:
getFunctionalities in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

getFunctionalitiesByRole

public java.util.Collection getFunctionalitiesByRole(java.lang.String arg0)
                                              throws it.eng.spago.error.EMFInternalError
Specified by:
getFunctionalitiesByRole in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

getRoles

public java.util.Collection getRoles()
                              throws it.eng.spago.error.EMFInternalError
Specified by:
getRoles in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

getUserAttribute

public java.lang.Object getUserAttribute(java.lang.String attributeName)
                                  throws it.eng.spago.error.EMFInternalError
Specified by:
getUserAttribute in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

getUserAttributeNames

public java.util.Collection getUserAttributeNames()
Specified by:
getUserAttributeNames in interface it.eng.spago.security.IEngUserProfile

getUserUniqueIdentifier

public java.lang.Object getUserUniqueIdentifier()
Specified by:
getUserUniqueIdentifier in interface it.eng.spago.security.IEngUserProfile

getUserName

public java.lang.Object getUserName()

getUserId

public java.lang.Object getUserId()

hasRole

public boolean hasRole(java.lang.String roleName)
                throws it.eng.spago.error.EMFInternalError
Specified by:
hasRole in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

isAbleToExecuteAction

public boolean isAbleToExecuteAction(java.lang.String actionName)
                              throws it.eng.spago.error.EMFInternalError
Specified by:
isAbleToExecuteAction in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

isAbleToExecuteModuleInPage

public boolean isAbleToExecuteModuleInPage(java.lang.String pageName,
                                           java.lang.String moduleName)
                                    throws it.eng.spago.error.EMFInternalError
Specified by:
isAbleToExecuteModuleInPage in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

setApplication

public void setApplication(java.lang.String arg0)
                    throws it.eng.spago.error.EMFInternalError
Specified by:
setApplication in interface it.eng.spago.security.IEngUserProfile
Throws:
it.eng.spago.error.EMFInternalError

setFunctionalities

public void setFunctionalities(java.util.Collection functs)
Sets the functionalities.

Parameters:
functs - the new functionalities

setAttributes

public void setAttributes(java.util.Map attrs)
Sets the attributes.

Parameters:
attrs - the new attributes

setRoles

public void setRoles(java.util.Collection rols)
Sets the roles.

Parameters:
rols - the new roles