@Name(value="FileManageActions") @Scope(value=EVENT) @Install(precedence=10) public class FileManageActionsBean extends Object implements FileManageActions
Modifier and Type | Field and Description |
---|---|
static String |
COPY_ERROR |
static String |
MOVE_ERROR |
static String |
MOVE_IMPOSSIBLE |
static String |
MOVE_OK |
static String |
MOVE_PUBLISH |
static String |
PASTE_ERROR |
static String |
SECURITY_ERROR |
static String |
TRANSF_ERROR |
NUXEO_JSF_TMP_DIR_PROP
Constructor and Description |
---|
FileManageActionsBean() |
Modifier and Type | Method and Description |
---|---|
String |
addBinaryFileFromPlugin(Blob blob,
String fullName,
DocumentModel targetContainer) |
String |
addBinaryFileFromPlugin(Blob blob,
String fullName,
String morePath) |
String |
addBinaryFileFromPlugin(byte[] content,
String mimetype,
String fullName,
String morePath)
Deprecated.
Use addBinaryFileFromPlugin(Blob, String, String) to avoid loading the data in memory as a Bytes
array
|
String |
addFile()
Creates a document from the file held in the fileUploadHolder.
|
String |
addFileFromPlugin(String content,
String mimetype,
String fullName,
String morePath,
Boolean UseBase64)
Deprecated.
use addBinaryFileFromPlugin with a Blob argument API to avoid loading the content in memory
|
String |
addFolderFromPlugin(String fullName,
String morePath) |
boolean |
canWrite()
Deprecated.
|
String |
copyWithId(String docId) |
String |
display() |
static FileBlob |
getBlob(org.richfaces.event.FileUploadEvent uploadEvent) |
DocumentModel |
getChangeableDocument() |
String |
getFileName() |
InputStream |
getFileUpload() |
Collection<NxUploadedFile> |
getUploadedFiles() |
String |
moveWithId(String docId,
String containerId) |
String |
pasteWithId(String docId) |
void |
performAction(javax.faces.event.ActionEvent event) |
void |
processUpload(org.richfaces.event.FileUploadEvent uploadEvent) |
String |
removeAllUploadedFile() |
String |
removeOneOrAllUploadedFiles(javax.faces.event.ActionEvent action)
Removes one of all uploaded files, depending on previous call to
FileManageActions.setFileToRemove(String) . |
String |
removeSingleUploadedFile() |
String |
removeUploadedFile(String fileName) |
void |
setChangeableDocument(DocumentModel changeableDocument) |
void |
setFileName(String fileName) |
void |
setFileToRemove(String fileToRemove)
Setter to get the filename to remove, works in conjunction with
FileManageActions.removeOneOrAllUploadedFiles(ActionEvent)
. |
void |
setFileUpload(InputStream fileUpload) |
void |
setUploadedFiles(Collection<NxUploadedFile> uploadedFiles) |
String |
validate() |
void |
validateMultiplesUpload() |
void |
validateMultipleUploadForDocument(DocumentModel current) |
public static final String TRANSF_ERROR
public static final String SECURITY_ERROR
public static final String MOVE_ERROR
public static final String COPY_ERROR
public static final String PASTE_ERROR
public static final String MOVE_IMPOSSIBLE
public static final String MOVE_PUBLISH
public static final String MOVE_OK
public String display()
display
in interface SimpleFileManager
display
in interface FileManageActions
public String addFile() throws ClientException
addFile
in interface FileManageActions
ClientException
@Deprecated @WebRemote public boolean canWrite() throws ClientException
canWrite
in interface FileManageActions
ClientException
@Deprecated @WebRemote public String addFileFromPlugin(String content, String mimetype, String fullName, String morePath, Boolean UseBase64) throws ClientException
addFileFromPlugin
in interface FileManageActions
ClientException
@WebRemote public String addBinaryFileFromPlugin(Blob blob, String fullName, String morePath) throws ClientException
addBinaryFileFromPlugin
in interface SimpleFileManager
ClientException
@WebRemote public String addBinaryFileFromPlugin(Blob blob, String fullName, DocumentModel targetContainer) throws ClientException
addBinaryFileFromPlugin
in interface SimpleFileManager
ClientException
@Deprecated public String addBinaryFileFromPlugin(byte[] content, String mimetype, String fullName, String morePath) throws ClientException
ClientException
@WebRemote public String addFolderFromPlugin(String fullName, String morePath) throws ClientException
addFolderFromPlugin
in interface FileManageActions
ClientException
@WebRemote public String moveWithId(String docId, String containerId) throws ClientException
moveWithId
in interface FileManageActions
ClientException
@WebRemote public String copyWithId(String docId) throws ClientException
copyWithId
in interface FileManageActions
ClientException
@WebRemote public String pasteWithId(String docId) throws ClientException
pasteWithId
in interface FileManageActions
ClientException
public void processUpload(org.richfaces.event.FileUploadEvent uploadEvent)
public static FileBlob getBlob(org.richfaces.event.FileUploadEvent uploadEvent) throws IOException
IOException
public void validateMultiplesUpload() throws ClientException, FileNotFoundException, IOException
public void validateMultipleUploadForDocument(DocumentModel current) throws ClientException, FileNotFoundException, IOException
public void performAction(javax.faces.event.ActionEvent event)
public String validate() throws ClientException
ClientException
public InputStream getFileUpload()
getFileUpload
in interface FileManageActions
public void setFileUpload(InputStream fileUpload)
setFileUpload
in interface FileManageActions
public String getFileName()
getFileName
in interface FileManageActions
public void setFileName(String fileName)
setFileName
in interface FileManageActions
public DocumentModel getChangeableDocument()
public void setChangeableDocument(DocumentModel changeableDocument)
public Collection<NxUploadedFile> getUploadedFiles()
public void setUploadedFiles(Collection<NxUploadedFile> uploadedFiles)
@WebRemote public String removeSingleUploadedFile() throws ClientException
removeSingleUploadedFile
in interface FileManageActions
ClientException
public void setFileToRemove(String fileToRemove)
FileManageActions
FileManageActions.removeOneOrAllUploadedFiles(ActionEvent)
.setFileToRemove
in interface FileManageActions
public String removeOneOrAllUploadedFiles(javax.faces.event.ActionEvent action) throws ClientException
FileManageActions
FileManageActions.setFileToRemove(String)
.
This is useful to remove files in an Ajax context to avoid Seam remoting, and still get the selected entry from JavaScript variables (see NXP-13234).
removeOneOrAllUploadedFiles
in interface FileManageActions
ClientException
@WebRemote public String removeAllUploadedFile() throws ClientException
removeAllUploadedFile
in interface FileManageActions
ClientException
@WebRemote public String removeUploadedFile(String fileName) throws ClientException
removeUploadedFile
in interface FileManageActions
ClientException
Copyright © 2015 Nuxeo SA. All rights reserved.