public class BasicTypedTypeAvatarService extends Object implements TypeAvatarService
IconType
and the
AvatarManager
.Constructor and Description |
---|
BasicTypedTypeAvatarService(IconType iconType,
AvatarManager avatarManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
canUserCreateAvatar(ApplicationUser remoteUser,
String owningObjectId)
Return information if user can add avatar to given subject.
|
Avatar |
createAvatar(ApplicationUser remoteUser,
String owningObjectId,
AvatarImageDataProvider imageDataProvider)
Adds new avatar to given subject with provided image data - with permissions of given remote user.
|
Avatar |
getAvatar(ApplicationUser remoteUser,
long avatarId)
Return avatar using remote user permissions.
|
SystemAndCustomAvatars |
getAvatars(ApplicationUser remoteUser,
String owningObjectId)
Get avatars assigned to given subject - with permissions of remote user.
|
Avatar |
getDefaultAvatar()
Get default avatar for current type.
|
public BasicTypedTypeAvatarService(IconType iconType, AvatarManager avatarManager)
public final SystemAndCustomAvatars getAvatars(ApplicationUser remoteUser, String owningObjectId)
TypeAvatarService
getAvatars
in interface TypeAvatarService
remoteUser
- user whose permissions should be usedowningObjectId
- id of object (project/user/issuetype) to which this avatar is connected topublic Avatar getAvatar(ApplicationUser remoteUser, long avatarId)
TypeAvatarService
getAvatar
in interface TypeAvatarService
remoteUser
- user whose permissions should be usedavatarId
- avatar idpublic boolean canUserCreateAvatar(ApplicationUser remoteUser, String owningObjectId)
TypeAvatarService
canUserCreateAvatar
in interface TypeAvatarService
remoteUser
- user whose permissions should be usedowningObjectId
- id of object (project/user/issuetype) to which this avatar is connected topublic Avatar createAvatar(ApplicationUser remoteUser, String owningObjectId, AvatarImageDataProvider imageDataProvider) throws IllegalAccessException, IOException
TypeAvatarService
createAvatar
in interface TypeAvatarService
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 avatarIllegalAccessException
- if user cannot add avatar to given subjectIOException
- if there is error with image data@Nonnull public Avatar getDefaultAvatar()
TypeAvatarService
getDefaultAvatar
in interface TypeAvatarService
Copyright © 2002-2021 Atlassian. All Rights Reserved.