public interface User extends Principal, Serializable
Modifier and Type | Method and Description |
---|---|
default void |
addGroup(String groupName)
Deprecated.
since 4.5 - use
UserManager.addGroup(User, String) instead. |
default void |
addRole(String roleName)
Deprecated.
since 4.5 - use
UserManager.addRole(User, String) instead. |
Collection<String> |
getAllGroups()
Get all groups this user belongs to, collected recursively including supergroups.
|
Collection<String> |
getAllRoles()
Get all roles assigned to this user, collected recursively including groups and supergroups.
|
Collection<String> |
getGroups()
Get groups that are directly assigned to the user.
|
String |
getIdentifier()
Gets user identifier.
|
String |
getLanguage() |
String |
getName() |
String |
getPassword() |
String |
getProperty(String propertyName)
Gets an arbitrary property from this user.
|
Collection<String> |
getRoles()
Get roles that are directly assigned to the user.
|
boolean |
hasRole(String roleName)
Is this user in a specified role?
|
boolean |
inGroup(String groupName)
Is this user in a specified group?
|
boolean |
isEnabled()
Returns false if the user was explicitly disabled.
|
default void |
removeGroup(String groupName)
Deprecated.
since 4.5 - use
UserManager.removeGroup(User, String) instead. |
default void |
removeRole(String roleName)
Deprecated.
since 4.5 - use
UserManager.removeRole(User, String) instead. |
default void |
setEnabled(boolean enabled)
Deprecated.
since 4.5, use
UserManager.setProperty(User, String, Value) instead |
void |
setProperty(String propertyName,
String value)
Deprecated.
since 4.5, use
UserManager.setProperty(User, String, Value) instead |
boolean hasRole(String roleName)
roleName
- the name of the role@Deprecated default void removeRole(String roleName) throws UnsupportedOperationException
UserManager.removeRole(User, String)
instead.UnsupportedOperationException
@Deprecated default void addRole(String roleName) throws UnsupportedOperationException
UserManager.addRole(User, String)
instead.roleName
- the name of the roleUnsupportedOperationException
boolean inGroup(String groupName)
@Deprecated default void removeGroup(String groupName) throws UnsupportedOperationException
UserManager.removeGroup(User, String)
instead.UnsupportedOperationException
@Deprecated default void addGroup(String groupName) throws UnsupportedOperationException
UserManager.addGroup(User, String)
instead.UnsupportedOperationException
boolean isEnabled()
@Deprecated default void setEnabled(boolean enabled)
UserManager.setProperty(User, String, Value)
insteadString getLanguage()
String getPassword()
@Deprecated void setProperty(String propertyName, String value)
UserManager.setProperty(User, String, Value)
insteadString getIdentifier()
Collection<String> getGroups()
Collection<String> getAllGroups()
Collection<String> getRoles()
Collection<String> getAllRoles()
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.