com.atlassian.jira.avatar
Interface Avatar

All Known Implementing Classes:
AvatarImpl, MockAvatar

@PublicApi
public interface Avatar

Represents an icon for a project or some other entity in JIRA.

Since:
v4.0

Nested Class Summary
static class Avatar.Size
          The standard sizes for avatars.
static class Avatar.Type
          An indicator of the owner type of the avatar.
 
Method Summary
 Avatar.Type getAvatarType()
          The type of Avatar.
 String getContentType()
          The MIME type of the avatar image file.
 String getFileName()
          The base filename to the avatar image file.
 Long getId()
          The database identifier for the Avatar, may be null if it hasn't yet been stored.
 String getOwner()
          A String representation of the identity of the domain object that this avatar is an avatar for! For example, if it is a user avatar, it would be the username (since that is the primary key), for a Project it is the project ID as a String.
 boolean isSystemAvatar()
          Indicates whether the Avatar is a system-provided one or if users have defined it.
 

Method Detail

getAvatarType

@NotNull
Avatar.Type getAvatarType()
The type of Avatar.

Returns:
a non null Avatar.Type.

getFileName

@NotNull
String getFileName()
The base filename to the avatar image file. The actual file name will be modified with the id etc.

Returns:
the non null file name.

getContentType

@NotNull
String getContentType()
The MIME type of the avatar image file.

Returns:
the non null file name.

getId

Long getId()
The database identifier for the Avatar, may be null if it hasn't yet been stored.

Returns:
the database id or null.

getOwner

@NotNull
String getOwner()
A String representation of the identity of the domain object that this avatar is an avatar for! For example, if it is a user avatar, it would be the username (since that is the primary key), for a Project it is the project ID as a String. The meaning of this should be determined by the Avatar.Type.

Returns:
the owner id must not be null.

isSystemAvatar

boolean isSystemAvatar()
Indicates whether the Avatar is a system-provided one or if users have defined it.

Returns:
true only if the Avatar is a system-provided one.


Copyright © 2002-2012 Atlassian. All Rights Reserved.