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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Builds the URL for the cached avatar image of the required size.org.kohsuke.stapler.HttpResponse
Serves 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:
getIconFileName
in interfaceAction
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
doDynamic
public org.kohsuke.stapler.HttpResponse doDynamic(org.kohsuke.stapler.StaplerRequest req, @QueryParameter String size) Serves the cached image.- Parameters:
req
- the request.size
- the requested size (defaults to48x48
if unspecified).- Returns:
- the response.
-