Class DisplayURLDecorator
java.lang.Object
org.jenkinsci.plugins.displayurlapi.DisplayURLDecorator
- All Implemented Interfaces:
ExtensionPoint
An extension point for decorating the URLs presented to users by the
DisplayURLProvider
. Use cases include
decorating URLs with utm_source
etc tracking parameters in order to measure the usage rate of different URLs
generated by Jenkins.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
decorate
(DisplayURLContext context, String url) Decorates the URL for the provided context.parameters
(DisplayURLContext context) Returns a map of query parameters to decorate the URL with.
-
Constructor Details
-
DisplayURLDecorator
public DisplayURLDecorator()
-
-
Method Details
-
parameters
Returns a map of query parameters to decorate the URL with. The keys and values will be URL encoded for you. Anull
value will translate as a query parameter without a value.- Parameters:
context
- the context within which the URL is being generated.- Returns:
- the map of parameters to append to the URL.
-
decorate
Decorates the URL for the provided context.- Parameters:
context
- the context.url
- the URL to decorate.- Returns:
- the decorated URL.
-