public class

AvatarTaggerImpl

extends Object
implements AvatarTagger
java.lang.Object
   ↳ com.atlassian.jira.avatar.AvatarTaggerImpl

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 FORMAT_NAME
[Expand]
Inherited Constants
From interface com.atlassian.jira.avatar.AvatarTagger
Public Constructors
AvatarTaggerImpl(JiraHome jiraHome)
Public Methods
void saveTaggedAvatar(RenderedImage in, String format, OutputStream targetStream)
Adds JIRA specific metadata to given image.
void saveTaggedAvatar(RenderedImage in, 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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.avatar.AvatarTagger

Constants

public static final String FORMAT_NAME

Constant Value: "javax_imageio_png_1.0"

Public Constructors

public AvatarTaggerImpl (JiraHome jiraHome)

Public Methods

public void saveTaggedAvatar (RenderedImage in, String format, OutputStream targetStream)

Adds JIRA specific metadata to given image.

Parameters
in to be tagged
format in which image will be saved
targetStream output in which the tagged image will be saved
Throws
IOException

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

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

Parameters
in 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