Class User

  • All Implemented Interfaces:
    Serializable

    public class User
    extends PersistentObject
    implements Serializable
    This class represents a user. A user can be member of any number of groups, but it is always member of a special group named '_user_'+id. When a new user is created this special group of type 'user' is also created.
    Version:
    1.0
    Author:
    Michael Scholz, Marco Meschieri
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_DEFAULT

        public static int TYPE_DEFAULT
      • TYPE_SYSTEM

        public static int TYPE_SYSTEM
      • TYPE_READONLY

        public static int TYPE_READONLY
      • SOURCE_DEFAULT

        public static int SOURCE_DEFAULT
      • SOURCE_LDAP

        public static int SOURCE_LDAP
      • SOURCE_ACTIVE_DIRECTORY

        public static int SOURCE_ACTIVE_DIRECTORY
    • Constructor Detail

      • User

        public User()
    • Method Detail

      • getType

        public int getType()
      • setType

        public void setType​(int type)
      • getRepass

        public String getRepass()
      • setRepass

        public void setRepass​(String repass)
      • getUsername

        public String getUsername()
      • getPassword

        public String getPassword()
      • getName

        public String getName()
      • getFullName

        public String getFullName()
      • getInitials

        public String getInitials()
      • getFirstName

        public String getFirstName()
      • getStreet

        public String getStreet()
      • getPostalcode

        public String getPostalcode()
      • getCity

        public String getCity()
      • getCountry

        public String getCountry()
      • getLanguage

        public String getLanguage()
      • getEmail

        public String getEmail()
      • getTelephone

        public String getTelephone()
      • getGroupIds

        public long[] getGroupIds()
      • getGroupNames

        public String[] getGroupNames()
      • isMemberOf

        public boolean isMemberOf​(String groupName)
      • addGroup

        public void addGroup​(Group group)
      • removeGroup

        public void removeGroup​(long groupId)
      • removeGroupMemberships

        public void removeGroupMemberships​(String source)
        Removes the user from All groups except it's user's own group. You can restrict the deletion to a specified source
        Parameters:
        source - the source
      • setUsername

        public void setUsername​(String uname)
      • setPassword

        public void setPassword​(String pwd)
      • setDecodedPassword

        public void setDecodedPassword​(String pwd)
        Sets the password and encode it
        Parameters:
        pwd - The password in readable format
      • setName

        public void setName​(String name)
      • setFirstName

        public void setFirstName​(String firstName)
      • setStreet

        public void setStreet​(String str)
      • setPostalcode

        public void setPostalcode​(String pc)
      • setCity

        public void setCity​(String ct)
      • setCountry

        public void setCountry​(String cnt)
      • setLanguage

        public void setLanguage​(String lang)
      • setEmail

        public void setEmail​(String mail)
      • setTelephone

        public void setTelephone​(String phone)
      • reset

        public void reset()
      • getGroups

        public Set<Group> getGroups()
      • setGroups

        public void setGroups​(Set<Group> groups)
      • getUserGroupName

        public String getUserGroupName()
        The name of the group associated to this user, that is '_user_'+id
        Returns:
        name of the group that represents this user
      • getUserGroup

        public Group getUserGroup()
        Retrieves this user's group
        Returns:
        the group
      • getEnabled

        public int getEnabled()
      • setEnabled

        public void setEnabled​(int enabled)
      • getState

        public String getState()
      • setState

        public void setState​(String state)
      • getTelephone2

        public String getTelephone2()
      • setTelephone2

        public void setTelephone2​(String telephone2)
      • getLocale

        public Locale getLocale()
      • setLocale

        public void setLocale​(Locale locale)
      • getPasswordChanged

        public Date getPasswordChanged()
        When the password was modified
        Returns:
        when the password has been altered
      • setPasswordChanged

        public void setPasswordChanged​(Date passwordChanged)
      • getPasswordExpires

        public int getPasswordExpires()
        If the password expires or not
        Returns:
        1 if the password expires, 0 otherwise
      • setPasswordExpires

        public void setPasswordExpires​(int passwordExpires)
      • setSource

        public void setSource​(int source)
      • getQuota

        public long getQuota()
      • setQuota

        public void setQuota​(long quota)
      • getWelcomeScreen

        public Integer getWelcomeScreen()
      • setWelcomeScreen

        public void setWelcomeScreen​(Integer welcomeScreen)
      • getIpWhiteList

        public String getIpWhiteList()
      • setIpWhiteList

        public void setIpWhiteList​(String ipWhiteList)
      • getIpBlackList

        public String getIpBlackList()
      • setIpBlackList

        public void setIpBlackList​(String ipBlackList)
      • getPasswordExpired

        public int getPasswordExpired()
      • setPasswordExpired

        public void setPasswordExpired​(int passwordExpired)
      • getPasswordmd4

        public String getPasswordmd4()
      • setPasswordmd4

        public void setPasswordmd4​(String passwordmd4)
      • getDecodedPassword

        public String getDecodedPassword()
      • getEmailSignature

        public String getEmailSignature()
      • setEmailSignature

        public void setEmailSignature​(String emailSignature)
      • clearPassword

        public void clearPassword()
      • getDefaultWorkspace

        public Long getDefaultWorkspace()
      • setDefaultWorkspace

        public void setDefaultWorkspace​(Long defaultWorkspace)
      • getEmail2

        public String getEmail2()
      • setEmail2

        public void setEmail2​(String email2)
      • getEmailSignature2

        public String getEmailSignature2()
      • setEmailSignature2

        public void setEmailSignature2​(String emailSignature2)
      • setUserGroups

        public void setUserGroups​(Set<UserGroup> userGroups)
      • getCertExpire

        public Date getCertExpire()
      • setCertExpire

        public void setCertExpire​(Date certExpire)
      • getCertDN

        public String getCertDN()
      • setCertDN

        public void setCertDN​(String certDN)
      • getSecondFactor

        public String getSecondFactor()
      • setSecondFactor

        public void setSecondFactor​(String secondFactor)
      • getKey

        public String getKey()
      • setKey

        public void setKey​(String key)
      • isReadonly

        public boolean isReadonly()
      • getCreation

        public Date getCreation()
      • setCreation

        public void setCreation​(Date creation)
      • getDocsGrid

        public String getDocsGrid()
      • setDocsGrid

        public void setDocsGrid​(String docsGrid)
      • getHitsGrid

        public String getHitsGrid()
      • setHitsGrid

        public void setHitsGrid​(String hitsGrid)