Package rife.authentication.credentials
Class RoleUser
java.lang.Object
rife.validation.MetaData
rife.authentication.credentials.RoleUser
- All Implemented Interfaces:
Cloneable,Credentials,RememberMe,RoleUserCredentials,Constrained,MetaDataBeanAware,MetaDataMerged,Validated
Provides standard RoleUserCredentials functionalities by
implementing the property accessors and setting up basic validation rules.
These rules make the login and password mandatory and limit their length
according to the settings in RifeConfig.AuthenticationConfig.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called at least once and maximum once when any meta-data introspection logic is executed.getLogin()Retrieves the submitted login.Retrieves the submitted password.booleanIndicates whether the submitted credentials should be remembered.getRole()Retrieves the submitted role.remember(boolean remember) voidSets the login to submit.voidsetPassword(String password) Sets the password to submit.voidsetRemember(boolean remember) Sets whether the submitted credentials should be remembered.voidSets the role to submit.Methods inherited from class rife.validation.MetaData
addConstrainedPropertyRules, addConstraint, addConstraint, addGroup, addRule, addValidationError, clone, countValidationErrors, focusGroup, generateConstrainedPropertyRules, getConstrainedBean, getConstrainedProperties, getConstrainedProperty, getGroup, getGroups, getLoadingErrors, getRules, getValidatedSubjects, getValidationErrors, hasPropertyConstraint, isSubjectValid, limitSubjectErrors, makeErrorValid, makeSubjectValid, provideValidatedBean, replaceValidationErrors, resetGroup, resetValidation, retrieveMetaDataBean, retrieveValidatedBean, setMetaDataBean, unlimitSubjectErrors, validate, validate, validateGroup, validateGroupMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rife.validation.Validated
addConstrainedPropertyRules, addGroup, addRule, addValidationError, countValidationErrors, focusGroup, generateConstrainedPropertyRules, getGroup, getGroups, getLoadingErrors, getRules, getValidatedSubjects, getValidationErrors, isSubjectValid, limitSubjectErrors, makeErrorValid, makeSubjectValid, provideValidatedBean, replaceValidationErrors, resetGroup, resetValidation, retrieveValidatedBean, unlimitSubjectErrors, validate, validate, validateGroup, validateGroup
-
Constructor Details
-
RoleUser
public RoleUser() -
RoleUser
-
RoleUser
-
-
Method Details
-
activateMetaData
public void activateMetaData()Description copied from class:MetaDataThis method is called at least once and maximum once when any meta-data introspection logic is executed.You need to implement this method since it will be called after the underlying validation context has been initialized. Incidentally, by doing all your metadata setup here, you don't enforce a performance penalty at each object construction like when you do this in the default constructor.
- Overrides:
activateMetaDatain classMetaData
-
getLogin
Description copied from interface:RoleUserCredentialsRetrieves the submitted login.- Specified by:
getLoginin interfaceRoleUserCredentials- Returns:
- the login
-
login
-
setLogin
Description copied from interface:RoleUserCredentialsSets the login to submit.- Specified by:
setLoginin interfaceRoleUserCredentials- Parameters:
login- the login
-
getPassword
Description copied from interface:RoleUserCredentialsRetrieves the submitted password.- Specified by:
getPasswordin interfaceRoleUserCredentials- Returns:
- the password
-
password
-
setPassword
Description copied from interface:RoleUserCredentialsSets the password to submit.- Specified by:
setPasswordin interfaceRoleUserCredentials- Parameters:
password- the password
-
getRole
Description copied from interface:RoleUserCredentialsRetrieves the submitted role.- Specified by:
getRolein interfaceRoleUserCredentials- Returns:
- the role
-
role
-
setRole
Description copied from interface:RoleUserCredentialsSets the role to submit.- Specified by:
setRolein interfaceRoleUserCredentials- Parameters:
role- the role
-
getRemember
public boolean getRemember()Description copied from interface:RememberMeIndicates whether the submitted credentials should be remembered.- Specified by:
getRememberin interfaceRememberMe- Returns:
trueif the submitted credentials should be remembered; orfalseotherwise
-
remember
-
setRemember
public void setRemember(boolean remember) Description copied from interface:RememberMeSets whether the submitted credentials should be remembered.- Specified by:
setRememberin interfaceRememberMe- Parameters:
remember-trueif the submitted credentials should be remembered; orfalseotherwise
-