Class UserConfig

    • Constructor Detail

      • UserConfig

        public UserConfig()
    • Method Detail

      • isPortalLogin

        public boolean isPortalLogin()
        Indicates if this user may be logged in normally by the portal's default authenticator.

        Users whose passwords are authenticated externally and should not use the password in the portal database must have this attribute set to false to prevent from being authenticated against the password stored in the portal database.

        Returns:
        if this user may be logged in normally by the portal's default authenticator.
        Since:
        4.0.8
      • setPortalLogin

        public void setPortalLogin​(boolean portalLogin)
        Sets if this user may be logged in normally by the portal's default authenticator.
        Parameters:
        portalLogin - the value to set.
        Since:
        4.0.8
        See Also:
        isPortalLogin()
      • getOrigin

        public String getOrigin()
        Returns the origin of this user. The origin is used to identify from where the user was added, for example, was imported from an external repository.
        Returns:
        the origin of this user. null indicates the user was added normally.
        Since:
        4.0.8
      • setOrigin

        public void setOrigin​(String origin)
        Sets the origin for this user.
        Parameters:
        origin - the origin to set.
        Since:
        4.0.8
        See Also:
        getOrigin()
      • isDisabled

        public boolean isDisabled()
      • setDisabled

        public void setDisabled​(boolean disabled)
      • getEmail

        @Deprecated
        public String getEmail()
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().getEmail().
      • setEmail

        @Deprecated
        public void setEmail​(String email)
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().setEmail().
      • getFirstName

        @Deprecated
        public String getFirstName()
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().getFirstName().
      • setFirstName

        @Deprecated
        public void setFirstName​(String firstName)
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().setFirstName().
      • getId

        public String getId()
      • setId

        public void setId​(String id)
      • getLastName

        @Deprecated
        public String getLastName()
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().getLastName().
      • setLastName

        @Deprecated
        public void setLastName​(String lastName)
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().setLastName().
      • getLogin

        public String getLogin()
      • setLogin

        public void setLogin​(String login)
      • getMiddleName

        @Deprecated
        public String getMiddleName()
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().getMiddleName().
      • setMiddleName

        @Deprecated
        public void setMiddleName​(String middleName)
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().setMiddleName().
      • isMultiSession

        public boolean isMultiSession()
      • setMultiSession

        public void setMultiSession​(boolean multiSession)
      • getPassword

        public String getPassword()
      • setPassword

        public void setPassword​(String password)
      • getType

        public int getType()
      • setType

        public void setType​(int type)
      • getChannelId

        public String getChannelId()
      • setChannelId

        public void setChannelId​(String channelId)
      • getProfileImageHref

        public String getProfileImageHref()
        Returns the href of this user profile image.
        Returns:
        the href of this user profile image.
        Since:
        8.0.0
      • setProfileImage

        public void setProfileImage​(InputStream imageStream,
                                    String mimeType)
                             throws PortalException
        Sets the profile image of the given user.
        Parameters:
        imageStream - an input stream of the image to set, or null if the current profile image, if any, is to be deleted. This stream will be consumed but not closed by this method.
        mimeType - the MIME type of the image. This parameter is ignored if imageStream is null.
        Throws:
        IllegalArgumentException - if the image stream parameter is not null and the mime type parameter is null.
        PortalException - if other error occur.
        Since:
        8.0.0
      • getFullName

        @Deprecated
        public String getFullName()
        Deprecated.
        Since 12.0.0, due to introduction of trusted and untrusted properties, replaced by getTrustedProperties().getFullName().
      • getLastLogin

        public Date getLastLogin()
        Returns the date and time of last login for this user.
        Returns:
        the date, or null if this user never logged in.
        Since:
        6.2.0
      • getVisitorId

        public long getVisitorId()
        Returns the visitor identifier of this user.
        Returns:
        the visitor identifier.
        Throws:
        IllegalStateException - if this user was not persisted or obtained using IUserManager, so its visitor identifier was not generated, or if this user is the special guest user.
        Since:
        12.0.0
      • getFriendlyId

        public String getFriendlyId()
        Returns the friendly identifier of this user.
        Returns:
        the friendly identifier.
        Since:
        12.0.0
      • getTrustedProperties

        public IUserProperties getTrustedProperties()
        Returns this user's trusted properties. The trusted properties represents properties provided by trusted sources such as an authenticated user and always overwrites any corresponding untrusted property.
        Returns:
        the trusted properties.
        Since:
        12.0.0
        See Also:
        getUntrustedProperties(), getProperties()
      • getUntrustedProperties

        public IUserProperties getUntrustedProperties()
        Returns this user's untrusted properties. The untrusted properties represents properties provided by untrusted sources such as unauthenticated information collected by user monitoring. It is always overwritten by corresponding untrusted property.
        Returns:
        the untrusted properties.
        Since:
        12.0.0
        See Also:
        getTrustedProperties(), getProperties()
      • getProperties

        public IUserPropertiesReadOnly getProperties()
        Returns a read-only view of this user's properties, merging trusted and untrusted properties.
        Returns:
        the properties.
        Since:
        12.0.0