public class Container extends VirtualObject
| Constructor and Description |
|---|
Container() |
| Modifier and Type | Method and Description |
|---|---|
File |
createFileObject(java.lang.String name)
Create a new File object associated with this container.
|
void |
getAllFiles(ListCallback<File> callback)
List all files in the container.
|
void |
getFile(java.lang.String fileName,
ObjectCallback<File> callback)
Get data of a File object.
|
FileRepository |
getFileRepository() |
java.lang.String |
getName() |
void |
setName(java.lang.String name) |
void |
upload(java.io.File file,
ObjectCallback<File> callback)
Upload a new file
|
void |
upload(java.lang.String fileName,
byte[] content,
java.lang.String contentType,
ObjectCallback<File> callback)
Upload a new file
|
getCreationParameters, getRepository, invokeMethod, invokeMethod, setCreationParameters, setRepository, toMappublic void setName(java.lang.String name)
public java.lang.String getName()
public void upload(java.io.File file,
ObjectCallback<File> callback)
file - Content of the file.callback - The callback to be executed when finished.public void upload(java.lang.String fileName,
byte[] content,
java.lang.String contentType,
ObjectCallback<File> callback)
fileName - The file name, must be unique within the container.content - Content of the file.contentType - Content type (optional).callback - The callback to be executed when finished.public File createFileObject(java.lang.String name)
name - The name of the file.public void getFile(java.lang.String fileName,
ObjectCallback<File> callback)
fileName - The name of the file.callback - The callback to be executed when finished.public void getAllFiles(ListCallback<File> callback)
callback - The callback to be executed when finished.public FileRepository getFileRepository()