Class DuplicateModalHandler

    • Field Detail

      • compliantWorkspaceSet

        protected java.util.Set<Workspace> compliantWorkspaceSet
      • opDuplicate

        protected boolean opDuplicate
      • selectedWorkspace

        protected Workspace selectedWorkspace
      • origRedirect

        protected java.lang.String origRedirect
        The original redirect URL.

        To be reused in the edit JSP url user will be redirected to after duplication, as a "?redirect=" HTTP parameter.

        Since:
        jcms-10.0.8 / JCMS-10823
      • copy

        protected Publication copy
        The copy created -if any- during duplicate operation.

        Protected access, originally created for unittest purpose.

        Since:
        jcms-10.0.8 / JCMS-10823
    • Constructor Detail

      • DuplicateModalHandler

        public DuplicateModalHandler()
    • Method Detail

      • 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 EditPublicationHandler
      • setRedirect

        public void setRedirect​(java.lang.String url)
        Saves a backup of original redirect, for later use if needed.

        Original redirect will be appended to the editPub.jsp URL as an encodedURL "redirect=" parameter.

        Overrides:
        setRedirect in class JcmsFormHandler
        Parameters:
        url - Value to assign to redirect.
        Since:
        jcms-10.0.8 / JCMS-10823
      • processAction

        public boolean processAction()
                              throws java.io.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 EditPublicationHandler
        Returns:
        false if no redirection is needed, true otherwise
        Throws:
        java.io.IOException - IO Exception
      • validateDuplicate

        protected boolean validateDuplicate()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • performDuplicate

        protected boolean performDuplicate()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • showLanguageChooser

        public boolean showLanguageChooser()
        Overrides:
        showLanguageChooser in class EditPublicationHandler
        Returns:
        true if channel is multilingual and current Publication type has at least one multilingual field.
      • getModalTitle

        public java.lang.String getModalTitle()
      • setOpDuplicate

        public void setOpDuplicate​(java.lang.String v)
      • setSelectedWorkspace

        public void setSelectedWorkspace​(java.lang.String id)