public class OKMMail extends Object implements MailModule
Modifier and Type | Method and Description |
---|---|
void |
copy(String token,
String mailPath,
String dstPath)
Copy a mail to another location in the repository.
|
Mail |
create(String token,
Mail mail)
Create a new mail in the repository.
|
void |
delete(String token,
String mailPath)
Delete a mail the repository.
|
List<Mail> |
getChildren(String token,
String fldPath)
Retrieve a list of children mails from an existing folder.
|
List<Mail> |
getChilds(String token,
String fldPath)
Deprecated.
|
static OKMMail |
getInstance() |
String |
getPath(String token,
String uuid)
Get the mail path from a UUID
|
Mail |
getProperties(String token,
String mailPath)
Obtains properties from a previously created mail.
|
boolean |
isValid(String token,
String mailPath)
Test if a mail path is valid.
|
void |
move(String token,
String mailPath,
String dstPath)
Move a mail to another location in the repository.
|
void |
purge(String token,
String mailPath)
Deletes definitively a mail from the repository.
|
Mail |
rename(String token,
String mailPath,
String newName)
Rename a mail in the repository.
|
public static OKMMail getInstance()
public Mail create(String token, Mail mail) throws PathNotFoundException, ItemExistsException, VirusDetectedException, AccessDeniedException, RepositoryException, DatabaseException, UserQuotaExceededException
MailModule
create
in interface MailModule
mail
- A mail object with the new mail properties.PathNotFoundException
- If the parent mail 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 mail because of lack of permissions.RepositoryException
- If there is any general repository problem.VirusDetectedException
DatabaseException
UserQuotaExceededException
public Mail getProperties(String token, String mailPath) throws PathNotFoundException, RepositoryException, DatabaseException
MailModule
getProperties
in interface MailModule
mailPath
- The path that identifies an unique mail.PathNotFoundException
- If the indicated mail doesn't exist.RepositoryException
- If there is any general repository problem.DatabaseException
public void delete(String token, String mailPath) throws LockException, PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
MailModule
delete
in interface MailModule
mailPath
- The path that identifies an unique mail.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.DatabaseException
public void purge(String token, String mailPath) throws LockException, PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
MailModule
purge
in interface MailModule
mailPath
- The path that identifies an unique mail.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.DatabaseException
public Mail rename(String token, String mailPath, String newName) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, DatabaseException
MailModule
rename
in interface MailModule
mailPath
- The path that identifies an unique mail.newName
- The new mail name.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.DatabaseException
public void move(String token, String mailPath, String dstPath) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, DatabaseException
MailModule
move
in interface MailModule
mailPath
- The path that identifies an unique mail.dstPath
- The path of the destination mail.PathNotFoundException
- If the dstPath does not exists.ItemExistsException
- If there is already a mail in the
destination mail with the same name.AccessDeniedException
- If there is any security problem:
you can't modify the parent mail or the destination mail
because of lack of permissions.RepositoryException
- If there is any general repository problem.DatabaseException
public void copy(String token, String mailPath, String dstPath) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, IOException, AutomationException, DatabaseException, UserQuotaExceededException
MailModule
copy
in interface MailModule
mailPath
- The path that identifies an unique mail.dstPath
- The path of the destination mail.PathNotFoundException
- If the dstPath does not exists.ItemExistsException
- If there is already a mail in the
destination mail with the same name.AccessDeniedException
- If there is any security problem:
you can't modify the parent mail or the destination mail
because of lack of permissions.RepositoryException
- If there is any general repository problem.IOException
AutomationException
DatabaseException
UserQuotaExceededException
@Deprecated public List<Mail> getChilds(String token, String fldPath) throws PathNotFoundException, RepositoryException, DatabaseException
MailModule
getChilds
in interface MailModule
fldPath
- The path that identifies an unique folder.PathNotFoundException
- If there is no folder in the repository in this pathRepositoryException
- If there is any general repository problem.DatabaseException
public List<Mail> getChildren(String token, String fldPath) throws PathNotFoundException, RepositoryException, DatabaseException
MailModule
getChildren
in interface MailModule
fldPath
- The path that identifies an unique folder.PathNotFoundException
- If there is no folder in the repository in this pathRepositoryException
- If there is any general repository problem.DatabaseException
public boolean isValid(String token, String mailPath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
MailModule
isValid
in interface MailModule
mailPath
- The path that identifies an unique mail.PathNotFoundException
- If there is no mail in the repository with this path.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.DatabaseException
public String getPath(String token, String uuid) throws AccessDeniedException, RepositoryException, DatabaseException
MailModule
getPath
in interface MailModule
uuid
- The unique mail id.AccessDeniedException
- If there is any security problem:
you can't access this folder because of lack of permissions.RepositoryException
- If there is any problem.DatabaseException
Copyright © 2015. All Rights Reserved.