java.lang.Object | |
↳ | com.atlassian.jira.avatar.AvatarManagerImpl |
Manager for Avatars.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.jira.avatar.AvatarManager
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.jira.avatar.AvatarManager
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 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.
| |||||||||||
Delete the avatar with the given id and the file on disk.
| |||||||||||
Delete the avatar with the given id.
| |||||||||||
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.
| |||||||||||
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 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.
| |||||||||||
Determines if the remoteUser provided has permission to view avatars of a certain type for the owner provided.
| |||||||||||
Tells whether the given avatar is owned by the given ownerId.
| |||||||||||
Provides read-only access to the data of the avatar image as an
InputStream passed to the
provided dataAccessor. | |||||||||||
Provides read-only access to the data of the avatar image as an
InputStream passed to the
provided dataAccessor. | |||||||||||
Provides read-only access to the data of the avatar image as an
InputStream passed to the
provided dataAccessor. | |||||||||||
Saves the avatar as an updated version of the avatar with the same id that is already in the database.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.avatar.AvatarManager
|
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. |
---|---|
imageData | the data of the original avatar image. |
croppingSelection | the cropping selection for the image or null to take whole image. |
DataAccessException | |
---|---|
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 |
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. |
---|
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 |
imageData | the data of the original avatar image (it will be automatically closed) |
croppingSelection | the cropping selection for the image or null to take whole image |
DataAccessException | |
---|---|
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.
fileName | the name of the avatar |
---|---|
contentType | MIME content type for the avatar |
imageData | the data of the original avatar image (it will be automatically closed) |
croppingSelection | the cropping selection for the image or null to take whole image |
DataAccessException | |
---|---|
IOException |
Delete the avatar with the given id and the file on disk.
avatarId | must not be null. |
---|
Delete the avatar with the given id.
avatarId | must not be null. |
---|---|
alsoDeleteAvatarFile | if false, the avatar file will be left on disk. |
Provides a list of all system avatars.
type | The type of system avatars to return |
---|
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. |
---|
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. |
---|
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). |
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 |
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 |
---|---|
project | 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 |
---|---|
type | The type of avatar |
ownerId | The owner id of the avatar being viewed (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 |
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 dataAccessor. The InputStream is closed after the dataAccessor completes. The dataAccessor 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 |
---|
Provides read-only access to the data of the avatar image as an InputStream
passed to the
provided dataAccessor. The InputStream is closed after the dataAccessor completes. The dataAccessor is
immediately invoked on the data for the avatar.
The format that the image will be served in, is determined by the AvatarFormatPolicy
that is provided
as a parameter. This should be used to set the content type of the data being provided to the @Consumer
avatar | the avatar for which the data is to be processed. |
---|---|
size | the size to return for this avatar |
avatarFormatPolicy | the requested format for avatar data. |
mediaConsumer | consumer that will read the data. |
IOException |
---|
Provides read-only access to the data of the avatar image as an InputStream
passed to the
provided dataAccessor. The InputStream is closed after the dataAccessor completes. The dataAccessor is
immediately invoked on the data for the avatar.
This is equivalent to calling readAvatarData(Avatar, Avatar.Size, AvatarFormatPolicy, MediaConsumer)
with
createOriginalDataPolicy()
as the requested type and empty()
as type Accessor.
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 |
---|
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. |
---|