Class GitLabAvatarCache
java.lang.Object
io.jenkins.plugins.gitlabbranchsource.helpers.GitLabAvatarCache
- All Implemented Interfaces:
ExtensionPoint,Action,ModelObject,RootAction,UnprotectedRootAction
An avatar cache that will serve URLs that have been recently registered
through
buildUrl(String, String)-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilds the URL for the cached avatar image of the required size.org.kohsuke.stapler.HttpResponseServes the cached image.
-
Field Details
-
LOGGER
Our logger.
-
-
Constructor Details
-
GitLabAvatarCache
public GitLabAvatarCache()Constructor.
-
-
Method Details
-
buildUrl
Builds the URL for the cached avatar image of the required size.- Parameters:
url- the URL of the source avatar image.size- the size of the image.- Returns:
- the URL of the cached image.
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
doDynamic
public org.kohsuke.stapler.HttpResponse doDynamic(org.kohsuke.stapler.StaplerRequest2 req, @QueryParameter String size) Serves the cached image.- Parameters:
req- the request.size- the requested size (defaults to48x48if unspecified).- Returns:
- the response.
-