Package org.onehippo.repository.security
Interface User
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
SessionDelegateUser
,SessionUser
public interface User extends Serializable
Represents a user in the repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getEmail()
Get the email property of this user.String
getFirstName()
Get the first name property of this user.String
getId()
Get the id of the user.Calendar
getLastLogin()
Get the last login property of this user.String
getLastName()
Get the last name property of this user.Set<String>
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)
.String
getProperty(String propertyName)
Get an additional user property by name.Set<String>
getPropertyNames()
Get the names of the available additional user properties (with a value type String)Set<String>
getUserRoles()
Get the directly assigned user role names for this user.boolean
isActive()
Whether this user is marked as active.boolean
isExternal()
Whether this is an external userboolean
isSystemUser()
Whether this user is marked as a system User (which is something totally different than aJCR System Session
having all privileges everywhere).
-
-
-
Method Detail
-
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
Set<String> 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
Set<String> 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
Set<String> 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(String)
-
getProperty
String getProperty(String propertyName)
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
-
-