Class RendererContext


  • public class RendererContext
    extends Object
    The context implementation for the clientlib link rendering, request scoped. This context provides a registry to avoid clientlib duplicates.
    • Field Detail

      • CONTEXT_KEY

        public static final String CONTEXT_KEY
      • resolver

        protected transient org.apache.sling.api.resource.ResourceResolver resolver
    • Constructor Detail

      • RendererContext

        protected RendererContext​(BeanContext context,
                                  org.apache.sling.api.SlingHttpServletRequest request)
    • Method Detail

      • instance

        public static RendererContext instance​(BeanContext context,
                                               org.apache.sling.api.SlingHttpServletRequest request)
      • isClientlibRendered

        public boolean isClientlibRendered​(ClientlibRef reference)
        Checks whether a referenced resource or client library is satisfied by an already rendered resource.
      • registerClientlibLink

        public void registerClientlibLink​(ClientlibLink link,
                                          ClientlibResourceFolder parent)
        Registers rendered resources / client libraries that have already been rendered for the current request, that is, over all clientlib tag calls of a request
        Parameters:
        link - the element to be registered
        parent - the element referencing it, for logging purposes
      • mapClientlibURLs

        public boolean mapClientlibURLs()
      • useMinifiedFiles

        public boolean useMinifiedFiles()
      • getResolver

        public org.apache.sling.api.resource.ResourceResolver getResolver()