Package com.atlassian.jira.rest.v2.issue
Class AvatarResourceHelper
java.lang.Object
com.atlassian.jira.rest.v2.issue.AvatarResourceHelper
A helper resource for Project and User avatars.
- Since:
- v5.0
-
Constructor Summary
ConstructorsConstructorDescriptionAvatarResourceHelper
(JiraAuthenticationContext authContext, AvatarManager avatarManager, AvatarService avatarService, AvatarPickerHelper avatarPickerHelper, UserManager userManager) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
createAvatarFromTemporary
(IconType iconType, String ownerId, AvatarCroppingBean croppingInstructions) Converts temporary avatar into a real avatarjakarta.ws.rs.core.Response
deleteAvatar
(Long id) Deletes avatargetAllAvatars
(IconType iconType, String ownerId, Long selectedAvatarId) Returns all avatars which are visible for the currently logged in user.jakarta.ws.rs.core.Response
getAllSystemAvatars
(IconType iconType) Returns all system avatars of the given type.
-
Constructor Details
-
AvatarResourceHelper
@Inject public AvatarResourceHelper(JiraAuthenticationContext authContext, AvatarManager avatarManager, AvatarService avatarService, AvatarPickerHelper avatarPickerHelper, UserManager userManager)
-
-
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
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
Deletes avatar- Parameters:
id
- database id for avatar- Returns:
- temporary avatar cropping instructions
- Since:
- v5.0
-