public class BasicTypedTypeAvatarService extends Object implements TypeAvatarService
| Constructor and Description |
|---|
BasicTypedTypeAvatarService(Avatar.Type type,
AvatarManager avatarManager,
AvatarAccessPolicy policy) |
| 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(Avatar.Type type, AvatarManager avatarManager, AvatarAccessPolicy policy)
public final SystemAndCustomAvatars getAvatars(ApplicationUser remoteUser, String owningObjectId)
TypeAvatarServicegetAvatars in interface TypeAvatarServiceremoteUser - 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)
TypeAvatarServicegetAvatar in interface TypeAvatarServiceremoteUser - user whose permissions should be usedavatarId - avatar idpublic boolean canUserCreateAvatar(ApplicationUser remoteUser, String owningObjectId)
TypeAvatarServicecanUserCreateAvatar in interface TypeAvatarServiceremoteUser - 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
TypeAvatarServicecreateAvatar in interface TypeAvatarServiceremoteUser - 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()
TypeAvatarServicegetDefaultAvatar in interface TypeAvatarServiceCopyright © 2002-2015 Atlassian. All Rights Reserved.