Class PublicationDisplayHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants
Direct Known Subclasses:
FaqDisplayHandler, FileDocumentFullDisplayHandler, GlossaryDisplayHandler

public class PublicationDisplayHandler extends JcmsFormHandler
Generic handler for the publication full display
Since:
jcms-11.0.0
  • Field Details

    • publication

      protected Publication publication
    • preview

      protected boolean preview
    • canWorkOn

      protected Boolean canWorkOn
    • displayParams

      protected Map<String,Object> displayParams
  • Constructor Details

    • PublicationDisplayHandler

      public PublicationDisplayHandler()
  • Method Details

    • display

      public boolean display(String mapKey)
    • display

      public boolean display(PublicationDisplayHandler.FullDisplayItem item)
    • display

      public boolean display(PublicationDisplayHandler.FullDisplayItem item, boolean defaultValue)
    • display

      public boolean display(String mapKey, boolean defaultValue)
    • addFrontEndDependencies

      public void addFrontEndDependencies()
    • init

      protected void init()
      Description copied from class: JcmsFormHandler
      Method to implement if you need to initialize your handler from parameter received, prior to all security validation.

      You must absolutely not perform any action which modify data or site configuration.

      Therefore it is strongly recommend NOT TO implement this method, or use very wisely.

      Overrides:
      init in class JcmsFormHandler
    • initIcons

      protected void initIcons()
    • displayWorkspaceBadge

      public boolean displayWorkspaceBadge()
    • displayInteractionBar

      public boolean displayInteractionBar()
    • getCategoryBrowserContext

      public CategoryBrowserContext getCategoryBrowserContext()
    • getDocChooserRedirect

      public String getDocChooserRedirect()
    • canWorkOn

      public boolean canWorkOn()
      Returns:
      true if logged member can work on the publication
    • canUploadNewVersion

      public boolean canUploadNewVersion()
    • processAction

      public boolean processAction() throws IOException
      Description copied from class: JcmsFormHandler
      Method to be implemented to check/validate action to be performed and process them.

      Default implementation is to return false. No need to call super method.

      This method may NOT be invoked at all if security validation are not met.

      You must ensure your handler and JSP can work properly without any code invoked in this method.

      Overrides:
      processAction in class JcmsFormHandler
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • getPublicationDisplayedDate

      public Date getPublicationDisplayedDate()
    • getUpdatedByMeta

      public String getUpdatedByMeta()
    • getRelateds

      public Collection getRelateds(Collection<Publication> relatedContents)
      Parameters:
      relatedContents - a collection of proposed related contents
      Returns:
      a Collection of related contents from the current publication
    • getPublicationDisplayedAuthor

      public Member getPublicationDisplayedAuthor()
      Returns:
      the author displayed in publication header
      Since:
      jcms-11.0.0
    • getRelatedsTitle

      public String getRelatedsTitle()
      Returns:
      the relateds cards title
      Since:
      jcms-11.0.0
    • getRelatedsTemplate

      public String getRelatedsTemplate()
    • getRelatedsTitleTag

      public String getRelatedsTitleTag()
    • getRelatedsMaxItems

      public int getRelatedsMaxItems()
    • wrapAnchorsInLi

      public static String wrapAnchorsInLi(String html)
    • isPreview

      public boolean isPreview()
    • setPreview

      public void setPreview(boolean preview)
    • setPubId

      public void setPubId(String pubId)
    • getPublication

      public Publication getPublication()
      Overrides:
      getPublication in class JcmsJspContext
      Returns:
      the current Content or Form if not null, or the Portlet (or null). Slow: we DO NOT cache this value (so do not use this getter every 2millisecs).
    • getPublication

      public <T extends Publication> T getPublication(Class<T> cl)
    • getInitHandlerJsp

      public static String getInitHandlerJsp(Publication pub)
    • showWFInfo

      public boolean showWFInfo()
    • showLockInfo

      public boolean showLockInfo()
    • setPublicationId

      public void setPublicationId(String publicationId)
    • setDisplayParams

      public void setDisplayParams(Map<String,Object> displayParams)