Class PubChooserUploadHandler

    • Field Detail

      • documents

        protected java.io.File[] documents
    • Constructor Detail

      • PubChooserUploadHandler

        public PubChooserUploadHandler()
    • Method Detail

      • 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 JcmsFormHandler
        Returns:
        false if no redirection is needed, true otherwise
        Throws:
        java.io.IOException - IO Exception
      • getFileDocumentClass

        protected java.lang.Class<? extends FileDocument> getFileDocumentClass​(java.lang.Class<? extends FileDocument> clazz,
                                                                               Member member,
                                                                               Workspace workspace)
        Description copied from class: JcmsUploadFormHandler
        Returns the FileDocument Class authorized for publication by the specified member and workspace.

        Here's how to find the file class

        • If the favorite class is null, try to auto detect the FileDocument Class that the member can publish
        • If the favorite class is specified, check if this class is authorized for publication by the member
        • Try to retrieve the first subtype of the favorite Class used in the Workspace and that the member can publish
        • Try to auto detect the FileDocument Class that the member can publish according to the contentType
        • Check if the member can publish with the default FileDocument Class defined by the property 'file-document.upload.class.default'
        • If there is no class compatible with this workspace, use FileDocument.class
        Overrides:
        getFileDocumentClass in class JcmsUploadFormHandler
        Parameters:
        clazz - Favorite class to use for creating the FileDocument
        member - Member who publishes FileDocuments
        workspace - Workspace where FileDocuments are created
        Returns:
        The FileDocument Class authorized for publication by the specified member and workspace
      • getFileDocumentClass

        protected java.lang.Class<? extends FileDocument> getFileDocumentClass​(java.lang.Class<? extends FileDocument> clazz,
                                                                               Member member,
                                                                               Workspace workspace,
                                                                               java.lang.String contentType)
        Description copied from class: JcmsUploadFormHandler
        Returns the FileDocument Class authorized for publication by the specified member and workspace, and the most relevant regarding specified contentType.

        Here's how to find the file class

        • If the favorite class is null, try to auto detect the FileDocument Class that the member can publish according to the contentType
        • If the favorite class is specified, check if this class is authorized for publication by the member
        • Try to retrieve the first subtype of the favorite Class used in the Workspace and that the member can publish
        • Try to auto detect the FileDocument Class that the member can publish according to the contentType
        • Check if the member can publish with the default FileDocument Class defined by the property 'file-document.upload.class.default'
        • If there is no class compatible with this workspace, use FileDocument.class
        Overrides:
        getFileDocumentClass in class JcmsUploadFormHandler
        Parameters:
        clazz - Favorite class to use for creating the FileDocument
        member - Member who publishes FileDocuments
        workspace - Workspace where FileDocuments are created
        contentType - contentType of the document to create
        Returns:
        The FileDocument Class authorized for publication by the specified member and workspace
      • isOpUpload

        public boolean isOpUpload()
      • setOpUpload

        public void setOpUpload​(boolean opUpload)
      • getJsonResponse

        public java.lang.String getJsonResponse()
      • setJsonResponse

        public void setJsonResponse​(java.lang.String jsonResponse)
      • setDocuments

        public void setDocuments​(java.lang.String[] documents)
      • setDocumentWorkspace

        public void setDocumentWorkspace​(java.lang.String workspaceId)
      • getAvailableDocumentWorkspace

        public Workspace getAvailableDocumentWorkspace()
      • getAvailableDocumentSuperClass

        public java.lang.Class getAvailableDocumentSuperClass()
      • setDocumentSuperClass

        public void setDocumentSuperClass​(java.lang.String documentSuperClass)