public interface

AvatarTagger

com.atlassian.jira.avatar.AvatarTagger
Known Indirect Subclasses

Class Overview

Saves an image as a png with metadata signifying this image is a JIRA Avatar (used by the email handler to decide whether or not to attach an image)

Summary

Constants
String AVATAR_SYSTEM_IMAGE_TYPE
String JIRA_SYSTEM_IMAGE_TYPE
Public Methods
void saveTaggedAvatar(RenderedImage image, String targetFormat, OutputStream target)
Adds JIRA specific metadata to given image.
void saveTaggedAvatar(RenderedImage image, String name, File file)
Adds JIRA specific metadata to given image.
void tag(InputStream inputStream, OutputStream outputStream)
Add JIRA specific metadata to given file.
String tagAvatar(long id, String filename)
Adds JIRA specific metadata to all avatar thumbnails.
void tagSingleAvatarFile(File source, File destination)
Add JIRA specific metadata to given file.

Constants

public static final String AVATAR_SYSTEM_IMAGE_TYPE

Constant Value: "avatar"

public static final String JIRA_SYSTEM_IMAGE_TYPE

Constant Value: "jira-system-image-type"

Public Methods

public void saveTaggedAvatar (RenderedImage image, String targetFormat, OutputStream target)

Adds JIRA specific metadata to given image.

Parameters
image to be tagged
targetFormat in which image will be saved
target output in which the tagged image will be saved
Throws
IOException

public void saveTaggedAvatar (RenderedImage image, String name, File file)

Adds JIRA specific metadata to given image. The saved image will have PNG format.

Parameters
image to be tagged
name of the image
file in which the tagged image will be saved
Throws
IOException

public void tag (InputStream inputStream, OutputStream outputStream)

Add JIRA specific metadata to given file.

Parameters
inputStream pointing to the source which will be tagged
outputStream pointing where the tagged file should be written
Throws
IOException

public String tagAvatar (long id, String filename)

Adds JIRA specific metadata to all avatar thumbnails.

Parameters
id of the avatar
filename of the avatar main image
Returns
  • the name of tagged avatar image
Throws
IOException

public void tagSingleAvatarFile (File source, File destination)

Add JIRA specific metadata to given file.

Parameters
source file to be tagged
destination in which the tagged file will be saved
Throws
IOException