public Document createDocument(...) creates a document
object in the specified location with the specified properties and
content.
createDocument
public Document createDocument(Folder folder, String documentName,
Map<String, Serializable> properties, ContentFile file) creates a document
object in the specified location with the specified properties and content. The content for
the node is taken from the provided file. If the file parameter is not provided the document
is created without content. Depending on sessionSettings metadata
extraction and thumbnail generation can be launched after creation.
Parameters
- Folder folder
- A folder object representing the folder in which to create the new document.
- String documentName
- The name of the document to create.
- Map<String, Serializable> properties
- A map containing the properties of the document to be created.
- ContentFile file
- The content of the document.
Returns
Returns a Document object representing the newly created document.
Exception
Throws an SkyVaultServiceException if the operation cannot be completed.
Example
createDocument
public Document createDocument(Folder folder, String documentName,
Map<String, Serializable> properties, ContentFile file, List<String>>
aspects) creates a document object in the specified location with the specified
properties, content and aspects. The content for the node is taken from the provided file.
If the file parameter is not provided the document is created without content. Depending on
sessionSettings metadata extraction and thumbnail generation can be
launched after creation. The list of aspects is optional, if not given the default aspects
will be applied.
Parameters
- Folder folder
- A folder object representing the folder in which to create the new document.
- String documentName
- The name of the document to create.
- Map<String, Serializable> properties
- A map containing the properties of the document to be created.
- ContentFile file
- The content of the document.
- List<String> aspects
- A list of aspects to be applied to the document. If not specified the default aspects will be applied.
Returns
Returns a Document object representing the newly created document.
Exception
Throws an SkyVaultServiceException if the operation cannot be completed.
Example
Note: This method was added in version 1.1 of the SDK.
createDocument
public Document createDocument(Folder folder, String documentName,
Map<String, Serializable> properties, ContentFile file, List<String>> aspects,
String type) creates a document object in the specified location with the
specified properties, content and aspects, and the custom type. The content for the node is
taken from the provided file. If the file parameter is not provided the document is created
without content. Depending on sessionSettings metadata extraction and
thumbnail generation can be launched after creation. The list of aspects is optional, if not
given the default aspects will be applied. The type is optional, if not given the content is
created with the type cm:type.
Parameters
- Folder folder
- A folder object representing the folder in which to create the new document.
- String documentName
- The name of the document to create.
- Map<String, Serializable> properties
- A map containing the properties of the document to be created.
- ContentFile file
- The content of the document.
- List<String> aspects
- A list of aspects to be applied to the document. If not specified the default aspects will be applied.
- String type
- A string specifying the document type. If not specified the default type, cm:content will be used.
Returns
Returns a Document object representing the newly created document.
Exception
Throws an SkyVaultServiceException if the operation cannot be completed.
Example
Note: This method was added in version 1.1 of the SDK.