public class User
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
User_java_copyright |
static java.lang.String |
User_java_sourceCodeID |
Constructor and Description |
---|
User(RgyUser user) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAttribute(java.lang.String attrName,
java.lang.Object value)
Set an attribute to a single value.
|
boolean |
addAttribute(java.lang.String attrName,
java.lang.Object[] values)
Set an attribute to the given values.
|
boolean |
addToGroup(java.lang.String groupName)
Add a user to the given group.
|
boolean |
attributeExists(java.lang.String attrName)
check if a user has an attribute
|
boolean |
authenticate(java.lang.String password)
Attempts to authenticate a user.
|
boolean |
changePassword(java.lang.String oldPassword,
java.lang.String newPassword)
Attempt to change a password, requiring the old password Will clear the
error message of this user if successful.
|
void |
clearError()
Remove the error state of this object
|
java.lang.Object |
getAttribute(java.lang.String attrName) |
java.lang.String[] |
getAttributeNames()
Fetch all values for an attribute.
|
java.lang.Object[] |
getAttributes(java.lang.String attrName)
Fetch a single attribute value.
|
java.lang.String |
getErrMessage()
Get the error message of the last operation.
|
java.lang.String[] |
getGroups()
Get the groups of this user
Will clear the error message of this user if successful.
|
java.lang.String |
getId()
Get the users ID.
|
java.lang.String[] |
getNativeGroups()
Get the natvie groups of this user
Will clear the error message of this user if successful.
|
java.lang.String |
getNativeId()
Get the users native ID.
|
boolean |
isAccountDisabled() |
boolean |
isAccountLocked() |
boolean |
isAccountValid() |
boolean |
isCredentialsValid() |
boolean |
isPasswordCharsValid() |
boolean |
isPasswordContainsRepeatedChars() |
boolean |
isPasswordContainsSpaces() |
boolean |
isPasswordExpiringSoon() |
boolean |
isPasswordMissingAlphaChars() |
boolean |
isPasswordMissingNonAlphaChars() |
boolean |
isPasswordTooShort() |
boolean |
isPasswordValid() |
boolean |
isValidTimeOfDayAccess() |
boolean |
removeAttribute(java.lang.String attrName)
Remove an attribute from this user
|
boolean |
removeFromGroup(java.lang.String groupName)
Remove a user from the given group.
|
boolean |
replaceAttribute(java.lang.String attrName,
java.lang.Object value)
Set an attribute to a single value.
|
boolean |
replaceAttribute(java.lang.String attrName,
java.lang.Object[] values)
Set an attribute to the given values.
|
boolean |
setPassword(java.lang.String newPassword)
Will clear the error message of this user if successful.
|
boolean |
wasAccountJustDisabled() |
boolean |
wasAccountJustLocked() |
boolean |
wasOldPasswordValid() |
public static final java.lang.String User_java_sourceCodeID
public static final java.lang.String User_java_copyright
public boolean isAccountDisabled()
public boolean isAccountLocked()
public boolean wasAccountJustLocked()
public boolean wasAccountJustDisabled()
public boolean isCredentialsValid()
public boolean isAccountValid()
public boolean isPasswordValid()
public boolean isValidTimeOfDayAccess()
public boolean isPasswordExpiringSoon()
public boolean wasOldPasswordValid()
public boolean isPasswordCharsValid()
public boolean isPasswordContainsSpaces()
public boolean isPasswordContainsRepeatedChars()
public boolean isPasswordTooShort()
public boolean isPasswordMissingAlphaChars()
public boolean isPasswordMissingNonAlphaChars()
public java.lang.String getErrMessage()
public void clearError()
public boolean authenticate(java.lang.String password)
password
- users password to checkpublic boolean changePassword(java.lang.String oldPassword, java.lang.String newPassword)
oldPassword
- the users valid old passwordnewPassword
- the new password to use if the old password validates
successfully.public boolean setPassword(java.lang.String newPassword)
newPassword
- new passwordpublic java.lang.String getNativeId()
public java.lang.String getId()
public java.lang.String[] getGroups()
public java.lang.String[] getNativeGroups()
public boolean attributeExists(java.lang.String attrName)
attrName
- name of the attribute to check forpublic java.lang.Object getAttribute(java.lang.String attrName)
attrName
- public java.lang.Object[] getAttributes(java.lang.String attrName)
attrName
- Name of the attribute to retrieve.public java.lang.String[] getAttributeNames()
attrName
- Name of the attributes to retrievepublic boolean removeAttribute(java.lang.String attrName)
attrName
- name of the attribute to removepublic boolean addAttribute(java.lang.String attrName, java.lang.Object value)
attrName
- Name of the attribute to set.value
- name of the value to set.public boolean addAttribute(java.lang.String attrName, java.lang.Object[] values)
attrName
- Name of the attribute to set.values
- name of the values to set.public boolean replaceAttribute(java.lang.String attrName, java.lang.Object value)
attrName
- Name of the attribute to set.value
- name of the value to set.public boolean replaceAttribute(java.lang.String attrName, java.lang.Object[] values)
attrName
- Name of the attribute to set.values
- name of the values to set.public boolean addToGroup(java.lang.String groupName)
groupName
- name of the group to add the user topublic boolean removeFromGroup(java.lang.String groupName)
groupName
- name of the group to remove the user from.