Difference between revisions of "OKMMail"

From OpenKM Documentation
Jump to: navigation, search
(Created page with '{{TOCright}} __TOC__ Methods related to mail management. == Mail create(String token, Mail mail) == Create a new mail in the repository. '''Parameters''' * ''token'' - The ses…')
 
(Mail rename(String token, String mailPath, String newName))
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOCright}} __TOC__
+
__TOC__
  
 
Methods related to mail management.
 
Methods related to mail management.
Line 18: Line 18:
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the parent folder because of lack of permissions.
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the parent folder because of lack of permissions.
 
* ''RepositoryException'' - If there is any general repository problem.
 
* ''RepositoryException'' - If there is any general repository problem.
 +
 +
'''Since'''
 +
* OpenKM 4.1
  
 
== Mail getProperties(String token, String mailPath) ==
 
== Mail getProperties(String token, String mailPath) ==
Line 32: Line 35:
 
* ''ItemNotFoundException'' - If the indicated mail doesn't exist.
 
* ''ItemNotFoundException'' - If the indicated mail doesn't exist.
 
* ''RepositoryException'' - If there is any general repository problem.
 
* ''RepositoryException'' - If there is any general repository problem.
 +
 +
'''Since'''
 +
* OpenKM 4.1
  
 
== void delete(String token, String mailPath) ==
 
== void delete(String token, String mailPath) ==
Line 48: Line 54:
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the mail because of lack of permissions.
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the mail because of lack of permissions.
 
* ''RepositoryException'' - If there is any general repository problem.
 
* ''RepositoryException'' - If there is any general repository problem.
 +
 +
'''Since'''
 +
* OpenKM 4.1
  
 
== Mail rename(String token, String mailPath, String newName) ==
 
== Mail rename(String token, String mailPath, String newName) ==
Line 54: Line 63:
 
'''Parameters'''
 
'''Parameters'''
 
* ''token'' - The session authorization token.
 
* ''token'' - The session authorization token.
* ''mailPath'' - The path that identifies an mail folder.
+
* ''mailPath'' - The path that identifies a mail node.
 
* ''newName'' - The new mail name.
 
* ''newName'' - The new mail name.
  
Line 65: Line 74:
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the mail because of lack of permissions.
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the mail because of lack of permissions.
 
* ''RepositoryException'' - If there is any general repository problem.
 
* ''RepositoryException'' - If there is any general repository problem.
 +
 +
'''Since'''
 +
* OpenKM 4.1
  
 
== void move(String token, String mailPath, String dstPath) ==
 
== void move(String token, String mailPath, String dstPath) ==
Line 82: Line 94:
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the parent folder or the destination folder because of lack of permissions.
 
* ''AccessDeniedException'' - If there is any security problem: you can't modify the parent folder or the destination folder because of lack of permissions.
 
* ''RepositoryException'' - If there is any general repository problem.
 
* ''RepositoryException'' - If there is any general repository problem.
 +
 +
'''Since'''
 +
* OpenKM 4.1
  
 
== MailArray getChilds(String token, String fldPath) ==
 
== MailArray getChilds(String token, String fldPath) ==
Line 99: Line 114:
 
'''Since'''
 
'''Since'''
 
* OpenKM 4.1
 
* OpenKM 4.1
 +
 +
== boolean isValid(String token, String mailPath) ==
 +
Test if a mail path is valid.
 +
 +
'''Parameters'''
 +
* ''token'' - String with user authorization info.
 +
* ''mailPath'' - The path that identifies an unique mail.
 +
 +
'''Returns'''
 +
* True if is a valid mail path, otherwise false.
 +
 +
'''Throws'''
 +
* ''AccessDeniedException'' - If there is any security problem: you can't access this mail because of lack of permissions.
 +
* ''RepositoryException'' - If there is any general repository problem.
 +
* ''PathNotFoundException'' - If there is no mail in the repository with this path.
 +
 +
'''Since'''
 +
* OpenKM 5.0
 +
 +
== String getPath(String token, String uuid) ==
 +
The the mail path from a UUID.
 +
 +
'''Parameters'''
 +
* ''token'' - The session authorization token.
 +
* ''uuid'' - The unique mail identifier.
 +
 +
'''Returns'''
 +
* The mail path or null if this UUID does not correspond to a mail node.
 +
 +
'''Throws'''
 +
* ''AccessDeniedException'' - If there is any security problem: you can't access this folder because of lack of permissions.
 +
* ''RepositoryException'' If there is any general repository problem.
 +
 +
'''Since'''
 +
* OpenKM 5.0
  
 
[[Category: Webservices Guide]]
 
[[Category: Webservices Guide]]

Latest revision as of 11:49, 1 October 2010

Methods related to mail management.

Mail create(String token, Mail mail)

Create a new mail in the repository.

Parameters

  • token - The session authorization token.
  • mail - A mail object with the new mail properties.

Returns

  • A mail object with the new created mail properties.

Throws

  • PathNotFoundException - If the parent folder doesn't exist.
  • ItemExistsException - If there is already a mail in the repository with the same name in the same path.
  • AccessDeniedException - If there is any security problem: you can't modify the parent folder because of lack of permissions.
  • RepositoryException - If there is any general repository problem.

Since

  • OpenKM 4.1

Mail getProperties(String token, String mailPath)

Obtains properties from a previously created mail.

Parameters

  • token -The session authorization token .
  • mailPath - The path that identifies an unique mail.

Returns

  • A mail object with the selected mail properties.

Throws

  • ItemNotFoundException - If the indicated mail doesn't exist.
  • RepositoryException - If there is any general repository problem.

Since

  • OpenKM 4.1

void delete(String token, String mailPath)

Delete a mail the repository. It is a logical delete, so really is moved to the user trash and can be restored.

Parameters

  • token - The session authorization token.
  • mailPath - The path that identifies an unique mail.

Returns

  • None

Throws

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

Since

  • OpenKM 4.1

Mail rename(String token, String mailPath, String newName)

Rename a mail in the repository.

Parameters

  • token - The session authorization token.
  • mailPath - The path that identifies a mail node.
  • newName - The new mail name.

Returns

  • A mail object with the new mail properties.

Throws

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

Since

  • OpenKM 4.1

void move(String token, String mailPath, String dstPath)

Move a mail to another location in the repository.

Parameters

  • token - The session authorization token.
  • mailPath - The path that identifies an unique mail.
  • dstPath - The path of the destination folder.

Returns

  • A mail object with the new mail properties.

Throws

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

Since

  • OpenKM 4.1

MailArray getChilds(String token, String fldPath)

Retrieve a list of child mails from an existing folder.

Parameters

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

Returns

  • A Collection with the child mails.

Throws

  • PathNotFoundException - If there is no folder in the repository in this path.
  • RepositoryException - If there is any general repository problem.

Since

  • OpenKM 4.1

boolean isValid(String token, String mailPath)

Test if a mail path is valid.

Parameters

  • token - String with user authorization info.
  • mailPath - The path that identifies an unique mail.

Returns

  • True if is a valid mail path, otherwise false.

Throws

  • AccessDeniedException - If there is any security problem: you can't access this mail because of lack of permissions.
  • RepositoryException - If there is any general repository problem.
  • PathNotFoundException - If there is no mail in the repository with this path.

Since

  • OpenKM 5.0

String getPath(String token, String uuid)

The the mail path from a UUID.

Parameters

  • token - The session authorization token.
  • uuid - The unique mail identifier.

Returns

  • The mail path or null if this UUID does not correspond to a mail node.

Throws

  • AccessDeniedException - If there is any security problem: you can't access this folder because of lack of permissions.
  • RepositoryException If there is any general repository problem.

Since

  • OpenKM 5.0