@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(AvatarCacheSource source,
String size)
Builds the URL for the cached avatar image of the required size.
|
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 requestedSize)
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 static String buildUrl(@NonNull AvatarCacheSource source, @NonNull String size)
source
- source avatar image definition.size
- the size of the image.IllegalStateException
- if called outside of a request handling thread.public String getIconFileName()
getIconFileName
in interface Action
public String getDisplayName()
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
public String getUrlName()
getUrlName
in interface Action
public org.kohsuke.stapler.HttpResponse doDynamic(org.kohsuke.stapler.StaplerRequest req, @QueryParameter String requestedSize)
req
- the request.requestedSize
- the requested size (defaults to 48x48
if unspecified).Copyright © 2016–2022. All rights reserved.