@ExportedBean public abstract class AvatarMetadataAction extends InvisibleAction implements Serializable
SCMSource or SCMNavigator (also valid for
SCMRevision and SCMHead, but would be considered unusual).
For example:
SCMNavigator implementation that corresponds to a GitHub Team could use the
getAvatarImageOf(String) to return the GitHub Team logo| Constructor and Description |
|---|
AvatarMetadataAction() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
avatarIconClassNameImageOf(String iconClassName,
String size)
Helper method to resolve the icon image url.
|
protected String |
cachedResizedImageOf(String url,
String size)
Helper method to resolve an external image, cache it and resize it to the specified size.
|
abstract boolean |
equals(Object o) |
String |
getAvatarDescription()
Returns the description to use for the tool tip of the avatar of this object.
|
String |
getAvatarIconClassName()
Returns the
Icon class specification for the avatar of this object |
String |
getAvatarImageOf(String size)
Returns the URL of the avatar of this object in the requested size or
null if there is no avatar for
this object. |
abstract int |
hashCode() |
getDisplayName, getIconFileName, getUrlName@CheckForNull public String getAvatarIconClassName()
Icon class specification for the avatar of this objectIcon class specification or null to check getAvatarImageOf(String).IllegalStateException - if called outside of a request handling thread.IconSpec.getIconClassName()@CheckForNull public String getAvatarDescription()
nullIllegalStateException - if called outside of a request handling thread.@CheckForNull public String getAvatarImageOf(@NonNull String size)
null if there is no avatar for
this object. Ideally only getAvatarIconClassName() would be used, but to allow for the case where
the avatar is hosted on an external server this method can be used to retrieve the avatar image.size - the size, the following sizes must be supported: 16x16, 24x24, 32x32 and
48x48.nullIllegalStateException - if called outside of a request handling thread.@CheckForNull protected final String avatarIconClassNameImageOf(@CheckForNull String iconClassName, @NonNull String size)
iconClassName - the icon class name.size - the size string, e.g. 16x16, 24x24, etc.nullIllegalStateException - if called outside of a request handling thread.@NonNull protected final String cachedResizedImageOf(@NonNull String url, @NonNull String size)
url - the URL of the image to cache.size - the size string, e.g. 16x16, 24x24, etc.IllegalStateException - if called outside of a request handling thread.Copyright © 2016–2019. All rights reserved.