Package com.atlassian.jira.avatar
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 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.getAvatars(ApplicationUser remoteUser, String owningObjectId) Get avatars assigned to given subject - with permissions of remote user.Get default avatar for current type.
-
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 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
Return avatar using remote user permissions. May return null if user cannot access this avatar.- Parameters:
remoteUser- user whose permissions should be usedavatarId- avatar id
-
canUserCreateAvatar
Return information if user can add avatar to given subject.- Parameters:
remoteUser- user whose permissions should be usedowningObjectId- 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 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
Get default avatar for current type. This avatar should be available to anyone- Returns:
-