Class DisplayURLDecorator

  • All Implemented Interfaces:

    public abstract class DisplayURLDecorator
    extends Object
    implements 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.
    • Constructor Detail

      • DisplayURLDecorator

        public DisplayURLDecorator()
    • Method Detail

      • parameters

        protected abstract Map<String,​String> parameters​(@NonNull
                                                               DisplayURLContext context)
        Returns a map of query parameters to decorate the URL with. The keys and values will be URL encoded for you. A null value will translate as a query parameter without a value.
        context - the context within which the URL is being generated.
        the map of parameters to append to the URL.
      • decorate

        public static String decorate​(@NonNull
                                      DisplayURLContext context,
                                      String url)
        Decorates the URL for the provided context.
        context - the context.
        url - the URL to decorate.
        the decorated URL.