DocumentModule

create

Create a new document in the repository.

Parameters

  • String token - The session authorization token.
  • Document doc – A document object with the new document properties.
  • byte[] content - The document content in bytes.

Returns

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

Faults

  • 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.
  • ItemNotFoundException - 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.

delete

Create a new document in the repository.

Parameters

  • String token - The session authorization token.
  • String docPath - The path that identifies an unique document.

Returns

  • none

Faults

  • LockException - Can’t delete a locked document.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

rename

Rename a document in the repository.

Parameters

  • String token - The session authorization token.
  • String docPath - The path that identifies an unique document.
  • String newName - The new document name.

Returns

  • Document – An document object with the new document properties.

Faults

  • ItemNotFoundException - If there is no document in this repository path.
  • ItemExistsException - If there is already a document in the repository with the same name in the same path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

getProperties

Obtain document properties from the repository.

Parameters

  • String token - The session authorization token.
  • String docPath - The path that identifies an unique document.

Returns

  • Document – The document properties.

Faults

  • ItemNotFoundException - If there is no document in this repository path.
  • RepositoryException - If there is any general repository problem.

setProperties

Obtain document properties from the repository.

Parameters

  • String token - The session authorization token.
  • Document doc – An document object with the properties.

Returns

  • none

Faults

  • LockException - A locked document can’t be modified.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

getContent

Obtain document properties from the repository.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • none

Faults

  • IOException - An error when retrieving document data from the repository.
  • ItemNotFoundException - If there is no document in this repository path.
  • RepositoryException - If there is any general repository problem.

setContent

Set document content in the repository.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.
  • byte[] - The new document content.

Returns

  • none

Faults

  • IOException - If there is any error setting the new content.
  • VersionException - A document checked in can’t be modified.
  • LockException - A locked document can’t be modified.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

getChilds

Retrieve a list of child documents from an existing folder.

Parameters

  • String token - The session authorization token.
  • String fldPath – The path that identifies an unique folder.

Returns

  • Collection - A Collection with the child documents.

Faults

  • ItemNotFoundException - If there is no document in this repository path.
  • RepositoryException If there is any general repository problem.

checkout

Checkout the document to edit it. The document can’t be edited by another user until it is checked in o the checkout is canceled.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • Collection - A Collection with the child documents.

Faults

  • LockException - A locked document can’t be modified.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

cancelCheckout

Cancel a previous checked out state in a document.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • Collection - A Collection with the child documents.

Faults

  • LockException - A locked document can’t be modified.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

checkin

Check in the document to create a new version.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • Version - A version object with the properties of th new generated version.

Faults

  • LockException - A locked document can’t be modified.
  • VersionException - If the nodes was not previously checked out.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

getVersionHistory

Get the document version history.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • Collection - A Collection of Versions with every document version.

Faults

  • ItemNotFoundException - If there is no document in this repository path.
  • RepositoryException - If there is any general repository problem.

lock

Lock a document, so only is editable by the locker.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • Collection - A Collection of Versions with every document version.

Faults

  • LockException - If the node is already locked.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

unlock

Unlock a document, so will be editable for other users.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.

Returns

  • none

Faults

  • LockException - If the node is not locked.
  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

move

Move a document to another location in the repository.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.
  • String fldPath - The destination folder path.

Returns

  • none

Faults

  • ItemNotFoundException - If the dstPath does not exists.
  • ItemExistsException - If there is already a document in the destination folder with the same name.
  • AccessDeniedException - If there is any security problem: you can’t modify the document’s parent folder or the destination folder because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

restoreVersion

Revert the document to an specific previous version.

Parameters

  • String token - The session authorization token.
  • String docPath – The path that identifies an unique document.
  • String versionId - The version id to revert to.

Returns

  • none

Faults

  • ItemNotFoundException - If there is no document in this repository path.
  • AccessDeniedException - If there is any security problem: you can’t modify the document because of lack of permissions.
  • RepositoryException - If there is any general repository problem.
 
/home/openkm/web/components/com_openwiki/data/pages/ws/documentmodule.txt (1335 views) · Last modified: 2008/01/23 01:00
 
Recent changes RSS feed Creative Commons License Donate Valid XHTML 1.0 Valid CSS Driven by DokuWiki