Class User
java.lang.Object
com.saperion.ngc.model.authorization.User
- All Implemented Interfaces:
Serializable
Bean used to store user-information in the current session.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUser(com.saperion.intf.SaUserInfo userInfo, AuthenticationInformation auth) Creates a new user from a userinfo object.Creates a new user with only the authentication information set.User(com.saperion.users.UserName userName, int uid, boolean isPresent, AuthenticationInformation auth, com.saperion.users.UserFlags userFlags, int mandantId) Literal constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActiveSession(com.saperion.connector.authentication.Session activeSession) Add the givenSessionto active session listList<com.saperion.connector.authentication.Session>com.saperion.connector.authentication.Sessioncom.saperion.users.UserFlagsgetFlags()intgetId()intcom.saperion.users.UserNamegetName()static UserbooleanbooleanmergePassword(String newPassword) mergeShortName(String shortName) voidsetCurrentSession(com.saperion.connector.authentication.Session currentSession) Set the current sessionvoidsetPresent(boolean isPresent) Sets the present-property.voidsetTechnical(boolean technical) Sets the technical property.voidsetWfAllowSubstAccess(boolean accessEnabled) Sets whether the user's substitute has access to the users workflow-inbox.toString()
-
Constructor Details
-
User
public User(com.saperion.users.UserName userName, int uid, boolean isPresent, AuthenticationInformation auth, com.saperion.users.UserFlags userFlags, int mandantId) Literal constructor.- Parameters:
userName- The users nameuid- The users unique idisPresent- Whether the user is presentauth- The information how the user logged in.mandantId- MandantIduserFlags- flags for the user
-
User
Creates a new user from a userinfo object.- Parameters:
userInfo- detailed user informationauth- The information how the user logged in
-
User
Creates a new user with only the authentication information set.- Parameters:
auth- authentication information
-
-
Method Details
-
getName
public com.saperion.users.UserName getName()- Returns:
- the name of the user
-
getId
public int getId()- Returns:
- the unique id of the user
-
getMandantId
public int getMandantId()- Returns:
- the unique id of the mandant
-
isPresent
public boolean isPresent()- Returns:
- whether the user is present
-
setPresent
public void setPresent(boolean isPresent) Sets the present-property.- Parameters:
isPresent- if the user is present or not
-
getAuthenticationInformation
- Returns:
- the information how the user logged in
-
getFlags
public com.saperion.users.UserFlags getFlags()- Returns:
- detailed information about user options
-
invalidUser
- Returns:
- an invalid user instance
-
mergeShortName
- Parameters:
shortName- the new short name- Returns:
- an User instance that equals this in every member expcept the displayname (and the login name) which is given.
-
mergePassword
- Parameters:
newPassword- The new password- Returns:
- A User instance that equals is in every member except for the password.
-
setWfAllowSubstAccess
public void setWfAllowSubstAccess(boolean accessEnabled) Sets whether the user's substitute has access to the users workflow-inbox.- Parameters:
accessEnabled- if the substitute has access
-
toString
-
isTechnical
public boolean isTechnical()- Returns:
- true if this is a technical user
-
setTechnical
public void setTechnical(boolean technical) Sets the technical property.- Parameters:
technical- set to true if this is a technical user
-
getCurrentSession
public com.saperion.connector.authentication.Session getCurrentSession()- Returns:
- The current user session
-
setCurrentSession
public void setCurrentSession(com.saperion.connector.authentication.Session currentSession) Set the current session- Parameters:
currentSession-
-
getActiveSessions
- Returns:
- The other active
Sessions of the user
-
addActiveSession
public void addActiveSession(com.saperion.connector.authentication.Session activeSession) Add the givenSessionto active session list- Parameters:
activeSession-
-