Package com.atlassian.jira.avatar
Class RemoteAvatar
java.lang.Object
com.atlassian.jira.avatar.RemoteAvatar
Represents a user or project avatar within our "network" of federated JIRA servers.
Normally this will represent an avatar coming from one of the JIRA servers that we have an app link with. However, because it can be useful to mix both local and remote users, one can construct an instance of this class that represents a local avatar.
This class is considered experimental while RemoteProjectService is still being developed.
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteAvatar(String url16x16, String url24x24, String url32x32, String url48x48) -
Method Summary
Modifier and TypeMethodDescriptionstatic RemoteAvatarBuild an Avatar representation for a local project avatar.static RemoteAvatarfrom(ApplicationUser user) Build an Avatar representation for a local user avatar.static RemoteAvatarfrom(JSONObject avatarUrls) Build an Avatar representation for a remote object.
-
Constructor Details
-
RemoteAvatar
-
-
Method Details
-
getUrl16x16
-
getUrl24x24
-
getUrl32x32
-
getUrl48x48
-
from
Build an Avatar representation for a remote object.- Parameters:
avatarUrls- the "avatarUrls" JSON from the project or user.- Returns:
- the RemoteAvatar representation of this JSON data.
- Throws:
JSONException- if the JSON is missing any of the required fields.
-
from
Build an Avatar representation for a local project avatar.- Parameters:
project- the project- Returns:
- the RemoteAvatar representation of this local project avatar.
-
from
Build an Avatar representation for a local user avatar.- Parameters:
user- the user- Returns:
- the RemoteAvatar representation of this local user avatar.
-