Class PageVariablesAction

All Implemented Interfaces:
Beanable, PageAware, TinyUrlAware, WebInterface, CaptchaAware, Spaced, BreadcrumbAware, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public class PageVariablesAction extends CreatePageAction
See Also:
  • Field Details

  • Constructor Details

    • PageVariablesAction

      public PageVariablesAction()
  • Method Details

    • getTemplateVariables

      public List getTemplateVariables() throws XhtmlException
      Throws:
      XhtmlException
    • execute

      public String execute() throws Exception
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
      Throws:
      Exception
    • getLabels

      protected List<Label> getLabels()
      Description copied from class: AbstractCreateAndEditPageAction
      Metadata is now retrieved from the existing page, if it exists, otherwise it is stored on the draft (i.e. if the draft has never been published)
      Overrides:
      getLabels in class AbstractCreateAndEditPageAction
      Returns:
      List of labels visible to the current user
    • getWebInterfaceContext

      public DefaultWebInterfaceContext getWebInterfaceContext()
      Description copied from interface: WebInterface
      Returns a context which can be passed to web items when rendering them.

      Typically, Struts actions will implement this to provide extra details in the context such as content objects, and so on.

      Specified by:
      getWebInterfaceContext in interface WebInterface
      Overrides:
      getWebInterfaceContext in class AbstractCreateAndEditPageAction
    • getRenderedTemplateContent

      public String getRenderedTemplateContent()
      get rendered template content 1) manually injected script in renderedTemplateContent will be removed to avoid XSS 2) script from html macro will be parsed according to the specified template ID and will be added to renderedTemplateContent
    • setRenderedTemplateContent

      public void setRenderedTemplateContent(String renderedTemplateContent)
    • doEnter

      public String doEnter() throws Exception
      Throws:
      Exception
    • validate

      public void validate()
      Description copied from class: AbstractPreviewPageAction
      Convert the editor content to storageFormat, catching and reporting any problems in the process. On successful validation, the storageFormat field will be populated with a storage format representation of the editor content, ready for saving.
      Specified by:
      validate in interface MessageHolderAware
      Specified by:
      validate in interface org.apache.struts2.Validateable
      Overrides:
      validate in class CreatePageAction
    • isPermitted

      public boolean isPermitted()
      This action is being used to set up the content for the CreatePageAction, so the permissions test is not needed (and doesn't work, as the final space the page will be created in hasn't been chosen yet)
      Overrides:
      isPermitted in class CreatePageAction
    • isTemplateApplied

      public boolean isTemplateApplied()
    • setTemplateApplied

      public void setTemplateApplied(boolean templateApplied)
    • setEditorFormatService

      @Deprecated public void setEditorFormatService(EditorFormatService editorFormatService)
      Deprecated.
      since 5.10. Unused.
    • setXhtmlContent

      public void setXhtmlContent(XhtmlContent xhtmlContent)
    • setFormatConverter

      public void setFormatConverter(FormatConverter formatConverter)
      Overrides:
      setFormatConverter in class AbstractPreviewPageAction
    • setRenderedContentCleaner

      public void setRenderedContentCleaner(RenderedContentCleaner renderedContentCleaner)