Class UserBean
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactivateUserAccountAction.void
agreeToTermsOfUse.void
createBackupOfCurrentUser.Creates and persists a new local User.Getter for the fieldactivationKey
.Returns a list of all existing users (minus the superusers and the current user).Getter for the fieldauthenticationProvider
.getAuthenticationProviderName.Getter for the fieldauthenticationProviders
.getEmail()
Getter for the fieldemail
.Checks whether the logged in user has access to the admin backend via being an admin or having CMS/campaign/comments access.Getter for the fieldlastName
.getLocalAuthenticationProvider.Getter for the fieldnickName
.int
getNumberOfProviderTypes.Getter for the fieldpassword
.Getter for the fieldpasswordOne
.Getter for the fieldpasswordTwo
.getProvidersOfType
(String type) getProvidersOfType.Getter for the fieldredirectUrl
.getSessionTimeout.Getter for the fieldtranskribusPassword
.Getter for the fieldtranskribusUserName
.getUser()
Getter for the fielduser
.getXserviceAuthenticationProvider.boolean
hasProvidersOfType
(String type) hasProvidersOfType.boolean
isAdmin()
isAdmin.boolean
isAllowEmailChange.boolean
isAllowNickNameChange.boolean
isAllowPasswordChange.boolean
isLoggedIn.boolean
isRequireLoginCaptcha.boolean
isShowOpenId.boolean
isUserRegistrationEnabled.login()
Login action method for local accounts.login
(IAuthenticationProvider provider) login.logout()
Logout action method.void
logoutWithMessage
(String messageKey) logoutWithMessage.boolean
Check if the current user is required to agree to the terms of usevoid
rejectTermsOfUse.Generates a new user password if the key is correct.void
resetPasswordFields.Sends a password reset link to the current e-mail address.void
setActivationKey
(String activationKey) Setter for the fieldactivationKey
.void
Setter for the fieldauthenticationProvider
.void
setAuthenticationProviderName.void
Setter for the fieldemail
.void
setHasAdminBackendAccess
(Boolean hasAdminBackendAccess) Setter for the fieldhasAdminBackendAccess
.void
setLastName
(String lastName) Setter for the fieldlastName
.void
setNickName
(String nickName) Setter for the fieldnickName
.void
setPassword
(String password) Setter for the fieldpassword
.void
setPasswordOne
(String passwordOne) Setter for the fieldpasswordOne
.void
setPasswordTwo
(String passwordTwo) Setter for the fieldpasswordTwo
.void
setRedirectUrl
(String redirectUrl) Setter for the fieldredirectUrl
.void
setTranskribusPassword
(String transkribusPassword) Setter for the fieldtranskribusPassword
.void
setTranskribusUserName
(String transkribusUserName) Setter for the fieldtranskribusUserName
.void
Setter for the fielduser
.boolean
showAuthenticationProviderSelection.transkribusLoginAction.void
updateSessionTimeoutCounter.boolean
userEquals
(long id) userEquals.void
wipeSession
(javax.servlet.http.HttpServletRequest request) Removes the user and permission attributes from the session.
-
Constructor Details
-
UserBean
public UserBean()Empty constructor.
-
-
Method Details
-
updateSessionTimeoutCounter
public void updateSessionTimeoutCounter()updateSessionTimeoutCounter.
-
getSessionTimeout
getSessionTimeout.
- Returns:
- a
String
object
-
createNewUserAccount
Creates and persists a new local User.- Returns:
- a
String
object. - Throws:
DAOException
- if any.
-
activateUserAccountAction
activateUserAccountAction.
- Returns:
- a
String
object. - Throws:
DAOException
- if any.
-
login
public String login() throws AuthenticationProviderException, IllegalStateException, InterruptedException, ExecutionExceptionLogin action method for local accounts.- Returns:
- the url mapping to navigate to
- Throws:
AuthenticationProviderException
- if any.IllegalStateException
- if any.InterruptedException
- if any.ExecutionException
- if any.
-
login
public String login(IAuthenticationProvider provider) throws AuthenticationProviderException, IllegalStateException, InterruptedException, ExecutionException login.
- Parameters:
provider
- aIAuthenticationProvider
object.- Returns:
- a
String
object. - Throws:
IllegalStateException
- if any.AuthenticationProviderException
- if any.InterruptedException
- if any.ExecutionException
- if any.
-
logout
Logout action method.- Returns:
- a
String
object. - Throws:
AuthenticationProviderException
- if any.
-
wipeSession
public void wipeSession(javax.servlet.http.HttpServletRequest request) throws IndexUnreachableException, PresentationException, DAOException Removes the user and permission attributes from the session.- Parameters:
request
- aHttpServletRequest
object.- Throws:
IndexUnreachableException
- if any.PresentationException
- if any.DAOException
- if any.
-
getAllUsers
Returns a list of all existing users (minus the superusers and the current user).- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
sendPasswordResetLinkAction
Sends a password reset link to the current e-mail address.- Returns:
- a
String
object. - Throws:
DAOException
- if any.
-
resetPasswordAction
Generates a new user password if the key is correct.- Returns:
- a
String
object. - Throws:
DAOException
- if any.
-
transkribusLoginAction
transkribusLoginAction.
- Returns:
- a
String
object.
-
getUser
Getter for the field
user
.- Returns:
- the user
-
setUser
Setter for the field
user
.- Parameters:
user
- the user to set
-
getNickName
Getter for the field
nickName
.- Returns:
- the nickName
-
setNickName
Setter for the field
nickName
.- Parameters:
nickName
- the nickName to set
-
getEmail
Getter for the field
email
.- Returns:
- the email
-
setEmail
Setter for the field
email
.- Parameters:
email
- the email to set
-
getPassword
Getter for the field
password
.- Returns:
- the password
-
setPassword
Setter for the field
password
.- Parameters:
password
- the password to set
-
isLoggedIn
public boolean isLoggedIn()isLoggedIn.
- Returns:
- a boolean.
-
isAdmin
public boolean isAdmin()isAdmin.
- Returns:
- a boolean.
-
isUserRegistrationEnabled
public boolean isUserRegistrationEnabled()isUserRegistrationEnabled.
- Returns:
- a boolean.
-
isShowOpenId
public boolean isShowOpenId()isShowOpenId.
- Returns:
- a boolean.
-
getAuthenticationProviders
Getter for the field
authenticationProviders
.- Returns:
- a
List
object.
-
getLocalAuthenticationProvider
getLocalAuthenticationProvider.
- Returns:
- a
IAuthenticationProvider
object.
-
getXserviceAuthenticationProvider
getXserviceAuthenticationProvider.
- Returns:
- a
IAuthenticationProvider
object.
-
showAuthenticationProviderSelection
public boolean showAuthenticationProviderSelection()showAuthenticationProviderSelection.
- Returns:
- a boolean
-
setAuthenticationProvider
Setter for the field
authenticationProvider
.- Parameters:
provider
- aIAuthenticationProvider
object.
-
getAuthenticationProvider
Getter for the field
authenticationProvider
.- Returns:
- a
IAuthenticationProvider
object.
-
setAuthenticationProviderName
setAuthenticationProviderName.
- Parameters:
name
- aString
object.
-
getAuthenticationProviderName
getAuthenticationProviderName.
- Returns:
- a
String
object.
-
getPasswordOne
Getter for the field
passwordOne
.- Returns:
- a
String
object.
-
setPasswordOne
Setter for the field
passwordOne
.- Parameters:
passwordOne
- aString
object.
-
getPasswordTwo
Getter for the field
passwordTwo
.- Returns:
- a
String
object.
-
setPasswordTwo
Setter for the field
passwordTwo
.- Parameters:
passwordTwo
- aString
object.
-
resetPasswordFields
public void resetPasswordFields()resetPasswordFields.
-
getLastName
Getter for the field
lastName
.- Returns:
- the lastName
-
setLastName
Setter for the field
lastName
.- Parameters:
lastName
- the lastName to set
-
getRedirectUrl
Getter for the field
redirectUrl
.- Returns:
- the redirectUrl
-
setRedirectUrl
Setter for the field
redirectUrl
.- Parameters:
redirectUrl
- the redirectUrl to set
-
getActivationKey
Getter for the field
activationKey
.- Returns:
- the activationKey
-
setActivationKey
Setter for the field
activationKey
.- Parameters:
activationKey
- the activationKey to set
-
getTranskribusUserName
Getter for the field
transkribusUserName
.- Returns:
- the transkribusUserName
-
setTranskribusUserName
Setter for the field
transkribusUserName
.- Parameters:
transkribusUserName
- the transkribusUserName to set
-
getTranskribusPassword
Getter for the field
transkribusPassword
.- Returns:
- the transkribusPassword
-
setTranskribusPassword
Setter for the field
transkribusPassword
.- Parameters:
transkribusPassword
- the transkribusPassword to set
-
getHasAdminBackendAccess
public Boolean getHasAdminBackendAccess() throws PresentationException, IndexUnreachableException, DAOExceptionChecks whether the logged in user has access to the admin backend via being an admin or having CMS/campaign/comments access. Result is persisted for the duration of the session.- Returns:
- the hasAdminBackendAccess
- Throws:
DAOException
IndexUnreachableException
PresentationException
-
setHasAdminBackendAccess
Setter for the field
hasAdminBackendAccess
.- Parameters:
hasAdminBackendAccess
- the hasAdminBackendAccess to set
-
userEquals
public boolean userEquals(long id) userEquals.
- Parameters:
id
- a long.- Returns:
- a boolean.
-
hasProvidersOfType
hasProvidersOfType.
- Parameters:
type
- aString
object.- Returns:
- a boolean.
-
getProvidersOfType
getProvidersOfType.
-
getNumberOfProviderTypes
public int getNumberOfProviderTypes()getNumberOfProviderTypes.
- Returns:
- a int.
-
isAllowPasswordChange
public boolean isAllowPasswordChange()isAllowPasswordChange.
- Returns:
- a boolean.
-
isAllowNickNameChange
public boolean isAllowNickNameChange()isAllowNickNameChange.
- Returns:
- a boolean.
-
isAllowEmailChange
public boolean isAllowEmailChange()isAllowEmailChange.
- Returns:
- a boolean.
-
isRequireLoginCaptcha
public boolean isRequireLoginCaptcha()isRequireLoginCaptcha.
- Returns:
- a boolean
-
mustAgreeToTermsOfUse
public boolean mustAgreeToTermsOfUse()Check if the current user is required to agree to the terms of use- Returns:
- true if a user is logged in and
User.isAgreedToTermsOfUse()
returns false for this user
-
agreeToTermsOfUse
agreeToTermsOfUse.
- Throws:
DAOException
- if any.
-
rejectTermsOfUse
rejectTermsOfUse.
- Throws:
DAOException
- if any.
-
logoutWithMessage
logoutWithMessage.
- Parameters:
messageKey
- aString
object- Throws:
AuthenticationProviderException
- if any.
-
createBackupOfCurrentUser
public void createBackupOfCurrentUser()createBackupOfCurrentUser.
-