com.atlassian.jira.avatar.AvatarManager |
Known Indirect Subclasses |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Manager interface for Avatar
domain objects.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AvatarManager.ImageSize |
This enum is deprecated.
in JIRA 6.0 -- use Avatar.Size .
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | AVATAR_IMAGE_FORMAT | ||||||||||
String | USER_AVATAR_ID_KEY |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AVATAR_IMAGE_FORMAT_FULL |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a database record for the given avatar and uses the content of the InputStream as the image.
| |||||||||||
Creates a database record for the given avatar.
| |||||||||||
Creates a database record for the given avatar and uses the content of the InputStream as the image.
| |||||||||||
Creates a database record for the given avatar and uses the content of the InputStream as the image.
| |||||||||||
Creates a database record for the given avatar and uses the content of the InputStream as the image.
| |||||||||||
Delete the avatar with the given id.
| |||||||||||
Delete the avatar with the given id and the file on disk.
| |||||||||||
Provides a list of all system avatars.
| |||||||||||
Gets the avatar id to use to represent an unknown or anonymous user
| |||||||||||
Returns the directory for storing avatars.
| |||||||||||
Retrieve the avatar with the given id.
| |||||||||||
Retrieve the avatar with the given id,
ensuring the avatar file is tagged with metadata identifying the image came from JIRA.
| |||||||||||
Provides a list of all avatars that are of the given type which have the given owner.
| |||||||||||
Gets the default avatar for the given type.
| |||||||||||
Determines if the remoteUser provided has permission to edit avatars of a certain type for the owner provided.
| |||||||||||
Determines if the remoteUser provided has permission to edit avatars of a certain type for the owner provided.
| |||||||||||
This method is deprecated.
Use
hasPermissionToEdit(ApplicationUser, ApplicationUser) or hasPermissionToEdit(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project) . Since v6.0
| |||||||||||
Determines if the remoteUser provided has permission to view avatars of a certain type for the owner provided.
| |||||||||||
Determines if the remoteUser provided has permission to view avatars of a certain type for the owner provided.
| |||||||||||
This method is deprecated.
Use
hasPermissionToView(com.atlassian.jira.user.ApplicationUser, ApplicationUser) or hasPermissionToView(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project) . Since v6.0
| |||||||||||
This method is deprecated.
To be removed. Since v6.0
| |||||||||||
Provides read-only access to the data of the avatar image as an
InputStream passed to the
provided dataProcessor. | |||||||||||
Saves the avatar as an updated version of the avatar with the same id that is already in the database.
|
Creates a database record for the given avatar and uses the content of the InputStream as the image. Use the return value as the persistent avatar, not the one you passed in.
fileName | the name of the avatar |
---|---|
contentType | MIME content type for the avatar |
image | the data of the original avatar image (it will be automatically closed) |
selection | the cropping selection for the image or null to take whole image |
DataAccessException | if there is a back-end database problem. |
---|---|
IOException |
Creates a database record for the given avatar. Use the return value as the persistent avatar, not the one you passed in.
avatar | must not be null, must have a null id. |
---|
DataAccessException | if there is a back-end database problem. |
---|
Creates a database record for the given avatar and uses the content of the InputStream as the image. Use the return value as the persistent avatar, not the one you passed in.
avatar | must not be null, must have a null id. |
---|---|
image | the data of the original avatar image. |
selection | the cropping selection for the image or null to take whole image. |
DataAccessException | if there is a back-end database problem. |
---|---|
IOException |
Creates a database record for the given avatar and uses the content of the InputStream as the image. Use the return value as the persistent avatar, not the one you passed in.
avatarType | type of new avatar to create. |
---|---|
owningObjectId | id of object (project/user/issuetype) to which this avatar is connected to. |
imageDataProvider | provider of image data |
DataAccessException | if there is a back-end database problem. |
---|---|
IOException | if there are arrors when processing image data |
Creates a database record for the given avatar and uses the content of the InputStream as the image. Use the return value as the persistent avatar, not the one you passed in.
fileName | the name of the avatar |
---|---|
contentType | MIME content type for the avatar |
image | the data of the original avatar image (it will be automatically closed) |
selection | the cropping selection for the image or null to take whole image |
DataAccessException | if there is a back-end database problem. |
---|---|
IOException |
Delete the avatar with the given id.
avatarId | must not be null. |
---|---|
alsoDeleteAvatarFile | if false, the avatar file will be left on disk. |
DataAccessException | if there is a back-end database problem. |
---|
Delete the avatar with the given id and the file on disk.
avatarId | must not be null. |
---|
DataAccessException | if there is a back-end database problem. |
---|
Provides a list of all system avatars.
type | The type of system avatars to return |
---|
DataAccessException | if there is a back-end database problem. |
---|
Gets the avatar id to use to represent an unknown or anonymous user
Returns the directory for storing avatars.
Retrieve the avatar with the given id.
avatarId | must not be null. |
---|
DataAccessException | if there is a back-end database problem. |
---|
Retrieve the avatar with the given id, ensuring the avatar file is tagged with metadata identifying the image came from JIRA.
avatarId | must not be null. |
---|
DataAccessException | if there is a back-end database problem. |
---|
Provides a list of all avatars that are of the given type which have the given owner.
type | the desired type of the avatars to retrieve. |
---|---|
ownerId | the id of the owner, matches the type (project id or user key). |
DataAccessException | if there is a back-end database problem. |
---|
Gets the default avatar for the given type.
ofType | the Avatar type. |
---|
Determines if the remoteUser provided has permission to edit avatars of a certain type for the owner provided. For project avatars, this method checks that the user is either and admin or project admin for the owner project. For user avatars, the method checks that the remoteUser has admin permissions for JIRA or the remoteUser and avatar owner are the same person. If external user management is enabled this method returns false
remoteUser | The remote user trying to edit an avatar |
---|---|
owner | The owner of the avatar being edited |
Determines if the remoteUser provided has permission to edit avatars of a certain type for the owner provided. For project avatars, this method checks that the user is either and admin or project admin for the owner project. For user avatars, the method checks that the remoteUser has admin permissions for JIRA or the remoteUser and avatar owner are the same person. If external user management is enabled this method returns false
remoteUser | The remote user trying to edit an avatar |
---|---|
owner | The owner of the avatar being edited |
This method is deprecated.
Use hasPermissionToEdit(ApplicationUser, ApplicationUser)
or hasPermissionToEdit(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project)
. Since v6.0
Determines if the remoteUser provided has permission to edit avatars of a certain type for the owner provided. For project avatars, this method checks that the user is either and admin or project admin for the owner project. For user avatars, the method checks that the remoteUser has admin permissions for JIRA or the remoteUser and avatar owner are the same person. If external user management is enabled this method returns false
remoteUser | The remote user trying to edit an avatar |
---|---|
type | The type of avatar |
ownerId | The owner id of the avatar being edited (project id or user key) |
Determines if the remoteUser provided has permission to view avatars of a certain type for the owner provided. For project avatars, this method checks that the user is either and admin, project admin or has browse permission for the owner project. For user avatars, the method checks that the remoteUser has use permission for JIRA or the remoteUser and avatar owner are the same person
remoteUser | The remote user trying to view an avatar |
---|---|
owner | The owner of the avatar being viewed |
Determines if the remoteUser provided has permission to view avatars of a certain type for the owner provided. For project avatars, this method checks that the user is either and admin, project admin or has browse permission for the owner project. For user avatars, the method checks that the remoteUser has use permission for JIRA or the remoteUser and avatar owner are the same person
remoteUser | The remote user trying to view an avatar |
---|---|
owner | The owner of the avatar being viewed |
This method is deprecated.
Use hasPermissionToView(com.atlassian.jira.user.ApplicationUser, ApplicationUser)
or hasPermissionToView(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.Project)
. Since v6.0
Determines if the remoteUser provided has permission to view avatars of a certain type for the owner provided. For project avatars, this method checks that the user is either and admin, project admin or has browse permission for the owner project. For user avatars, the method checks that the remoteUser has use permission for JIRA or the remoteUser and avatar owner are the same person
remoteUser | The remote user trying to view an avatar |
---|---|
type | The type of avatar |
ownerId | The owner id of the avatar being viewed (project id or user key) |
This method is deprecated.
To be removed. Since v6.0
Tells whether the given avatar is owned by the given ownerId.
avatar | the avatar to check, must not be null. |
---|---|
ownerId | the ownerId to check, must not be null. |
Provides read-only access to the data of the avatar image as an InputStream
passed to the
provided dataProcessor. The InputStream is closed after the dataProcessor completes. The dataProcessor is
immediately invoked on the data for the avatar.
avatar | the avatar for which the data is to be processed. |
---|---|
size | the size to return for this avatar |
dataAccessor | something to read the data. |
IOException | if an IOException occurs in the dataProcessor or in acquiring the InputStream for the avatar. |
---|
Saves the avatar as an updated version of the avatar with the same id that is already in the database.
avatar | must not be null. |
---|
DataAccessException | if there is a back-end database problem. |
---|