@Extension public class AvatarCache extends Object implements UnprotectedRootAction
buildUrl(String, String)ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
AvatarCache()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
buildUrl(String url,
String size)
Builds the URL for the cached avatar image of the required size.
|
org.kohsuke.stapler.HttpResponse |
doDynamic(org.kohsuke.stapler.StaplerRequest req,
String size)
Serves the cached image.
|
String |
getDisplayName() |
String |
getIconFileName() |
String |
getUrlName() |
public static String buildUrl(@NonNull String url, @NonNull String size)
url - the URL of the source avatar image.size - the size of the image.IllegalStateException - if called outside of a request handling thread.public String getIconFileName()
getIconFileName in interface Actionpublic String getDisplayName()
getDisplayName in interface ActiongetDisplayName in interface ModelObjectpublic String getUrlName()
getUrlName in interface Actionpublic org.kohsuke.stapler.HttpResponse doDynamic(org.kohsuke.stapler.StaplerRequest req,
@QueryParameter
String size)
req - the request.size - the requested size (defaults to 48x48 if unspecified).Copyright © 2016–2019. All rights reserved.