Interface IUser

All Superinterfaces:
IAdaptable, IChangeListener, IHasCustomValues, IHasValues, IPObject
All Known Subinterfaces:
ITrackerUser

public interface IUser extends IPObject
The model representation of user.
Author:
dobisekm
  • Field Details

  • Method Details

    • getId

      @NotNull String getId()
      The actual ID of the user. The same as getLoginName(). This method can be used even when the user is unresolvable.
      See Also:
    • getLoginName

      String getLoginName()
      The same as getId(). This is just a bussiness method - facade for getId(), there is no loginName field.
      Returns:
      the ID
    • getName

      String getName()
    • getLabel

      @NotNull String getLabel()
      Returns the name of the user, unless the name is empty or the user is unresolvable, in which case it returns the user ID.
      Since:
      3.8.2
      See Also:
    • setName

      void setName(String name)
    • getEmail

      String getEmail()
    • setEmail

      void setEmail(String email)
    • getDescription

      Text getDescription()
    • setDescription

      void setDescription(Text description)
    • getInitials

      String getInitials()
      Since:
      3.5.0
    • setInitials

      void setInitials(String initials)
      Since:
      3.5.0
    • isDisabled

      boolean isDisabled()
    • getAvatarURL

      String getAvatarURL()
      Returns avatar image URL, which can be either the user uploaded image or reference to external image or to default image. The URL may be absolute, or relative to portal base URL. Does not throw UnresolvableObjectException or PermissionDeniedException when this user is unresolvable, not yet persisted or if current user has no read permission.
      Returns:
      avatar URL, never null
      Since:
      3.6.0
    • setAvatarFileData

      void setAvatarFileData(String sourceFileName, InputStream data)
      Sets custom avatar for the user. Calls IPObject.save() internally.
      Parameters:
      sourceFileName - name of the file with avatar
      data - avatar data stream
      Since:
      3.6.0
    • hasAvatarFile

      boolean hasAvatarFile()
      Returns:
      true if user has custom avatar
      Since:
      3.6.0
    • removeAvatarFile

      void removeAvatarFile()
      Removes custom avatar. Calls IPObject.save() internally.
      Since:
      3.6.0
    • getAvatarFileData

      InputStream getAvatarFileData()
      Returns:
      avatar data stream, or null if the user does not have custom avatar
      Since:
      3.6.0
    • hasDisabledNotifications

      boolean hasDisabledNotifications()
      Returns:
      true if user has disabled notifications
      Since:
      3.6.1
    • setDisabledNotifications

      void setDisabledNotifications(boolean disabled)
      Disable/Enable notifications for the user.
      Parameters:
      disabled -
      Since:
      3.6.1
    • getHomePageContent

      @Nullable Text getHomePageContent()
      Since:
      3.10.1
    • setHomePageContent

      void setHomePageContent(@Nullable Text value)
      Since:
      3.10.1