com.atlassian.jira.mock
Class MockAvatar

java.lang.Object
  extended by com.atlassian.jira.mock.MockAvatar
All Implemented Interfaces:
Avatar

public class MockAvatar
extends Object
implements Avatar

Non production bean implementation of Avatar.

Since:
v4.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.avatar.Avatar
Avatar.Size, Avatar.Type
 
Constructor Summary
MockAvatar(long id, String fileName, String contentType, Avatar.Type type, String owner, boolean system)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockAvatar

public MockAvatar(long id,
                  String fileName,
                  String contentType,
                  Avatar.Type type,
                  String owner,
                  boolean system)
Method Detail

getAvatarType

public Avatar.Type getAvatarType()
Description copied from interface: Avatar
The type of Avatar.

Specified by:
getAvatarType in interface Avatar
Returns:
a non null Avatar.Type.

getContentType

public String getContentType()
Description copied from interface: Avatar
The MIME type of the avatar image file.

Specified by:
getContentType in interface Avatar
Returns:
the non null file name.

getFileName

public String getFileName()
Description copied from interface: Avatar
The base filename to the avatar image file. The actual file name will be modified with the id etc.

Specified by:
getFileName in interface Avatar
Returns:
the non null file name.

getId

public Long getId()
Description copied from interface: Avatar
The database identifier for the Avatar, may be null if it hasn't yet been stored.

Specified by:
getId in interface Avatar
Returns:
the database id or null.

getOwner

public String getOwner()
Description copied from interface: Avatar
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.

Specified by:
getOwner in interface Avatar
Returns:
the owner id must not be null.

isSystemAvatar

public boolean isSystemAvatar()
Description copied from interface: Avatar
Indicates whether the Avatar is a system-provided one or if users have defined it.

Specified by:
isSystemAvatar in interface Avatar
Returns:
true only if the Avatar is a system-provided one.


Copyright © 2002-2012 Atlassian. All Rights Reserved.