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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This 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.boolean
Indicates whether the submitted credentials should be remembered.getRole()
Retrieves the submitted role.remember
(boolean remember) void
Sets the login to submit.void
setPassword
(String password) Sets the password to submit.void
setRemember
(boolean remember) Sets whether the submitted credentials should be remembered.void
Sets 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, validateGroup
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:MetaData
This 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:
activateMetaData
in classMetaData
-
getLogin
Description copied from interface:RoleUserCredentials
Retrieves the submitted login.- Specified by:
getLogin
in interfaceRoleUserCredentials
- Returns:
- the login
-
login
-
setLogin
Description copied from interface:RoleUserCredentials
Sets the login to submit.- Specified by:
setLogin
in interfaceRoleUserCredentials
- Parameters:
login
- the login
-
getPassword
Description copied from interface:RoleUserCredentials
Retrieves the submitted password.- Specified by:
getPassword
in interfaceRoleUserCredentials
- Returns:
- the password
-
password
-
setPassword
Description copied from interface:RoleUserCredentials
Sets the password to submit.- Specified by:
setPassword
in interfaceRoleUserCredentials
- Parameters:
password
- the password
-
getRole
Description copied from interface:RoleUserCredentials
Retrieves the submitted role.- Specified by:
getRole
in interfaceRoleUserCredentials
- Returns:
- the role
-
role
-
setRole
Description copied from interface:RoleUserCredentials
Sets the role to submit.- Specified by:
setRole
in interfaceRoleUserCredentials
- Parameters:
role
- the role
-
getRemember
public boolean getRemember()Description copied from interface:RememberMe
Indicates whether the submitted credentials should be remembered.- Specified by:
getRemember
in interfaceRememberMe
- Returns:
true
if the submitted credentials should be remembered; orfalse
otherwise
-
remember
-
setRemember
public void setRemember(boolean remember) Description copied from interface:RememberMe
Sets whether the submitted credentials should be remembered.- Specified by:
setRemember
in interfaceRememberMe
- Parameters:
remember
-true
if the submitted credentials should be remembered; orfalse
otherwise
-