Interface TypeAvatarService

All Known Implementing Classes:
BasicTypedTypeAvatarService, IssueTypeTypeAvatarService, ProjectTypeAvatarService

@ExperimentalApi public interface TypeAvatarService
Interface to retrieve and create avatars of some type respecting the current JIRA permissions setup.
Since:
v6.3
See Also:
  • Method Details

    • getAvatars

      @Nonnull SystemAndCustomAvatars getAvatars(@Nullable ApplicationUser remoteUser, @Nonnull String owningObjectId)
      Get avatars assigned to given subject - with permissions of remote user.
      Parameters:
      remoteUser - user whose permissions should be used
      owningObjectId - id of object (project/user/issuetype) to which this avatar is connected to
      Returns:
      object with all system and accessible by user custom avatars
    • getAvatar

      @Nullable Avatar getAvatar(@Nullable ApplicationUser remoteUser, long avatarId)
      Return avatar using remote user permissions. May return null if user cannot access this avatar.
      Parameters:
      remoteUser - user whose permissions should be used
      avatarId - avatar id
    • canUserCreateAvatar

      boolean canUserCreateAvatar(@Nonnull ApplicationUser remoteUser, String owningObjectId)
      Return information if user can add avatar to given subject.
      Parameters:
      remoteUser - user whose permissions should be used
      owningObjectId - id of object (project/user/issuetype) to which this avatar is connected to
    • createAvatar

      @Nonnull Avatar createAvatar(@Nonnull ApplicationUser remoteUser, @Nonnull String owningObjectId, @Nonnull AvatarImageDataProvider imageDataProvider) throws IllegalAccessException, IOException
      Adds new avatar to given subject with provided image data - with permissions of given remote user. Returns created avatar.
      Parameters:
      remoteUser - user whose permissions should be used
      owningObjectId - id of object (project/user/issuetype) to which this avatar will be connected to
      imageDataProvider - provider of image data for new avatar
      Throws:
      IllegalAccessException - if user cannot add avatar to given subject
      IOException - if there is error with image data
    • getDefaultAvatar

      @Nonnull Avatar getDefaultAvatar()
      Get default avatar for current type. This avatar should be available to anyone
      Returns: