|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.AbstractUser info.magnolia.cms.security.MgnlUser
public class MgnlUser
This class wraps a user content object.
Field Summary |
---|
Fields inherited from class info.magnolia.cms.security.AbstractUser |
---|
subject |
Constructor Summary | |
---|---|
protected |
MgnlUser(Content userNode)
|
Method Summary | |
---|---|
void |
addGroup(java.lang.String groupName)
Adds this user to a group. |
void |
addRole(java.lang.String roleName)
Adds a role to this user. |
protected java.lang.String |
decodePassword(java.lang.String encodedPassword)
|
java.util.Collection<java.lang.String> |
getAllGroups()
Get all groups to which this user belongs to, collected recursively including. |
java.util.Collection<java.lang.String> |
getAllRoles()
Get all roles assigned to this user, collected recursively including groups/subgroups. |
int |
getFailedLoginAttempts()
|
java.util.Collection<java.lang.String> |
getGroups()
Get groups that are directly assigned to the user. |
java.lang.String |
getLanguage()
|
java.lang.String |
getName()
|
java.lang.String |
getPassword()
|
java.lang.String |
getProperty(java.lang.String propertyName)
Gets an arbitrary property from this user. |
java.util.Calendar |
getReleaseTime()
|
java.util.Collection<java.lang.String> |
getRoles()
Get roles that are directly assigned to the user. |
Content |
getUserNode()
|
boolean |
hasRole(java.lang.String roleName)
Is this user in a specified role? |
boolean |
inGroup(java.lang.String groupName)
Is this user in a specified role? |
boolean |
isEnabled()
Returns false if the user was explicitly disabled. |
void |
removeGroup(java.lang.String groupName)
Remove a group. |
void |
removeRole(java.lang.String roleName)
Remove a role. |
void |
setEnabled(boolean enabled)
|
void |
setFailedLoginAttempts(int failedAttempts)
|
void |
setLastAccess()
Update the "last access" timestamp. |
void |
setProperty(java.lang.String propertyName,
java.lang.String value)
Sets an arbitrary property for this user. |
void |
setReleaseTime(java.util.Calendar time)
|
Methods inherited from class info.magnolia.cms.security.AbstractUser |
---|
getSubject, setSubject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MgnlUser(Content userNode)
userNode
- the Content object representing this userMethod Detail |
---|
public int getFailedLoginAttempts()
public void setFailedLoginAttempts(int failedAttempts)
public java.util.Calendar getReleaseTime()
public void setReleaseTime(java.util.Calendar time)
public boolean inGroup(java.lang.String groupName)
inGroup
in interface User
groupName
- the name of the role
public void removeGroup(java.lang.String groupName) throws java.lang.UnsupportedOperationException
removeGroup
in interface User
groupName
-
java.lang.UnsupportedOperationException
public void addGroup(java.lang.String groupName) throws java.lang.UnsupportedOperationException
addGroup
in interface User
groupName
-
java.lang.UnsupportedOperationException
public boolean isEnabled()
User
isEnabled
in interface User
public void setEnabled(boolean enabled)
setEnabled
in interface User
public boolean hasRole(java.lang.String roleName)
hasRole
in interface User
roleName
- the name of the role
public void removeRole(java.lang.String roleName)
User
removeRole
in interface User
public void addRole(java.lang.String roleName)
User
addRole
in interface User
roleName
- the name of the rolepublic java.lang.String getName()
getName
in interface User
public java.lang.String getPassword()
getPassword
in interface User
protected java.lang.String decodePassword(java.lang.String encodedPassword)
public java.lang.String getLanguage()
getLanguage
in interface User
public java.lang.String getProperty(java.lang.String propertyName)
User
getProperty
in interface User
public void setProperty(java.lang.String propertyName, java.lang.String value)
User
setProperty
in interface User
public java.util.Collection<java.lang.String> getGroups()
User
getGroups
in interface User
public java.util.Collection<java.lang.String> getAllGroups()
User
getAllGroups
in interface User
public java.util.Collection<java.lang.String> getRoles()
User
getRoles
in interface User
public java.util.Collection<java.lang.String> getAllRoles()
User
getAllRoles
in interface User
public void setLastAccess()
public Content getUserNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |