Class EditPublicationHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants
Direct Known Subclasses:
AbstractEditDBFaqEntryHandler, AbstractEditFaqEntryHandler, AddArticleHandler, DocUploadHandler, DuplicateModalHandler, EditFileDocumentHandler, EditFormHandler, EditPortalElementHandler, generated.EditShortcutHandler, ValidateStateChangePublicationHandler

public class EditPublicationHandler extends EditDataHandler
This form handler processes Publication forms.
Author:
Olivier Dedieu
See Also:
  • Field Details

    • ID_TOKEN

      public static final String ID_TOKEN
      See Also:
    • DISPLAY_URL_TOKEN

      public static final String DISPLAY_URL_TOKEN
      See Also:
    • PREVIEW_URL_TOKEN

      public static final String PREVIEW_URL_TOKEN
      See Also:
    • CTX_SKIP_ACTIVITY

      public static final String CTX_SKIP_ACTIVITY
      See Also:
    • LAST_PUBLICATION_NOT_STORED

      public static final String LAST_PUBLICATION_NOT_STORED
      Session attribute name used to store the last Publication not created, by user request.

      Creation can be cancelled with doNotStore=true parameter.
      Used by "work/lastPublicationXml.jsp" to dump the last Data content as XML.

      See Also:
    • FULL_EDIT

      public static final String FULL_EDIT
      Request attribute used to indicate EditPublicationHandler is invoked in context of full (legacy) edit template.
      Since:
      11.0.0 / JCMS-11723
      See Also:
    • SIMPLE_MODAL

      public static final String SIMPLE_MODAL
      Request attribute used to indicate EditPublicationHandler is invoked in context of simple modal.
      Since:
      11.0.0 / JCMS-11723
      See Also:
    • FULL_MODAL

      public static final String FULL_MODAL
      Request attribute used to indicate EditPublicationHandler is invoked in context of advanced modal.
      Since:
      11.0.0 / JCMS-11723
      See Also:
    • SHOW_MODAL_EDITION_CHANGE

      public static final String SHOW_MODAL_EDITION_CHANGE
      Request attribute which can be specified to show/hide the button to switch from advanced/simple edition in modal footer.
      Since:
      11.0.0 / JCMS-11723
      See Also:
    • SHOW_MAJOR_UPDATE_OPTION

      public static final String SHOW_MAJOR_UPDATE_OPTION
      Request attribute which can be specified to show/hide the major update option in modal footer.
      Since:
      11.0.0 / JCMS-11723
      See Also:
    • opMerge

      protected boolean opMerge
    • opAddItem

      protected boolean opAddItem
    • opAddItemReadRights

      protected boolean opAddItemReadRights
    • opAddItemUpdateRights

      protected boolean opAddItemUpdateRights
    • majorUpdate

      protected boolean majorUpdate
    • opTrash

      protected boolean opTrash
    • opUntrash

      protected boolean opUntrash
    • title

      protected String title
    • titleML

      protected HashMap<String,String> titleML
    • cids

      protected String[] cids
    • templates

      protected String[] templates
    • pstatus

      protected int pstatus
    • oldPstatus

      protected int oldPstatus
    • pdate

      protected Date pdate
    • edate

      protected Date edate
    • sdate

      protected Date sdate
    • adate

      protected Date adate
    • wfNote

      protected String wfNote
    • authorizedMemberSetAddCount

      protected int authorizedMemberSetAddCount
    • authorizedGroupsAddCount

      protected int authorizedGroupsAddCount
    • updateMemberSetAddCount

      protected int updateMemberSetAddCount
    • updateGroupsAddCount

      protected int updateGroupsAddCount
    • restrictUpdateRights

      protected boolean restrictUpdateRights
    • classificationLevel

      protected int classificationLevel
    • anchor

      protected String anchor
    • isTracked

      protected boolean isTracked
    • readAck

      protected boolean readAck
    • mainLanguage

      protected String mainLanguage
    • friendlyURLSet

      protected TreeSet<String> friendlyURLSet
    • roleIds

      protected String[] roleIds
    • roleMembers

      protected Member[] roleMembers
    • roleMap

      protected HashMap<String,TreeSet<Member>> roleMap
    • publication

      protected Publication publication
    • pubClass

      protected Class<? extends Publication> pubClass
    • wste

      protected WSTypeEntry wste
    • wf

      protected Workflow wf
    • internalWf

      protected Workflow internalWf
    • author

      protected Member author
    • isAuthorForced

      protected boolean isAuthorForced
    • categorySet

      protected Set<Category> categorySet
    • authorizedMemberSet

      protected TreeSet<Member> authorizedMemberSet
    • authorizedGroupSet

      protected TreeSet<Group> authorizedGroupSet
    • updateMemberSet

      protected TreeSet<Member> updateMemberSet
    • updateGroupSet

      protected TreeSet<Group> updateGroupSet
    • attachWorkspaceSet

      protected Set<Workspace> attachWorkspaceSet
    • openTab

      protected int openTab
    • showAllTabs

      protected boolean showAllTabs
    • showContentTabOnly

      protected boolean showContentTabOnly
    • typeLabel

      protected String typeLabel
    • isContentType

      protected boolean isContentType
    • isPortletType

      protected boolean isPortletType
    • isFormType

      protected boolean isFormType
    • isUGCType

      protected boolean isUGCType
    • isDBType

      protected boolean isDBType
    • reviewRating

      protected int reviewRating
    • listToProcess

      protected String listToProcess
    • itemPos

      protected int itemPos
    • workingPub

      protected Publication workingPub
    • fieldStatusMap

      protected Map<String,FieldStatus> fieldStatusMap
    • doNotStore

      protected boolean doNotStore
    • opLock

      protected boolean opLock
    • opUnlock

      protected boolean opUnlock
    • opRequestUnlock

      protected boolean opRequestUnlock
    • checkMemberForRequestUnlock

      protected boolean checkMemberForRequestUnlock
    • requestUnlockMessage

      protected String requestUnlockMessage
    • ignoreWorkspaceCompliance

      protected boolean ignoreWorkspaceCompliance
    • skipActivity

      protected boolean skipActivity
    • createFromPublicationChooser

      protected boolean createFromPublicationChooser
    • useDefaultCategories

      protected boolean useDefaultCategories
    • useDefaultCategoriesModified

      protected boolean useDefaultCategoriesModified
    • useDefaultReadRights

      protected boolean useDefaultReadRights
    • useDefaultReadRightsModified

      protected boolean useDefaultReadRightsModified
    • useDefaultUpdateRights

      public boolean useDefaultUpdateRights
    • useDefaultUpdateRightsModified

      public boolean useDefaultUpdateRightsModified
  • Constructor Details

    • EditPublicationHandler

      public EditPublicationHandler()
  • Method Details

    • getDataClass

      public Class<? extends Data> getDataClass()
      Specified by:
      getDataClass in class EditDataHandler
    • getPublicationClass

      public Class<? extends Publication> getPublicationClass()
    • 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)
    • setInternalWf

      public void setInternalWf(String internalWf)
    • getAvailableInternalWorkflow

      public Workflow getAvailableInternalWorkflow()
    • getWorkflow

      public Workflow getWorkflow()
    • getWSTypeEntry

      public WSTypeEntry getWSTypeEntry()
    • setWSTypeEntry

      public void setWSTypeEntry(WSTypeEntry wste)
      Force the WSTypeEntry to use with the specified one
      Parameters:
      wste - must not be null
      Since:
      jcms-10.0.6 / JCMS-8724
    • getTabLabel

      public String getTabLabel(String tabId)
    • 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
    • completeRemovedCatSetWithTypeFieldRootCat

      public void completeRemovedCatSetWithTypeFieldRootCat(Set<Category> removedCatSet)
      Complete the set of categories root which must be removed from the fields in the categories tab, with the root categories of the current type field.

      This method is only invoked by work/doEditCommonPubAttribute_categories.jspf just before rendering the category field

      Parameters:
      removedCatSet - the removedCatSet already computed, must not be null
      Since:
      11.0.0 getRemovedCatSet()
    • getRemovedCatSet

      public Set<Category> getRemovedCatSet()
      Retrieve the categories root which must be removed from the fields in the categories tab.
      Returns:
      a Set of Category, never return null
      Since:
      11.0.0
    • getOldPstatus

      public int getOldPstatus()
    • 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 EditDataHandler
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • mustSendForbiddenOnCSRF

      protected boolean mustSendForbiddenOnCSRF()
      Description copied from class: JcmsFormHandler
      Check behavior to apply on CSRF error.

      Default behavior is to send forbidden redirect, this method allows the redirection to be skipped and form to be displayed.

      Override with extreme precaution, if you want to display form on CSRF error, make sure user is authorized to access data manipulated.

      Overrides:
      mustSendForbiddenOnCSRF in class JcmsFormHandler
      Returns:
      true to send forbidden (default), false to display form with current user data. In both case processAction is not invoked.
    • canDisplayEditForm

      protected boolean canDisplayEditForm()
      Checks if current user is allowed to display the edit form in current context.

      Important : this method only performs ADDITIONAL verification targeted only for the UI access control, it MUST be invoked in edit form JSP, after the validate() method which provides the low level security features.

      Returns:
      true if UI can be displayed, false otherwise
      Since:
      JCMS-11620
    • validateBeforeOp

      public boolean validateBeforeOp()
    • releaseDBWorkingPub

      protected void releaseDBWorkingPub()
    • useWeakLockInModal

      public boolean useWeakLockInModal()
      Check if weak lock should used in modal edition (set when opened, released on close/cancel).

      Default behavior is to read property channel.weak-lock-in-modal.enabled with false as default value.

      Returns:
      true if weak lock should be used, false otherwise
      Since:
      11.0.0 / JCMS-11723
    • lock

      protected void lock()
    • unlock

      protected void unlock()
    • sendRedirect

      protected void sendRedirect() throws IOException
      Overrides:
      sendRedirect in class EditDataHandler
      Throws:
      IOException
    • getClosePopupUrl

      protected String getClosePopupUrl()
      Overrides:
      getClosePopupUrl in class JcmsFormHandler
    • initWorkspace

      protected void initWorkspace()
    • validateMember

      public boolean validateMember() throws IOException
      Throws:
      IOException
    • validateForm

      public boolean validateForm() throws IOException
      Returns true if the publication class can be published in workspace.
      Returns:
      true if the publication class can be published in workspace.
      Throws:
      IOException - if an exception occurs
      Since:
      jcms-8.0.3, jcms-9.0.1
    • validateWorkspace

      public boolean validateWorkspace() throws IOException
      Throws:
      IOException
    • processStatus

      protected boolean processStatus(ControllerStatus status) throws IOException
      Description copied from class: JcmsFormHandler
      Process the ControllerStatus: do nothing if OK, or send on forbidden, or put a warning message in the request.
      Overrides:
      processStatus in class JcmsFormHandler
      Parameters:
      status - the ControllerStatus to be processed
      Returns:
      true when status is OK, false if status was a failure (forbidden or anything else)
      Throws:
      IOException - if an error occurs
    • validateFieldFormat

      public boolean validateFieldFormat()
    • validateCreate

      public boolean validateCreate() throws IOException
      Throws:
      IOException
    • performCreate

      public boolean performCreate() throws IOException
      Throws:
      IOException
    • internalPerformCreate

      protected boolean internalPerformCreate() throws IOException
      Throws:
      IOException
    • getControllerContext

      protected HashMap<String,Object> getControllerContext()
      Description copied from class: JcmsFormHandler
      Build a controller context. I.E. add request, response and loggedMember.
      Overrides:
      getControllerContext in class EditDataHandler
      Returns:
      the HashMap which contains the context
    • validateUpdate

      public boolean validateUpdate() throws IOException
      Throws:
      IOException
    • performUpdate

      public boolean performUpdate() throws IOException
      Throws:
      IOException
    • internalPerformUpdate

      protected boolean internalPerformUpdate() throws IOException
      Throws:
      IOException
    • workflowHasNotBeenChanged

      protected boolean workflowHasNotBeenChanged()
    • doWorkflowUpdate

      public static void doWorkflowUpdate(Publication origPub, Publication updatedPub, EditPublicationHandler handler)
    • setSilentUpdate

      public void setSilentUpdate(String val)
    • validateDelete

      public boolean validateDelete() throws IOException
      Throws:
      IOException
    • performDelete

      public boolean performDelete() throws IOException
      Throws:
      IOException
    • internalPerformDelete

      protected boolean internalPerformDelete() throws IOException
      Throws:
      IOException
    • validateMerge

      public boolean validateMerge()
    • performMerge

      public boolean performMerge() throws IOException
      Throws:
      IOException
    • validateTrash

      public boolean validateTrash() throws IOException
      Check all condition required are met to authorize current publication to be put in the trash.
      Returns:
      true if operation can be performed, false otherwise
      Throws:
      IOException - if this exception occures
      Since:
      jcms-10.0.5 / JCMS-8353
    • performTrash

      public boolean performTrash() throws IOException
      Effectively update the publication so it is put in the trash.
      Returns:
      true, indicating a redirect must be performed
      Throws:
      IOException - if this exception occures
      Since:
      jcms-10.0.5 / JCMS-8353
    • validateUntrash

      public boolean validateUntrash() throws IOException
      Check all condition required are met to authorize current publication to be removed from the trash.
      Returns:
      true if operation can be performed, false otherwise
      Throws:
      IOException - if this exception occures
      Since:
      jcms-10.0.5 / JCMS-8353
    • performUntrash

      public boolean performUntrash() throws IOException
      Effectively update the publication so it is removed from trash.
      Returns:
      true, indicating a redirect must be performed
      Throws:
      IOException - if this exception occures
      Since:
      jcms-10.0.5 / JCMS-8353
    • validateLock

      public boolean validateLock() throws IOException
      Throws:
      IOException
    • performLock

      public boolean performLock() throws IOException
      Throws:
      IOException
    • validateUnlock

      public boolean validateUnlock() throws IOException
      Throws:
      IOException
    • performUnlock

      public boolean performUnlock() throws IOException
      Throws:
      IOException
    • validateRequestUnlock

      public boolean validateRequestUnlock() throws IOException
      Throws:
      IOException
    • performRequestUnlock

      public boolean performRequestUnlock() throws IOException
      Throws:
      IOException
    • validateAddItem

      public boolean validateAddItem()
    • performAddItem

      public boolean performAddItem() throws IOException
      Throws:
      IOException
    • validateAddItemReadRights

      public boolean validateAddItemReadRights()
    • performAddItemReadRights

      public boolean performAddItemReadRights() throws IOException
      Throws:
      IOException
    • validateAddItemUpdateRights

      public boolean validateAddItemUpdateRights()
    • performAddItemUpdateRights

      public boolean performAddItemUpdateRights() throws IOException
      Throws:
      IOException
    • performCancel

      public boolean performCancel() throws IOException
      Overrides:
      performCancel in class EditDataHandler
      Throws:
      IOException
    • getModalRedirect

      public String getModalRedirect()
      Description copied from class: JcmsFormHandler
      Get the redirect value to be used in the modals with modalRedirect.jspf and the request attribute 'modal.redirect'.
      Overrides:
      getModalRedirect in class EditDataHandler
      Returns:
      redirect value
    • performRefresh

      public boolean performRefresh() throws IOException
      Overrides:
      performRefresh in class EditDataHandler
      Throws:
      IOException
    • prepare

      public void prepare()
    • setFields

      public void setFields(Publication pub)
      Set the common (Publication) fields. This method is also a hook for sub-classed to fill some field (or do anything else) before a create or an update.
      Parameters:
      pub - the publication to set the fields
      Since:
      jcms-4.0
    • isFieldEdition

      public boolean isFieldEdition(String field)
      Overrides:
      isFieldEdition in class JcmsFormHandler
      Parameters:
      field - field name
      Returns:
      true if this handler is invoked to edit only some fields of the data
      See Also:
    • isDBType

      public boolean isDBType()
      Returns true if the publication class extends DBData.
      Returns:
      true if the publication class extends DBData.
      Since:
      jcms-6.0.0
    • showWFRole

      public boolean showWFRole()
    • showReaderTracker

      public boolean showReaderTracker()
      Returns:
      true if reader tracker input choice must be displayed for current Publication edited
    • showReadAck

      public boolean showReadAck()
    • showAttachWorkspaceSet

      public boolean showAttachWorkspaceSet()
    • showMainLanguage

      public boolean showMainLanguage()
    • isFullEdit

      public boolean isFullEdit()
      Check if this EditPublicationHandler is invoked in context of full (legacy) edit pub form.
      Returns:
      true if full (legacy) edit JSP modal, false otherwise
      Since:
      11.0.0 / JCMS-11723
    • isSimpleModal

      public boolean isSimpleModal()
      Check if this EditPublicationHandler is invoked in context of simple modal.
      Returns:
      true if simple modal, false otherwise
      Since:
      11.0.0 / JCMS-11723
    • isFullModal

      public boolean isFullModal()
      Check if this EditPublicationHandler is invoked in context of full modal.
      Returns:
      true if simple modal, false otherwise
      Since:
      11.0.0 / JCMS-11723
    • isModalEdition

      public boolean isModalEdition()
      Check if this EditPublicationHandler is invoked in context of simple or full modal.
      Returns:
      true if simple modal, false otherwise
      Since:
      11.0.0 / JCMS-11723
    • setCreateFromPublicationChooser

      public void setCreateFromPublicationChooser(boolean createFromPublicationChooser)
    • isCreateFromPublicationChooser

      public boolean isCreateFromPublicationChooser()
    • isPublicationCreatedFromChooser

      public boolean isPublicationCreatedFromChooser()
    • getSimpleModalTitle

      public String getSimpleModalTitle()
      Retrieve the title to use in the simple modal.

      Default behavior is to read I18N property ui.work.form.header.simple-modal-title.{CurrentTypeShortName}.

      Returns:
      the title to use or an empty string to use default title computed by ModalTag
      Since:
      11.0.0 / JCMS-11723
    • getFullModalTitle

      public String getFullModalTitle()
      Retrieve the title to use in the full modal.

      Default behavior is to read I18N property ui.work.form.header.full-modal-title.{CurrentTypeShortName} or to default to getSimpleModalTitle().

      Returns:
      the title to use or an empty string to use default title computed by ModalTag
      Since:
      11.0.0 / JCMS-11723
    • showModalEditionChange

      public boolean showModalEditionChange()
      Check if the "Advanced edition" or "Simple edition" button should be displayed in modal footer.

      The default implementation of this method is to check for request attribute SHOW_MODAL_EDITION_CHANGE. If the attribute is not set, the button is displayed only when editing an existing publication (i.e. getPublication() is not null), and hidden when creating a new one.

      You can set the attribute to a custom value or provide a custom FormHandler to override this behavior.

      See jcore/modalPubFormHandler.jspf for use of this method.

      Returns:
      true to display the button, false to hide it
      Since:
      11.0.0 / JCMS-11723
    • showMajorUpdate

      public boolean showMajorUpdate()
      Check if the "Major update" checkbox should be displayed in modal footer.

      The default implementation of this method is to check for request attribute SHOW_MAJOR_UPDATE_OPTION or default to true when in full modal, false otherwise.

      You can set the attribute to a custom value or provide a custom FormHandler to override this behavior.

      See jcore/modalPubFormHandler.jspf for use of this method.

      Returns:
      true to display the button, false to hide it
      Since:
      11.0.0 / JCMS-11723
    • showSuperFieldsInCollapsible

      public boolean showSuperFieldsInCollapsible()
      Check if the fields provided by the super type of the current type should be grouped in collapsible, or place inline.
      Returns:
      true to place super fields in a collapsible, false to place super fields inline (after current fields)
      Since:
      11.0.0
    • showSDate

      public boolean showSDate()
    • showFriendlyURL

      public boolean showFriendlyURL()
    • showLanguageChooser

      public boolean showLanguageChooser()
      Returns:
      true if channel is multilingual and current Publication type has at least one multilingual field.
    • showForceDelete

      public boolean showForceDelete()
      Returns true if the "Force deletion" option must be proposed.
      Returns:
      true if the "Force deletion" option must be proposed.
      Since:
      jcms-5.5.0
    • isLocked

      public boolean isLocked()
      Returns true if the publication is (weakly) locked (by another Member).
      Returns:
      true if the publication is (weakly) locked (by another Member).
      Since:
      jcms-5.7.0
    • isStrongLocked

      public boolean isStrongLocked()
      Returns true if the publication is locked (strong lock) by another Member.
      Returns:
      true if the publication is locked (strong lock) by another Member.
      Since:
      jcms-5.7.0
    • checkStrongLock

      public boolean checkStrongLock()
    • showLockWarning

      public boolean showLockWarning()
      Returns true if the lock warning message must be displayed.
      Returns:
      true if the lock warning message must be displayed.
      Since:
      jcms-5.7.0
    • setOpenTab

      public void setOpenTab(int openTab)
      Set the open tab
      Parameters:
      openTab - the tab to open
      Since:
      jcms-4.0
    • getOpenTab

      public int getOpenTab()
      Returns:
      the open tab
      Since:
      jcms-4.0
    • isTabForced

      public boolean isTabForced()
      Returns:
      true if a tab has been forced
      Since:
      jcms-4.0
    • containsHiddenParts

      public boolean containsHiddenParts()
      Returns:
      true if there is at least one tab hidden
      Since:
      jcms-5.7.1
    • containsHiddenFields

      protected boolean containsHiddenFields()
    • setShowAllTabs

      public void setShowAllTabs(boolean v)
    • getShowAllTabs

      public boolean getShowAllTabs()
    • setShowContentTabOnly

      public void setShowContentTabOnly(boolean v)
    • getShowContentTabOnly

      public boolean getShowContentTabOnly()
    • isContentTabOnly

      public boolean isContentTabOnly()
    • hideSingleTab

      public boolean hideSingleTab()
      Check if tabs decoration should be displayed in edit pub if only one tab was displayed.
      Returns:
      true to hide tab decoration if there is only one single tab. false to display tab decoration anyway.
      Since:
      11.0.0 / JCMS-11630
    • showTitleFieldInMainTab

      public boolean showTitleFieldInMainTab()
      Check if the title field should be displayed inside the main tab (instead of being displayed in the edit form header).
      Since:
      11.0.0 / JCMS-11333 / use of new tabs in publication edit form
    • isCategoryTabHidden

      public boolean isCategoryTabHidden()
    • isReadRightTabHidden

      public boolean isReadRightTabHidden()
    • isUpdateRightTabHidden

      public boolean isUpdateRightTabHidden()
    • isClassificationTabHidden

      public boolean isClassificationTabHidden()
      Check if the classification tab should be hidden or not
      Returns:
      true to hide tab, false to display it
      Since:
      10.0.8 / JCMS-10746
    • isCommonRightTabHidden

      protected boolean isCommonRightTabHidden(boolean isReadTab)
    • isTemplateTabHidden

      public boolean isTemplateTabHidden()
    • isWorkflowTabHidden

      public boolean isWorkflowTabHidden()
    • isAdvancedTabHidden

      public boolean isAdvancedTabHidden()
    • setUseDefaultCategories

      public void setUseDefaultCategories(boolean useDefaultCategories)
    • getAvailableUseDefaultCategories

      public boolean getAvailableUseDefaultCategories()
    • getAvailableCategories

      public Category[] getAvailableCategories()
    • getCategorySet

      public Set<Category> getCategorySet(String inputName)
      Returns the root set bound to the given inputName
      Parameters:
      inputName - the name of category set to get
      Returns:
      a Set of Category
      Since:
      jcms-3.0
    • resetCategorySet

      public void resetCategorySet()
      Invalidate any computed cache of the categorySet value
      Since:
      jcms-10.0.6 / JCMS-8724
    • getHiddenCatSet

      public Set<Category> getHiddenCatSet(Set<Category> typeRemovedCatSet)
      Parameters:
      typeRemovedCatSet - the root of categories for custom fields
      Returns:
      the hidden categories
      Since:
      jcms-5.6.2
    • isExpanded

      public boolean isExpanded(Category cat, String inputName)
      Parameters:
      cat - the category
      inputName - the name of the input
      Returns:
      true if the given category must be expanded
      Since:
      jcms-3.0
    • getTitleFieldValue

      public Object getTitleFieldValue(boolean isTitleML)
      Retrieve an UNESCAPED version of the title(s).

      DO NOT print this value in HTML without proper encoding.

      Parameters:
      isTitleML - true if the title is multilingual
      Returns:
      a String (for monolingual title) or a Map<String,String> (for multilingual title)
    • getAvailableTitle

      public String getAvailableTitle()
    • getAllAvailableTitleML

      public HashMap<String,String> getAllAvailableTitleML()
    • getAvailableTitleML

      public HashMap<String,String> getAvailableTitleML()
    • getAvailableTitle

      public String getAvailableTitle(String lang)
    • getAvailableTemplateEntry

      public TypeTemplateEntry getAvailableTemplateEntry(String usage)
    • getAvailableTemplates

      public String[] getAvailableTemplates()
    • getAvailablePstatus

      public int getAvailablePstatus()
    • getAvailablePdate

      public Date getAvailablePdate()
    • getAvailableEdate

      public Date getAvailableEdate()
    • getAvailableSdate

      public Date getAvailableSdate()
    • getAvailableAdate

      public Date getAvailableAdate()
    • getAvailableWFNote

      public String getAvailableWFNote()
    • setUseDefaultReadRights

      public void setUseDefaultReadRights(boolean useDefaultReadRights)
      Explicitely request the use of default read rights instead of any read rights that might be specified.
      Parameters:
      useDefaultReadRights - true to request use of default authorize group/member Set instead of the specified authorized group/member ids, false to use specified value.
      Since:
      jcms-10.0.4 / JCMS-7744
      See Also:
    • getAvailableUseDefaultReadRights

      public boolean getAvailableUseDefaultReadRights()
      Check if default read rights should be used.

      If corresponding setter was not invoked at all, the behavior is as follow :

      • if authorized group/member set value are specified they are used, otherwise
      • for create operation, the default rights are used
      • for updated operation, the existing publication rights are used
      Returns:
      true to use default authorized group/member Set, false for behavior describe above.
      Since:
      jcms-10.0.4 / JCMS-7744
      See Also:
    • getAvailableAuthorizedMemberSet

      public Set<Member> getAvailableAuthorizedMemberSet()
    • getDefaultAuthorizedMemberSet

      public Set<Member> getDefaultAuthorizedMemberSet()
      This method should be overriden by sub-classes
      Returns:
      the default authorized member Set (never retun null).
      Since:
      jcms-3.0
    • getAvailableAuthorizedGroupSet

      public Set<Group> getAvailableAuthorizedGroupSet()
    • getAuthorizedGroupsCount

      public int getAuthorizedGroupsCount()
    • getUpdateGroupsCount

      public int getUpdateGroupsCount()
    • getDefaultAuthorizedGroupSet

      public Set<Group> getDefaultAuthorizedGroupSet()
      This method should be overriden by sub-classes
      Returns:
      the default authorized group Set (never return null).
      Since:
      jcms-3.0
    • getDefaultCategorySet

      public Set<Category> getDefaultCategorySet()
      This method should be overriden by sub-classes
      Returns:
      the default category Set.
      Since:
      jcms-3.0
    • setUseDefaultUpdateRights

      public void setUseDefaultUpdateRights(boolean useDefaultUpdateRights)
      Explicitely request the use of default update rights instead of any update rights that might be specified.
      Parameters:
      useDefaultUpdateRights - true to request use of default update group/member Set instead of the specified update group/member ids, false to use specified value.
      Since:
      jcms-10.0.4 / JCMS-7744
      See Also:
    • getAvailableUseDefaultUpdateRights

      public boolean getAvailableUseDefaultUpdateRights()
      Check if default update rights should be used.

      If corresponding setter was not invoked at all, the behavior is as follow :

      • if authorized group/member set value are specified they are used, otherwise
      • for create operation, the default rights is used
      • for updated operation, the existing publication rights are used
      Returns:
      true to use default update group/member Set, false for behavior describe above.
      Since:
      jcms-10.0.4 / JCMS-7744
      See Also:
    • getAvailableUpdateMemberSet

      public Set<Member> getAvailableUpdateMemberSet()
    • getDefaultUpdateMemberSet

      public Set<Member> getDefaultUpdateMemberSet()
      This method should be overriden by sub-classes
      Returns:
      the default update member Set (never retun null).
      Since:
      jcms-4.0
    • getAvailableUpdateGroupSet

      public Set<Group> getAvailableUpdateGroupSet()
    • getDefaultUpdateGroupSet

      public Set<Group> getDefaultUpdateGroupSet()
      This method should be overriden by sub-classes
      Returns:
      the default update group Set (never retun null).
      Since:
      jcms-4.0
    • getAvailableRestrictUpdateRights

      public boolean getAvailableRestrictUpdateRights()
    • setRestrictUpdateRights

      public void setRestrictUpdateRights(String v)
    • getAvailableClassificationLevel

      public int getAvailableClassificationLevel()
      Retrieve the classification level current available for the edition in progress
      Returns:
      a classification level
      Since:
      10.0.8 / JCMS-10746
    • setClassificationLevel

      public void setClassificationLevel(int level)
      Set the classification level to assign to the edited publication
      Parameters:
      level - a value from 0 for unclassified publication to ClassificationManager.getMaximumLevel() (included) for highly classified publication. 0 if used if null is specified.
      Since:
      10.0.8 / JCMS-10746
    • getClassificationLevelSettings

      public EnumerateSettings getClassificationLevelSettings()
      Retrieve a settings suitable to edit a classification level in the current context.
      Returns:
      a new EnumerateSettings instance
      Since:
      10.0.8 / JCMS-10746
    • getAvailableAuthor

      public Member getAvailableAuthor()
      Returns:
      the selected author
      Since:
      jcms-5.0.0
    • setAuthorForced

      public void setAuthorForced(boolean v, Member author)
    • updateCids

      public void updateCids(String[] v)
      Update the cids (this method is called by setCids() and all setCidsXXX() methods)
      Parameters:
      v - the cids
      Since:
      jcms-4.0
    • getDefaultTemplateUsage

      public String getDefaultTemplateUsage()
      Returns the default template usage used to display the publication. This default tempalte may change between Content and Portlets
      Returns:
      String the default usage
      Since:
      jcms-6.0.0
    • setOpUpdateMajor

      public void setOpUpdateMajor(String v)
    • setOpMerge

      public void setOpMerge(String v)
    • setOpLock

      public void setOpLock(String v)
    • setOpUnlock

      public void setOpUnlock(String v)
    • setOpRequestUnlock

      public void setOpRequestUnlock(String v)
    • setCheckMemberForRequestUnlock

      public void setCheckMemberForRequestUnlock(String v)
    • setRequestUnlockMessage

      public void setRequestUnlockMessage(String v)
    • setOpAddItem

      public void setOpAddItem(String v)
    • setOpAddItemReadRights

      public void setOpAddItemReadRights(String v)
    • setOpAddItemUpdateRights

      public void setOpAddItemUpdateRights(String v)
    • setMajorUpdate

      public void setMajorUpdate(String v)
    • getAvailableMajorUpdate

      public boolean getAvailableMajorUpdate()
    • setOpTrash

      public void setOpTrash(String v)
      Request publication to be moved in trash.

      Any invocation of this setter will request the trash action (value itself is ignored)

      Parameters:
      v - any value
      Since:
      jcms-10.0.5 / JCMS-8353
    • setOpUntrash

      public void setOpUntrash(String v)
      Request publication to be moved outside trash and restored to its previous state.

      Any invocation of this setter will request the untrash action (value itself is ignored)

      Parameters:
      v - any value
      Since:
      jcms-10.0.5 / JCMS-8353
    • getAvailableField

      public Object getAvailableField(String field)
      Description copied from class: EditDataHandler
      Get value of the given field calling getAvailable{field}(). Called by widgets and meta templates See also EditDataHandler.getEnumValues(String) and EditDataHandler.getEnumLabels(String, String)
      Overrides:
      getAvailableField in class EditDataHandler
      Parameters:
      field - the field name
      Returns:
      Object return by getAvailable
    • isForm

      public boolean isForm()
      Returns:
      true if this handler is dedicated to Form sub-class processing. Overrided by EditFormHandler.
      Since:
      jcms-4.0
    • setItemPos

      public void setItemPos(int v)
    • setId

      public void setId(String id)
      Set the value of id.
      Overrides:
      setId in class EditDataHandler
      Parameters:
      id - Value to assign to id.
    • setTitle

      public void setTitle(String[] v)
    • setCids

      public void setCids(String[] v)
    • setAuthor

      public void setAuthor(String v)
    • setTemplates

      public void setTemplates(String[] v)
    • setPstatus

      public void setPstatus(int v)
    • setPdate

      public void setPdate(String dateStr)
    • setEdate

      public void setEdate(String dateStr)
    • setSdate

      public void setSdate(String dateStr)
    • setAdate

      public void setAdate(String dateStr)
    • setWfNote

      public void setWfNote(String v)
    • setAuthorizedMemberSetAddCount

      public void setAuthorizedMemberSetAddCount(int v)
    • getAuthorizedMemberSetCount

      public int getAuthorizedMemberSetCount()
    • setAuthorizedMemberIds

      public void setAuthorizedMemberIds(String[] v)
    • setAuthorizedGroupIds

      public void setAuthorizedGroupIds(String[] v)
    • setUpdateMemberSetAddCount

      public void setUpdateMemberSetAddCount(int v)
    • getUpdateMemberSetCount

      public int getUpdateMemberSetCount()
    • setUpdateMemberIds

      public void setUpdateMemberIds(String[] v)
    • setUpdateGroupIds

      public void setUpdateGroupIds(String[] v)
    • getAnchor

      public String getAnchor()
      Get the value of anchor.
      Returns:
      Value of anchor.
    • setAnchor

      public void setAnchor(String v)
      Set the value of anchor.
      Parameters:
      v - Value to assign to anchor.
    • setTracked

      public void setTracked(boolean v)
    • getAvailableTracked

      public boolean getAvailableTracked()
    • setReadAck

      public void setReadAck(boolean v)
    • getAvailableReadAck

      public boolean getAvailableReadAck()
    • getAvailableWorkspace

      public Workspace getAvailableWorkspace()
      Returns:
      Returns the workspace.
    • setMainLanguage

      public void setMainLanguage(String v)
    • getAvailableMainLanguage

      public String getAvailableMainLanguage()
      Overrides:
      getAvailableMainLanguage in class JcmsFormHandler
      Returns:
      the main language of the publication.
    • setFriendlyURL

      public void setFriendlyURL(String[] v)
    • getAvailableFriendlyURLSet

      public TreeSet<String> getAvailableFriendlyURLSet()
      Returns:
      the friendly urls HashMap (including the default language)
      Since:
      jcms-5.5.0
    • setRoleId

      public void setRoleId(String[] v)
    • getAvailableRoleMap

      public HashMap<String,TreeSet<Member>> getAvailableRoleMap()
      Returns:
      the roleMap
      Since:
      jcms-5.5.0
    • getMemberSetAssignedToRole

      public TreeSet<Member> getMemberSetAssignedToRole(String roleId)
      Parameters:
      roleId - a WFRole id
      Returns:
      the set of member assigned to the given roleId
      Since:
      jcms-5.5.0
    • getTypeLabel

      public String getTypeLabel()
      Returns the label of the edited type.
      Returns:
      the label of the edited type.
      Since:
      jcms-5.7.0
    • cannotRead

      public boolean cannotRead()
      Returns true if the loggedMember cannot read this publication.
      Returns:
      true if the loggedMember cannot read this publication.
      Since:
      jcms-5.7.0
    • getWorkAreaCss

      public String getWorkAreaCss()
      Returns the css class used for style, and javascript window resize in footer in popup edition.
      Returns:
      the css class used for style, and javascript window resize in footer in popup edition.
      Since:
      jcms-5.7.0
    • getFieldStatus

      public FieldStatus getFieldStatus(String fieldName)
      Returns the FieldStatus for the given field.
      Parameters:
      fieldName - the name of the field
      Returns:
      the FieldStatus for the given field (never null).
      Since:
      jcms-6.0.1
    • setDoNotStore

      public void setDoNotStore(String str)
      Request that create operation is not stored after successful validation.

      If enabled, the Data is validated, but not stored in JStore or JcmsDB, instead the Data is added has a session attribute LAST_PUBLICATION_NOT_STORED.

      Can be used with redirect value "work/lastPublicationXml.jsp" to dump the Data content as XML.

      Default is false.

      Parameters:
      str - a boolean value as string
      Since:
      jcms-9.0.0
      See Also:
    • getDoNotStore

      public String getDoNotStore()
      Retrieve the current value of the doNotStore option.

      See setDoNotStore(String) for complete information of behavior introduced by this option.

      Returns:
      a String representation of the doNotStore boolean option, true if create operation should be skipped, false if operation should be performed as usual
      See Also:
    • setIgnoreWorkspaceCompliance

      public void setIgnoreWorkspaceCompliance(boolean v)
      Set or disabled workspace compliance check. If workspace compliance is enabled and the publication type cannot be published in the selected workspace, another workspace will be searched.
      Parameters:
      v - the value
      Since:
      jcms-9.0.0
    • getIgnoreWorkspaceCompliance

      public boolean getIgnoreWorkspaceCompliance()
      Returns true if workspace compliance is ignored ; false otherwise.
      Returns:
      true if workspace compliance is ignored ; false otherwise.
      Since:
      jcms-9.0.0
    • getWorkspaceComplianceWarning

      public boolean getWorkspaceComplianceWarning()
      Returns true if workspace compliance warning message is ignored ; false otherwise.
      Returns:
      true if workspace compliance warning message is ignored ; false otherwise.
      Since:
      jcms-9.0.2
    • setWorkspaceComplianceWarning

      public void setWorkspaceComplianceWarning(boolean workspaceComplianceWarning)
      Set or disabled workspace compliance warning message. If workspace compliance is enabled and the publication type cannot be published in the selected workspace, a warning message is displayed to the user.
      Parameters:
      workspaceComplianceWarning - the value
      Since:
      jcms-9.0.2
    • setAttachWorkspaceIds

      public void setAttachWorkspaceIds(String[] v)
    • getAvailableAttachWorkspaceSet

      public Set<Workspace> getAvailableAttachWorkspaceSet()
    • setSkipActivity

      public void setSkipActivity(String v)
      If true skip the ESN activity
      Parameters:
      v - the value
      Since:
      jcms-10.0.0
    • getAvailableSkipActivity

      public boolean getAvailableSkipActivity()
    • isFormStepClickable

      public boolean isFormStepClickable()
      Description copied from class: JcmsFormHandler
      Returns true if the form step are clickable.
      Overrides:
      isFormStepClickable in class JcmsFormHandler
      Returns:
      true if the form step are clickable.
    • getWorkspaceSettings

      public ControlSettings getWorkspaceSettings()