OKMDocument

From OpenKM Documentation
Revision as of 11:00, 8 March 2010 by Pavila (talk | contribs) (Created page with '{{TOCright}} __TOC__ Methods related to document management. == Document create(String token, Document doc, byte[] content) == Create a new document in the repository. '''Para…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Methods related to document management.

Document create(String token, Document doc, byte[] content)

Create a new document in the repository.

Parameters

  • token - The session authorization token.
  • doc - A document object with the new document properties.
  • content - The document content in bytes.

Returns

  • A document object with the properties of the new created document.

Throws

  • IOException - An error when inserting document data into the repository.
  • UnsupportedMimeTypeException - If the uploaded file has an unsupported MIME type.
  • FileSizeExceededException - If the document content is biggest than the maximum accepted.
  • VirusDetectedException - If the document is infected by a virus.
  • PathNotFoundException - If the parent folder doesn't exist.
  • ItemExistsException - If there is already a document in the repository with the same name.
  • AccessDeniedException - If there is any security problem: you can't modify the parent document folder because of lack of permissions.
  • RepositoryException - If there is any general repository problem.