Interface User

All Superinterfaces:
Serializable
All Known Subinterfaces:
SessionDelegateUser, SessionUser

public interface User extends Serializable
Represents a user in the repository.
  • 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 a JCR System Session having all privileges everywhere).

      When isSystemUser() returns true 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 of Group identities this user is a member of, which can be used to lookup the referenced Group object(s) through SecurityService.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 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, or null if not present/available