@Component public class AvatarResourceHelper extends Object
Constructor and Description |
---|
AvatarResourceHelper(JiraAuthenticationContext authContext,
AvatarManager avatarManager,
AvatarService avatarService,
AvatarPickerHelper avatarPickerHelper,
AttachmentHelper attachmentHelper,
UserManager userManager) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createAvatarFromTemporary(IconType iconType,
String ownerId,
AvatarCroppingBean croppingInstructions)
Converts temporary avatar into a real avatar
|
javax.ws.rs.core.Response |
cropTemporaryAvatar(IconType iconType,
String ownerId,
AvatarCroppingBean croppingInstructions) |
javax.ws.rs.core.Response |
deleteAvatar(Long id)
Deletes avatar
|
Map<String,List<AvatarBean>> |
getAllAvatars(IconType iconType,
String ownerId,
Long selectedAvatarId)
Returns all avatars which are visible for the currently logged in user.
|
javax.ws.rs.core.Response |
getAllSystemAvatars(IconType iconType)
Returns all system avatars of the given type.
|
javax.ws.rs.core.Response |
storeTemporaryAvatar(IconType iconType,
String ownerId,
String filename,
Long size,
javax.servlet.http.HttpServletRequest request)
Creates temporary avatar and provides instructions for cropping (if needed)
|
javax.ws.rs.core.Response |
storeTemporaryAvatarUsingMultiPart(IconType iconType,
String ownerId,
com.atlassian.plugins.rest.common.multipart.FilePart filePart,
javax.servlet.http.HttpServletRequest request)
Creates temporary avatar using multipart.
|
@Inject public AvatarResourceHelper(JiraAuthenticationContext authContext, AvatarManager avatarManager, AvatarService avatarService, AvatarPickerHelper avatarPickerHelper, AttachmentHelper attachmentHelper, UserManager userManager)
public Map<String,List<AvatarBean>> getAllAvatars(IconType iconType, String ownerId, Long selectedAvatarId)
iconType
- - Type of avatars (User or Project)ownerId
- - (project id or username)selectedAvatarId
- - id of selected avatarpublic javax.ws.rs.core.Response getAllSystemAvatars(IconType iconType)
iconType
- - Type of avatars (User or Project)public javax.ws.rs.core.Response createAvatarFromTemporary(IconType iconType, String ownerId, AvatarCroppingBean croppingInstructions)
iconType
- - Type of avatars (User or Project)ownerId
- - (project id or username)croppingInstructions
- - Corrdinates to crop imagepublic javax.ws.rs.core.Response storeTemporaryAvatar(IconType iconType, String ownerId, String filename, Long size, javax.servlet.http.HttpServletRequest request)
iconType
- - Type of avatars (User or Project)ownerId
- - (project id or username)filename
- - name of file being uploadedsize
- - size of filerequest
- - servlet requestpublic javax.ws.rs.core.Response storeTemporaryAvatarUsingMultiPart(IconType iconType, String ownerId, com.atlassian.plugins.rest.common.multipart.FilePart filePart, javax.servlet.http.HttpServletRequest request)
iconType
- - Type of avatars (User or Project)ownerId
- - (project id or username)filePart
- - File bodyrequest
- - servlet requestpublic javax.ws.rs.core.Response cropTemporaryAvatar(IconType iconType, String ownerId, AvatarCroppingBean croppingInstructions)
public javax.ws.rs.core.Response deleteAvatar(Long id)
id
- database id for avatarCopyright © 2002-2024 Atlassian. All Rights Reserved.