Package com.atlassian.jira.avatar.types
Class BasicTypedTypeAvatarService
java.lang.Object
com.atlassian.jira.avatar.types.BasicTypedTypeAvatarService
- All Implemented Interfaces:
TypeAvatarService
- Direct Known Subclasses:
IssueTypeTypeAvatarService,ProjectTypeAvatarService
To be honest, you don't need this class very much if you already have the
IconType and the
AvatarManager.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUserCreateAvatar(ApplicationUser remoteUser, String owningObjectId) Return information if user can add avatar to given subject.createAvatar(ApplicationUser remoteUser, String owningObjectId, AvatarImageDataProvider imageDataProvider) Adds new avatar to given subject with provided image data - with permissions of given remote user.getAvatar(ApplicationUser remoteUser, long avatarId) Return avatar using remote user permissions.final SystemAndCustomAvatarsgetAvatars(ApplicationUser remoteUser, String owningObjectId) Get avatars assigned to given subject - with permissions of remote user.Get default avatar for current type.
-
Constructor Details
-
BasicTypedTypeAvatarService
-
-
Method Details
-
getAvatars
Description copied from interface:TypeAvatarServiceGet avatars assigned to given subject - with permissions of remote user.- Specified by:
getAvatarsin interfaceTypeAvatarService- Parameters:
remoteUser- user whose permissions should be usedowningObjectId- 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
Description copied from interface:TypeAvatarServiceReturn avatar using remote user permissions. May return null if user cannot access this avatar.- Specified by:
getAvatarin interfaceTypeAvatarService- Parameters:
remoteUser- user whose permissions should be usedavatarId- avatar id
-
canUserCreateAvatar
Description copied from interface:TypeAvatarServiceReturn information if user can add avatar to given subject.- Specified by:
canUserCreateAvatarin interfaceTypeAvatarService- Parameters:
remoteUser- user whose permissions should be usedowningObjectId- id of object (project/user/issuetype) to which this avatar is connected to
-
createAvatar
public Avatar createAvatar(ApplicationUser remoteUser, String owningObjectId, AvatarImageDataProvider imageDataProvider) throws IllegalAccessException, IOException Description copied from interface:TypeAvatarServiceAdds new avatar to given subject with provided image data - with permissions of given remote user. Returns created avatar.- Specified by:
createAvatarin interfaceTypeAvatarService- Parameters:
remoteUser- user whose permissions should be usedowningObjectId- id of object (project/user/issuetype) to which this avatar will be connected toimageDataProvider- provider of image data for new avatar- Throws:
IllegalAccessException- if user cannot add avatar to given subjectIOException- if there is error with image data
-
getDefaultAvatar
Description copied from interface:TypeAvatarServiceGet default avatar for current type. This avatar should be available to anyone- Specified by:
getDefaultAvatarin interfaceTypeAvatarService- Returns:
-