Class PublicationCaddyHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class PublicationCaddyHandler extends AbstractCaddyHandler<PublicationCaddyContext>
This form handler process Publication Caddy Manager actions.
See Also:
  • Field Details

  • Constructor Details

    • PublicationCaddyHandler

      public PublicationCaddyHandler()
  • Method Details

    • 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 AbstractCaddyHandler<PublicationCaddyContext>
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • getJsp

      protected String getJsp()
      Description copied from class: AbstractCaddyHandler
      Retrieve the path of the JSP.
      Specified by:
      getJsp in class AbstractCaddyHandler<PublicationCaddyContext>
      Returns:
      a path relative to the webapp root.
    • validateCommonPdateEdate

      public boolean validateCommonPdateEdate()
    • setOpRefine

      public void setOpRefine(String v)
    • setRefineCids

      public void setRefineCids(String[] refcids)
      Sets the cids to be used in refine operation to select publications which belong to the corresponding categories (remove all the others from the caddy).
      Parameters:
      refcids - The id of the category that is to be used to select a subset of the caddy.
    • setRefineTypes

      public void setRefineTypes(String[] reftypes)
      Important: This setter trigger an immediate action modifying the caddy content! Sets the types of publication to keep in the caddy.
      Parameters:
      reftypes - The types to keep in the caddy.
    • setOpTrash

      public void setOpTrash(String v)
    • getDataClass

      public Class<? extends Data> getDataClass()
      Description copied from class: AbstractCaddyHandler
      Retrieve the type of data being handled by this handler
      Specified by:
      getDataClass in class AbstractCaddyHandler<PublicationCaddyContext>
      Returns:
      a Data class
    • getNewCaddyContext

      protected PublicationCaddyContext getNewCaddyContext(Caddy caddy, Member member)
      Description copied from class: AbstractCaddyHandler
      Retrieve a new instance of CaddyContext.
      Specified by:
      getNewCaddyContext in class AbstractCaddyHandler<PublicationCaddyContext>
      Parameters:
      caddy - the current Caddy
      member - the logged Member
      Returns:
      a AbstractCaddyContext instance
    • getNewCaddyProcess

      protected AbstractCaddyProcess<PublicationCaddyContext> getNewCaddyProcess()
      Description copied from class: AbstractCaddyHandler
      Retrieve a new instance of CaddyProcess to start action when required.
      Specified by:
      getNewCaddyProcess in class AbstractCaddyHandler<PublicationCaddyContext>
      Returns:
      a AbstractCaddyProcess instance
    • validateUpdate

      protected boolean validateUpdate()
      Overrides:
      validateUpdate in class AbstractCaddyHandler<PublicationCaddyContext>
    • getCategorySet

      public SortedSet<Category> getCategorySet()
      Returns:
      a Set of Category
    • isExpanded

      public boolean isExpanded(Category cat, String inputName)
      Check if the specified category has been expanded in the treecat
      Parameters:
      cat - the category to check, must not be null
      inputName - this parameter is not used
      Returns:
      true if the given category must be expanded
      Since:
      jcms-3.0
    • isWFHomogeneous

      public boolean isWFHomogeneous()
      Check if publication in the caddy use the same Workflow.
      Returns:
      true if all publication in the caddy use the same Workflow
      Since:
      jcms-4.1
    • getCommonWorkflow

      public Workflow getCommonWorkflow()
    • getCommonWFState

      public WFState getCommonWFState()
    • isTypeHomogeneous

      public boolean isTypeHomogeneous()
      Check if publication in the caddy are of same class.
      Returns:
      true if all publication in the caddy are of the same type
      Since:
      jcms-4.1
    • getCommonClass

      public Class<? extends Publication> getCommonClass()
    • getCommonSuperClass

      public Class<? extends Publication> getCommonSuperClass()
      Retrieve the common super class of all publicaiton in the caddy
      Returns:
      a class, return null, Publication.class is guaranteed to be at least the most commont one
      Since:
      jcms-10.0.4 / JCMS-5407
    • isPortletSkinable

      public boolean isPortletSkinable()
      Check if all publication in the caddy are PortletSkinable.
      Returns:
      true if all publication in the caddy are PortletSkinable
      Since:
      jcms-10.0.4 / JCMS-5407
    • isPortalElement

      public boolean isPortalElement()
      Check if all publication in the caddy are PortalElement.
      Returns:
      true if all publication in the caddy are PortalElement
      Since:
      jcms-10.0.4 / JCMS-5407
    • isPortlet

      public boolean isPortlet()
      Check if all publication in the caddy are Portlet.
      Returns:
      true if all publication in the caddy are Portlet
      Since:
      jcms-10.0.4 / JCMS-5407
    • isPortal

      public boolean isPortal()
      Check if all publication in the caddy are Portal.
      Returns:
      true if all publication in the caddy are Portal
      Since:
      jcms-10.0.4 / JCMS-5407
    • containsOnlyTrashablePublication

      public boolean containsOnlyTrashablePublication()
      Check if all publication in the caddy are trashable
      Returns:
      true if all publication in the caddy are trashable
      Since:
      jcms-10.0.5 / JCMS-8353
    • containsOnlyUntrashablePublication

      public boolean containsOnlyUntrashablePublication()
      Check if all publication in the caddy are untrashable
      Returns:
      true if all publication in the caddy are untrashable
      Since:
      jcms-10.0.7 / JCMS-9473
    • getAuthorId

      public String getAuthorId()
    • getAuthor

      public Member getAuthor()
    • setAuthorId

      public void setAuthorId(String v)
    • getAvailableNewWS

      public Workspace getAvailableNewWS()
    • setNewWSId

      public void setNewWSId(String v)
    • getTemplates

      public String[] getTemplates()
      Retrieve the templates value that were asked to be set for publication.
      Returns:
      an array of template name or null if no templates was requested
    • setTemplates

      public void setTemplates(String[] templates)
      Set the templates to define for the set of publication in the caddy.
      Parameters:
      templates - an array of template name, or null to skipp
    • getPstatus

      public int getPstatus()
      Get the value of pstatus.
      Returns:
      Value of pstatus.
    • setPstatus

      public void setPstatus(int v)
      Set the value of pstatus.
      Parameters:
      v - Value to assign to pstatus.
    • setPdate

      public void setPdate(String v)
      Set the value of pdate.
      Parameters:
      v - Value to assign to pdate.
    • setEdate

      public void setEdate(String v)
      Set the value of edate.
      Parameters:
      v - Value to assign to edate.
    • setAdate

      public void setAdate(String v)
      Set the value of adate.
      Parameters:
      v - Value to assign to adate.
    • getNoPdate

      public boolean getNoPdate()
      Get the value of noPdate.
      Returns:
      Value of noPdate.
    • setNoPdate

      public void setNoPdate(boolean v)
      Set the value of noPdate.
      Parameters:
      v - Value to assign to noPdate.
    • getNoEdate

      public boolean getNoEdate()
      Get the value of noEdate.
      Returns:
      Value of noEdate.
    • setNoEdate

      public void setNoEdate(boolean v)
      Set the value of noEdate.
      Parameters:
      v - Value to assign to noEdate.
    • getNoAdate

      public boolean getNoAdate()
      Get the value of noAdate.
      Returns:
      Value of noAdate.
    • setNoAdate

      public void setNoAdate(boolean v)
      Set the value of noAdate.
      Parameters:
      v - Value to assign to noAdate.
    • setAuthorizedMemberIds

      public void setAuthorizedMemberIds(String[] mbrIds)
      Set the value of authorizedMemberIds.
      Parameters:
      mbrIds - Value to assign to authorizedMemberIds.
      Since:
      jcms-2.1
    • getAvailableAuthorizedGroups

      public Group[] getAvailableAuthorizedGroups()
    • getAvailableAuthor

      public Member getAvailableAuthor()
    • getAvailableTemplates

      public String[] getAvailableTemplates()
    • setAuthorizedGroups

      public void setAuthorizedGroups(String[] v)
    • setAuthorizedGroupsAddCount

      public void setAuthorizedGroupsAddCount(int v)
    • setAuthorizedMemberSetAddCount

      public void setAuthorizedMemberSetAddCount(int v)
    • setUpdateMemberSetAddCount

      public void setUpdateMemberSetAddCount(int v)
    • getAuthorizedGroupsCount

      public int getAuthorizedGroupsCount()
    • getAuthorizedGroupsAddCount

      public int getAuthorizedGroupsAddCount()
    • getAvailableAuthorizedMemberSet

      public Set<Member> getAvailableAuthorizedMemberSet()
    • getAvailableUpdateMemberSet

      public Set<Member> getAvailableUpdateMemberSet()
    • getAvailablePdate

      public Date getAvailablePdate()
    • getAvailableEdate

      public Date getAvailableEdate()
    • getAvailableAdate

      public Date getAvailableAdate()
    • getAvailableRestrictUpdateRights

      public Boolean getAvailableRestrictUpdateRights()
    • setRestrictUpdateRights

      public void setRestrictUpdateRights(String v)
    • setUpdateMemberIds

      public void setUpdateMemberIds(String[] mbrIds)
      Set the value of updateMemberIds.
      Parameters:
      mbrIds - Value to assign to updateMemberIds.
      Since:
      jcms-3.2
    • getAvailableUpdateGroups

      public Group[] getAvailableUpdateGroups()
    • setUpdateGroups

      public void setUpdateGroups(String[] v)
    • setUpdateGroupsAddCount

      public void setUpdateGroupsAddCount(int v)
    • getUpdateGroupsCount

      public int getUpdateGroupsCount()
    • getUpdateGroupsAddCount

      public int getUpdateGroupsAddCount()
    • getAuthorizedMemberSetCount

      public int getAuthorizedMemberSetCount()
    • getUpdateMemberSetCount

      public int getUpdateMemberSetCount()
    • getUpdateMemberSetAddCount

      public int getUpdateMemberSetAddCount()
    • getNoReadRight

      public boolean getNoReadRight()
      Get the value of noReadRight.
      Returns:
      Value of noReadRight.
    • setNoReadRight

      public void setNoReadRight(boolean v)
      Set the value of noReadRight.
      Parameters:
      v - Value to assign to noReadRight.
    • getNoUpdateRight

      public boolean getNoUpdateRight()
      Get the value of noUpdateRight.
      Returns:
      Value of noUpdateRight.
    • setNoUpdateRight

      public void setNoUpdateRight(boolean v)
      Set the value of noUpdateRight.
      Parameters:
      v - Value to assign to noUpdateRight.
    • setNoCategory

      public void setNoCategory(boolean v)
      Set the value of noCategory.
      Parameters:
      v - Value to assign to noCategory.
    • getNoCategory

      public boolean getNoCategory()
      Gets the value of noCategory
      Returns:
      true if category should be removed from all publication
    • setNoCommonCategory

      public void setNoCommonCategory(boolean v)
      Set the value of noCommonCategory.
      Parameters:
      v - Value to assign to noCommonCategory.
    • getNoCommonCategory

      public boolean getNoCommonCategory()
      Gets the value of noCommonCategory
      Returns:
      true if category common to all publication should be removed
    • setCids

      public void setCids(String[] cids)
      Set the value of cids.
      Parameters:
      cids - Value to assign to cids.
    • setTracked

      public void setTracked(String track)
      Set whether publication should be tracked or not.
      Parameters:
      track - true to enable reader tracker for all publication false to disable it
      Since:
      jcms-5.0.0
    • isCommonTrackedAvailable

      public boolean isCommonTrackedAvailable()
      Check if a common tracked value was found for all publication of the caddy
      Returns:
      true if a common value could be computed, false if value differ
      Since:
      jcms-5.0.0
    • getCommonTracked

      public boolean getCommonTracked()
      Retrieve the tracked value common to all publication, this getter is only valid if isCommonTrackedAvailable() is true.
      Returns:
      the common tracked value of all publication
      Since:
      jcms-5.0.0
    • setMainLanguage

      public void setMainLanguage(String lang)
      Set the main language to assign to all publication.
      Parameters:
      lang - an ISO-639 language code
      Since:
      jcms-5.5.0
    • getCommonMainLanguage

      public String getCommonMainLanguage()
      Retrieve the mainlanguage common to all publication, if any.
      Returns:
      an ISO-639 language code or null if no common language could be computed
      Since:
      jcms-5.5.0
    • setMajorUpdate

      public void setMajorUpdate(String v)
      Set whether the update perform by the caddy on publication should be a major updated
      Parameters:
      v - the value of this parameter is ignored, as long as this method is invoked the update will be a major update
      Since:
      jcms-5.7.0
    • getRemoveFriendlyURLs

      public boolean getRemoveFriendlyURLs()
      Check if friendly url will be removed during update.
      Returns:
      true if friendly urls should be removed for all publication of the caddy
      Since:
      jcms-5.5.0
    • setRemoveFriendlyURLs

      public void setRemoveFriendlyURLs(boolean remove)
      Set if friendly urls should be removed for all publication of the caddy
      Parameters:
      remove - true to remove friendly url, false to leave as is
      Since:
      jcms-5.5.0
    • getGenerateFriendlyURLs

      public boolean getGenerateFriendlyURLs()
      Check whether friendly URL should be automatically generated from publication's category and title.
      Returns:
      true if friendly URL will be generated
      Since:
      jcms-5.5.0
    • setGenerateFriendlyURLs

      public void setGenerateFriendlyURLs(boolean generate)
      Set whether friendly URL should be automatically generated from publication's category and title.
      Parameters:
      generate - true to generate new friendly url (added to existing one), false to leave friendly url as is
      Since:
      jcms-5.5.0
    • setChild

      public void setChild(String id)
    • getAvailableChild

      public PortalElement getAvailableChild()
    • setExactCategory

      public void setExactCategory(boolean v)
    • getAvailableExactCategory

      public boolean getAvailableExactCategory()
    • setCssFile

      public void setCssFile(String[] v)
    • getAvailableCssFile

      public String getAvailableCssFile()
    • setSkinClasses

      public void setSkinClasses(String[] v)
    • getAvailableSkinClasses

      public String getAvailableSkinClasses()
    • setSkinFooter

      public void setSkinFooter(String[] v)
    • getAllAvailableSkinFooterML

      public HashMap<String,String> getAllAvailableSkinFooterML()
    • setExpandState

      public void setExpandState(String[] v)
    • getAvailableExpandState

      public String getAvailableExpandState()
    • setPopupState

      public void setPopupState(String[] v)
    • getAvailablePopupState

      public String getAvailablePopupState()
    • setBackImage

      public void setBackImage(String[] v)
    • getAvailableBackImage

      public String getAvailableBackImage()
    • setBorder

      public void setBorder(String v)
    • getAvailableBorder

      public int getAvailableBorder()
    • setBackColor

      public void setBackColor(String[] v)
    • getAvailableBackColor

      public String getAvailableBackColor()
    • setBorderColor

      public void setBorderColor(String[] v)
    • getAvailableBorderColor

      public String getAvailableBorderColor()
    • setInsetTop

      public void setInsetTop(String v)
    • getAvailableInsetTop

      public int getAvailableInsetTop()
    • setInsetLeft

      public void setInsetLeft(String v)
    • getAvailableInsetLeft

      public int getAvailableInsetLeft()
    • setCellPadding

      public void setCellPadding(String v)
    • getAvailableCellPadding

      public int getAvailableCellPadding()
    • setInsetRight

      public void setInsetRight(String v)
    • getAvailableInsetRight

      public int getAvailableInsetRight()
    • setInsetBottom

      public void setInsetBottom(String v)
    • getAvailableInsetBottom

      public int getAvailableInsetBottom()
    • setWidth

      public void setWidth(String[] v)
    • getAvailableWidth

      public String getAvailableWidth()
    • setAlignTable

      public void setAlignTable(String[] v)
    • getAvailableAlignTable

      public String getAvailableAlignTable()
    • setAlignV

      public void setAlignV(String[] v)
    • getAvailableAlignV

      public String getAvailableAlignV()
    • setAlignH

      public void setAlignH(String[] v)
    • getAvailableAlignH

      public String getAvailableAlignH()
    • setCacheType

      public void setCacheType(String[] v)
    • getAvailableCacheType

      public String getAvailableCacheType()
    • setCacheSensibility

      public void setCacheSensibility(String[] v)
    • getAvailableCacheSensibility

      public String getAvailableCacheSensibility()
    • setInvalidClass

      public void setInvalidClass(String[] v)
    • getAvailableInvalidClass

      public String[] getAvailableInvalidClass()
    • setInvalidTime

      public void setInvalidTime(String v)
    • getAvailableInvalidTime

      public long getAvailableInvalidTime()
    • setBehaviorCopy

      public void setBehaviorCopy(String[] v)
    • getAvailableBehaviorCopy

      public String getAvailableBehaviorCopy()
    • setCondition

      public void setCondition(String[] v)
    • getAvailableCondition

      public String[] getAvailableCondition()
    • setAbilities

      public void setAbilities(String[] abilities)
    • getAvailableAbilities

      public String[] getAvailableAbilities()
    • setSilentUpdate

      public void setSilentUpdate(String val)