Class AbstractDecoratorAction

    • Field Detail


        public static final String KLUDGE_WWRESOURCE_TEMPLATE
        The name of a template that should never be overridden by the user, and thus will be able to give us the default template ResourceLoader. I figure the chance of anyone manually overriding the setup.vmd template is pretty close to nil.
        See Also:
        Constant Field Values
      • decoratorName

        protected String decoratorName
    • Constructor Detail

      • AbstractDecoratorAction

        public AbstractDecoratorAction()
    • Method Detail

      • readDefaultTemplate

        protected String readDefaultTemplate()
        null if the template couldn't be loaded!
      • getTemplateFromResourceLoader

        protected String getTemplateFromResourceLoader​(String knownTemplatePath,
                                                       String templateToRetrieve)
        Retrieve a template's source from the same resource loader that was used to load another template.
        templateToRetrieve - the template we want to get
        knownTemplatePath - path to a template for which we know the resource loader
      • getTemplateSource

        protected String getTemplateSource​(String template,
                                           org.apache.velocity.runtime.resource.loader.ResourceLoader resourceLoader,
                                           String encoding)
        Get a template's contents, given the name of the template and a ResourceLoader to load it from.
        String the template source
      • getContent

        public String getContent()
      • getDecoratorName

        public String getDecoratorName()
      • setContent

        public void setContent​(String content)
      • setDecoratorName

        public void setDecoratorName​(String decoratorName)
      • removeFromVelocityCache

        protected void removeFromVelocityCache​(String decorator)
        since 5.0 use ConfluenceVelocityResourceCache or rely on CustomLayoutManager to do this automatically for you.
      • setVelocityManager

        public void setVelocityManager​(org.apache.struts2.views.velocity.VelocityManager velocityManager)