Package org.onehippo.repository.security
Interface User
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
SessionDelegateUser
,SessionUser
Represents a user in the repository.
-
Method Summary
Modifier and TypeMethodDescriptiongetEmail()
Get the email property of this user.Get the first name property of this user.getId()
Get the id of the user.Get the last login property of this user.Get the last name property of this user.Get the immutable set ofGroup identities
this user is a member of, which can be used to lookup the referencedGroup
object(s) throughSecurityService.getGroup(String)
.getProperty
(String propertyName) Get an additional user property by name.Get the names of the available additional user properties (with a value type String)Get the directly assigned user role names for this user.boolean
isActive()
Whether this user is marked as active.boolean
Whether this is an external userboolean
Whether this user is marked as a system User (which is something totally different than aJCR System Session
having all privileges everywhere).
-
Method Details
-
getId
String getId()Get the id of the user.- Returns:
- the id of the user
-
isSystemUser
boolean isSystemUser()Whether this user is marked as a system User (which is something totally different than aJCR System Session
having all privileges everywhere).When
isSystemUser()
returnstrue
it means that the user is required for the running system, for example the 'liveuser' in case of the delivery tier.- Returns:
- whether this user is marked as user required by the system (not whether this user is a JCR System Session)
-
isActive
boolean isActive()Whether this user is marked as active.- Returns:
- whether this user is marked as active.
-
isExternal
boolean isExternal()Whether this is an external user- Returns:
- whether this is an external user
-
getMemberships
Get the immutable set ofGroup identities
this user is a member of, which can be used to lookup the referencedGroup
object(s) throughSecurityService.getGroup(String)
.- Returns:
- the mutable set of
Group identities
this user is a member of.
-
getUserRoles
Get the directly assigned user role names for this user.The user role names are not resolved, nor include possible implied user roles names
- Returns:
- the directly assigned user role names
-
getFirstName
String getFirstName()Get the first name property of this user.- Returns:
- the first name property of this user or
null
if not present
-
getLastName
String getLastName()Get the last name property of this user.- Returns:
- the last name property of this user or
null
if not present
-
getEmail
String getEmail()Get the email property of this user.- Returns:
- the email property of this user or
null
if not present
-
getLastLogin
Calendar getLastLogin()Get the last login property of this user.- Returns:
- the last login property of this user or
null
if not present
-
getPropertyNames
Get the names of the available additional user properties (with a value type String)- Returns:
- the names of the available additional user properties (with a value type String)
- See Also:
-
getProperty
Get an additional user property by name.Only single properties of type String, Boolean, Date, Double or Long are returned, while internal properties are hidden.
- Returns:
- the additional property of the user identified by
propertyName
, ornull
if not present/available
-