Class AbstractPageTemplateAction

    • Constructor Detail

      • AbstractPageTemplateAction

        public AbstractPageTemplateAction()
    • Method Detail

      • validate

        public void validate()
        Ensure that the size of the labels associated with the template are less than the column size for storing them (255).
        Specified by:
        validate in interface MessageHolderAware
        Specified by:
        validate in interface com.opensymphony.xwork2.Validateable
        Overrides:
        validate in class com.opensymphony.xwork2.ActionSupport
      • setBreadcrumbGenerator

        public void setBreadcrumbGenerator​(BreadcrumbGenerator breadcrumbGenerator)
      • setPageTemplateManager

        public void setPageTemplateManager​(PageTemplateManager pageTemplateManager)
      • getEntityId

        public long getEntityId()
      • setEntityId

        public void setEntityId​(long entityId)
      • getDraftId

        public long getDraftId()
      • setDraftId

        public void setDraftId​(long draftId)
      • getLabelsString

        public String getLabelsString()
        Returns:
        the label String that has been set on the action. If there is none then return the label String from the pageTemplate if one has been set.
      • setLabelsString

        public void setLabelsString​(String labelsString)
      • setLabels

        protected void setLabels​(List<Label> labels)
      • isPermitted

        public boolean isPermitted()
        We should really be splitting up each of the template actions (create, edit, list) and getting them to implement SpaceAdministrative or Administrative to enforce space or global permissions.

        We will determine the permission type required based on the type of template being served or modified If the template id does not exist (ie when we are browsing templates, use the space key to determine permissions

        Overrides:
        isPermitted in class AbstractSpaceAction
      • globalTemplateSuffix

        protected String globalTemplateSuffix()
        Returns:
        returns "-global" if the spacekey is _not_ set, empty string otherwise. Use this suffix to create action results that differentiate between global templates and space templates.