Class AbstractDecoratorAction

All Implemented Interfaces:
WebInterface, SpaceAdministrative, Spaced, MessageHolderAware, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.locale.LocaleProvider, org.apache.struts2.text.TextProvider, org.apache.struts2.Validateable
Direct Known Subclasses:
EditDecoratorAction, ViewDefaultDecoratorAction

public abstract class AbstractDecoratorAction extends AbstractLookAndFeelAction
See Also:
  • Field Details

    • KLUDGE_WWRESOURCE_TEMPLATE

      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:
    • KLUDGE_CLASSPATH_TEMPLATE

      public static final String KLUDGE_CLASSPATH_TEMPLATE
      See Also:
    • decoratorName

      protected String decoratorName
  • Constructor Details

    • AbstractDecoratorAction

      public AbstractDecoratorAction()
  • Method Details

    • readDefaultTemplate

      protected String readDefaultTemplate()
      Returns:
      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.
      Parameters:
      knownTemplatePath - path to a template for which we know the resource loader
      templateToRetrieve - the template we want to get
    • 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.
      Returns:
      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)
      Deprecated.
      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)