Class EditFileDocumentHandler

    • Field Detail

      • isUploadContext

        protected boolean isUploadContext
      • description

        protected java.lang.String description
      • descriptionML

        protected java.util.HashMap<java.lang.String,​java.lang.String> descriptionML
      • opUpload

        protected boolean opUpload
    • Constructor Detail

      • EditFileDocumentHandler

        public EditFileDocumentHandler()
    • Method Detail

      • showRemoteUri

        public boolean showRemoteUri()
      • processAction

        public boolean processAction()
        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.

        processAction in class EditPublicationHandler
        false if no redirection is needed, true otherwise
        Throws: - IO Exception
      • validateCommonCreateUpdate

        public boolean validateCommonCreateUpdate()
      • setUseFakeFile

        public void setUseFakeFile​(java.lang.String str)
        Request that a fake file is used for the create operation and that create operation is not performed.

        Setting this boolean allows a complete FileDocument form to be filled (or any of its subtype), validated but not store, and dump as XML through work/lastPublicationXml.jsp

        You may still specify a content type, original filename for use by the fake file.

        You can also specify a file extension closed to the original setFakeExtension(String).

        str - a boolean value as a string
        See Also:
        EditPublicationHandler.setDoNotStore(String), setFakeExtension(String)
      • setFakeExtension

        public void setFakeExtension​(java.lang.String str)
        Set the file extension to use for the fake file (if used).

        This will ensure that the fake file is temporarly created in the directory most closed to the final destination.

        Default to "bin".

        str - a file extension without the dot, eg "doc", "jpg"
        See Also:
      • cleanFakeFile

        public void cleanFakeFile()
      • setFields

        public void setFields​(Publication pub)
        Description copied from class: EditPublicationHandler
        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.
        setFields in class EditPublicationHandler
        pub - the publication to set the fields
      • setDescription

        public void setDescription​(java.lang.String[] v)
      • getAvailableDescription

        public java.lang.String getAvailableDescription()
      • getAvailableDescriptionML

        public java.util.HashMap<java.lang.String,​java.lang.String> getAvailableDescriptionML()
      • getAvailableDescription

        public java.lang.String getAvailableDescription​(java.lang.String lang)
      • getAllAvailableDescriptionML

        public java.util.HashMap getAllAvailableDescriptionML()
      • setFilename

        public void setFilename​(java.lang.String v)
      • getAvailableFilename

        public java.lang.String getAvailableFilename()
      • setOriginalFilename

        public void setOriginalFilename​(java.lang.String v)
      • getAvailableOriginalFilename

        public java.lang.String getAvailableOriginalFilename()
      • setRemoteUri

        public void setRemoteUri​(java.lang.String v)
      • getAvailableRemoteUri

        public java.lang.String getAvailableRemoteUri()
      • setContentType

        public void setContentType​(java.lang.String v)
      • getAvailableContentType

        public java.lang.String getAvailableContentType()
      • setVersion

        public void setVersion​(java.lang.String v)
      • setOpUpload

        public void setOpUpload​(java.lang.String v)
      • isUploadContext

        public boolean isUploadContext()
        Returns true if the handler is used in upload context
        true if the handler is used in upload context
      • setUploadContext

        public void setUploadContext​(boolean isUploadContext)
        set the uploadContext flag (true if the handler should be used for an upload, false for a normal update).
        isUploadContext - the upload context flag