Class AvatarResourceHelper

java.lang.Object
com.atlassian.jira.rest.v2.issue.AvatarResourceHelper

@Component public class AvatarResourceHelper extends Object
A helper resource for Project and User avatars.
Since:
v5.0
  • Constructor Details

  • Method Details

    • getAllAvatars

      public Map<String,List<AvatarBean>> getAllAvatars(IconType iconType, String ownerId, Long selectedAvatarId)
      Returns all avatars which are visible for the currently logged in user.
      Parameters:
      iconType - - Type of avatars (User or Project)
      ownerId - - (project id or username)
      selectedAvatarId - - id of selected avatar
      Returns:
      all avatars, system and custom for given type
    • getAllSystemAvatars

      public jakarta.ws.rs.core.Response getAllSystemAvatars(IconType iconType)
      Returns all system avatars of the given type.
      Parameters:
      iconType - - Type of avatars (User or Project)
      Returns:
      all system avatars for the given type
    • createAvatarFromTemporary

      public jakarta.ws.rs.core.Response createAvatarFromTemporary(IconType iconType, String ownerId, AvatarCroppingBean croppingInstructions)
      Converts temporary avatar into a real avatar
      Parameters:
      iconType - - Type of avatars (User or Project)
      ownerId - - (project id or username)
      croppingInstructions - - Corrdinates to crop image
      Returns:
      created avatar
      Since:
      v5.0
    • deleteAvatar

      public jakarta.ws.rs.core.Response deleteAvatar(@PathParam("id") Long id)
      Deletes avatar
      Parameters:
      id - database id for avatar
      Returns:
      temporary avatar cropping instructions
      Since:
      v5.0