Class LuteceUser

java.lang.Object
fr.paris.lutece.portal.service.security.LuteceUser
All Implemented Interfaces:
fr.paris.lutece.api.user.User, Serializable, Cloneable, Principal
Direct Known Subclasses:
BasicLuteceUser

public abstract class LuteceUser extends Object implements Principal, Serializable, Cloneable, fr.paris.lutece.api.user.User
This Interface defines all methods required for a Lutece user implementation
See Also:
  • Field Details

  • Constructor Details

    • LuteceUser

      public LuteceUser(String strUserName, LuteceAuthentication authenticationService)
      Constructor
      Parameters:
      strUserName - The User Name
      authenticationService - The PortalAuthentication object
  • Method Details

    • getUserInfos

      public final Map<String,String> getUserInfos()
      Gets the user info map
      Returns:
      The user info map
    • setUserInfo

      public final void setUserInfo(String key, String value)
      Add an user's info
      Parameters:
      key - The info key
      value - The info value
    • getUserInfo

      public final String getUserInfo(String key)
      Gets the user info value
      Parameters:
      key - The info key
      Returns:
      the user info value
    • equals

      public boolean equals(Object object)
      equals implementation
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
      Parameters:
      object - The object to compare
      Returns:
      true if equal, otherwise false
    • toString

      public String toString()
      toString implementation
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object
      Returns:
      The username
    • hashCode

      public int hashCode()
      hashCode implementation
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode
    • getName

      public String getName()
      Return the user's name
      Specified by:
      getName in interface Principal
      Returns:
      The username
    • setName

      public void setName(String strName)
      Sets the user's name
      Parameters:
      strName - The User name
    • getRoles

      public String[] getRoles()
      Returns user's roles
      Returns:
      Returns user's roles
    • getUserRoles

      public Map<String,fr.paris.lutece.api.user.UserRole> getUserRoles()
      Specified by:
      getUserRoles in interface fr.paris.lutece.api.user.User
    • addRoles

      public void addRoles(Collection<String> roles)
      add user's roles
      Parameters:
      roles - The User roles
    • setRoles

      public void setRoles(Collection<String> roles)
      Defines user's roles
      Parameters:
      roles - The User roles
    • getGroups

      public String[] getGroups()
      Returns user's groups
      Returns:
      Returns user's groups
    • addGroups

      public void addGroups(Collection<String> groups)
      add user's groups
      Parameters:
      groups - The User groups
    • setGroups

      public void setGroups(Collection<String> groups)
      Defines user's groups
      Parameters:
      groups - The User groups
    • setAuthenticationService

      public void setAuthenticationService(String strAuthenticationService)
      Defines the authentification service that had authentified the user
      Parameters:
      strAuthenticationService - The authentification service
    • getAuthenticationService

      public String getAuthenticationService()
      Returns the authentification service that had authentified the user
      Returns:
      the authentification service that had authentified the user
    • setAuthenticationType

      public void setAuthenticationType(String strAuthenticationType)
      Defines the authentification type that had authentified the user
      Parameters:
      strAuthenticationType - The authentification type
    • getAuthenticationType

      public String getAuthenticationType()
      Returns the authentification type that had authentified the user
      Returns:
      the authentification type that had authentified the user
    • getLuteceAuthenticationService

      public LuteceAuthentication getLuteceAuthenticationService()
      "Getter method" for _luteceAuthenticationService
      Returns:
      value of _luteceAuthenticationService
    • setLuteceAuthenticationService

      public void setLuteceAuthenticationService(LuteceAuthentication authenticationService)
      "Setter method" for _luteceAuthenticationService.
      Parameters:
      authenticationService - new value of _luteceAuthenticationService
    • clone

      public Object clone() throws CloneNotSupportedException
      Throws:
      CloneNotSupportedException
    • getEmail

      public String getEmail()
      Get the users email
      Specified by:
      getEmail in interface fr.paris.lutece.api.user.User
      Returns:
      The email
    • getAccessCode

      public String getAccessCode()
      Specified by:
      getAccessCode in interface fr.paris.lutece.api.user.User
    • getLastName

      public String getLastName()
      Specified by:
      getLastName in interface fr.paris.lutece.api.user.User
    • getFirstName

      public String getFirstName()
      Specified by:
      getFirstName in interface fr.paris.lutece.api.user.User
    • getUserWorkgroups

      public List<String> getUserWorkgroups()
      Specified by:
      getUserWorkgroups in interface fr.paris.lutece.api.user.User
    • getRealm

      public String getRealm()
      Specified by:
      getRealm in interface fr.paris.lutece.api.user.User