Class UserBean
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateUserAccountAction.voidagreeToTermsOfUse.voidcreateBackupOfCurrentUser.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.intgetNumberOfProviderTypes.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.booleanhasProvidersOfType(String type) hasProvidersOfType.booleanisAdmin()isAdmin.booleanisAllowEmailChange.booleanisAllowNickNameChange.booleanisAllowPasswordChange.booleanbooleanisLoggedIn.booleanisRequireLoginCaptcha.booleanisShowOpenId.booleanisUserRegistrationEnabled.login()Login action method for local accounts.login(IAuthenticationProvider provider) login.logout()Logout action method.voidlogoutWithMessage(String messageKey) logoutWithMessage.booleanCheck if the current user is required to agree to the terms of usevoidrejectTermsOfUse.Generates a new user password if the key is correct.voidresetPasswordFields.Sends a password reset link to the current e-mail address.voidsetActivationKey(String activationKey) Setter for the fieldactivationKey.voidSetter for the fieldauthenticationProvider.voidsetAuthenticationProviderName.voidSetter for the fieldemail.voidsetHasAdminBackendAccess(Boolean hasAdminBackendAccess) Setter for the fieldhasAdminBackendAccess.voidsetLastName(String lastName) Setter for the fieldlastName.voidsetNickName(String nickName) Setter for the fieldnickName.voidvoidsetPassword(String password) Setter for the fieldpassword.voidsetPasswordOne(String passwordOne) Setter for the fieldpasswordOne.voidsetPasswordTwo(String passwordTwo) Setter for the fieldpasswordTwo.voidsetRedirectUrl(String redirectUrl) Setter for the fieldredirectUrl.voidsetTranskribusPassword(String transkribusPassword) Setter for the fieldtranskribusPassword.voidsetTranskribusUserName(String transkribusUserName) Setter for the fieldtranskribusUserName.voidSetter for the fielduser.booleanshowAuthenticationProviderSelection.transkribusLoginAction.voidupdateSessionTimeoutCounter.booleanuserEquals(long id) userEquals.
-
Constructor Details
-
UserBean
public UserBean()Empty constructor.
-
-
Method Details
-
updateSessionTimeoutCounter
public void updateSessionTimeoutCounter()updateSessionTimeoutCounter.
-
getSessionTimeout
getSessionTimeout.
- Returns:
- a
Stringobject
-
createNewUserAccount
Creates and persists a new local User.- Returns:
- a
Stringobject. - Throws:
DAOException- if any.
-
activateUserAccountAction
activateUserAccountAction.
- Returns:
- a
Stringobject. - 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- aIAuthenticationProviderobject.- Returns:
- a
Stringobject. - Throws:
IllegalStateException- if any.AuthenticationProviderException- if any.InterruptedException- if any.ExecutionException- if any.
-
logout
Logout action method.- Returns:
- a
Stringobject. - Throws:
AuthenticationProviderException- if any.
-
getAllUsers
Returns a list of all existing users (minus the superusers and the current user).- Returns:
- a
Listobject. - Throws:
DAOException- if any.
-
sendPasswordResetLinkAction
Sends a password reset link to the current e-mail address.- Returns:
- a
Stringobject. - Throws:
DAOException- if any.
-
resetPasswordAction
Generates a new user password if the key is correct.- Returns:
- a
Stringobject. - Throws:
DAOException- if any.
-
transkribusLoginAction
transkribusLoginAction.
- Returns:
- a
Stringobject.
-
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.
-
isCloseTabAfterLogin
public boolean isCloseTabAfterLogin() -
getAuthenticationProviders
Getter for the field
authenticationProviders.- Returns:
- a
Listobject.
-
getLocalAuthenticationProvider
getLocalAuthenticationProvider.
- Returns:
- a
IAuthenticationProviderobject.
-
getXserviceAuthenticationProvider
getXserviceAuthenticationProvider.
- Returns:
- a
IAuthenticationProviderobject.
-
showAuthenticationProviderSelection
public boolean showAuthenticationProviderSelection()showAuthenticationProviderSelection.
- Returns:
- a boolean
-
setAuthenticationProvider
Setter for the field
authenticationProvider.- Parameters:
provider- aIAuthenticationProviderobject.
-
getAuthenticationProvider
Getter for the field
authenticationProvider.- Returns:
- a
IAuthenticationProviderobject.
-
setAuthenticationProviderName
setAuthenticationProviderName.
- Parameters:
name- aStringobject.
-
getAuthenticationProviderName
getAuthenticationProviderName.
- Returns:
- a
Stringobject.
-
getPasswordOne
Getter for the field
passwordOne.- Returns:
- a
Stringobject.
-
setPasswordOne
Setter for the field
passwordOne.- Parameters:
passwordOne- aStringobject.
-
getPasswordTwo
Getter for the field
passwordTwo.- Returns:
- a
Stringobject.
-
setPasswordTwo
Setter for the field
passwordTwo.- Parameters:
passwordTwo- aStringobject.
-
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
-
getOrigin
- Returns:
- the origin
-
setOrigin
- Parameters:
origin- the origin 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:
DAOExceptionIndexUnreachableExceptionPresentationException
-
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- aStringobject.- 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- aStringobject- Throws:
AuthenticationProviderException- if any.
-
createBackupOfCurrentUser
public void createBackupOfCurrentUser()createBackupOfCurrentUser.
-