Class PubChooserActionHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class PubChooserActionHandler extends JcmsUploadFormHandler
  • Field Details

    • documents

      protected File[] documents
  • Constructor Details

    • PubChooserActionHandler

      public PubChooserActionHandler()
  • 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 JcmsFormHandler
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • getUploadClass

      public Class getUploadClass()
    • canUploadDocument

      public boolean canUploadDocument()
    • getFileDocumentClass

      protected Class<? extends FileDocument> getFileDocumentClass(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 Class<? extends FileDocument> getFileDocumentClass(Class<? extends FileDocument> clazz, Member member, Workspace workspace, 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 String getJsonResponse()
    • setJsonResponse

      public void setJsonResponse(String jsonResponse)
    • setDocuments

      public void setDocuments(String[] documents)
    • setDocumentWorkspace

      public void setDocumentWorkspace(String workspaceId)
    • getAvailableDocumentWorkspace

      public Workspace getAvailableDocumentWorkspace()
    • getAvailableDocumentSuperClass

      public Class getAvailableDocumentSuperClass()
    • setDocumentSuperClass

      public void setDocumentSuperClass(String documentSuperClass)
    • getAvailableFileDocument

      public FileDocument getAvailableFileDocument()
    • setFileDocument

      public void setFileDocument(String fileDocument)
    • isOpDelete

      public boolean isOpDelete()
    • setOpDelete

      public void setOpDelete(boolean opDelete)
    • isOpUploadMedia

      public boolean isOpUploadMedia()
    • setOpUploadMedia

      public void setOpUploadMedia(boolean opUploadMedia)