public class JcrMailModule extends Object implements MailModule
| Constructor and Description |
|---|
JcrMailModule() |
| 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.
|
Mail |
create(String token,
Mail mail,
String userId)
Used when importing mail from scheduler
|
void |
delete(String token,
String mailPath)
Delete a mail the repository.
|
void |
extendedCopy(String token,
String mailPath,
String dstPath,
ExtendedAttributes extAttr)
Copy a mail to another location in 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.
|
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 Mail create(String token, Mail mail) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, VirusDetectedException, DatabaseException, UserQuotaExceededException
MailModulecreate in interface MailModulemail - A mail object with the new mail properties.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.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.VirusDetectedExceptionDatabaseExceptionUserQuotaExceededExceptionpublic Mail create(String token, Mail mail, String userId) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, VirusDetectedException, DatabaseException, UserQuotaExceededException
public Mail getProperties(String token, String mailPath) throws PathNotFoundException, RepositoryException, DatabaseException
MailModulegetProperties in interface MailModulemailPath - The path that identifies an unique mail, or its UUID.PathNotFoundException - If the indicated mail doesn't exist.RepositoryException - If there is any general repository problem.DatabaseExceptionpublic void delete(String token, String mailPath) throws AccessDeniedException, RepositoryException, PathNotFoundException, LockException, DatabaseException
MailModuledelete in interface MailModulemailPath - The path that identifies an unique mail.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.PathNotFoundException - If there is no mail in the repository in this path.LockException - Can't delete a mail with locked documents.DatabaseExceptionpublic void purge(String token, String mailPath) throws AccessDeniedException, RepositoryException, PathNotFoundException, DatabaseException
MailModulepurge in interface MailModulemailPath - The path that identifies an unique mail.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.PathNotFoundException - If there is no mail in the repository in this path.DatabaseExceptionpublic Mail rename(String token, String mailPath, String newName) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, DatabaseException
MailModulerename in interface MailModulemailPath - The path that identifies an unique mail.newName - The new mail name.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.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.DatabaseExceptionpublic void move(String token, String mailPath, String dstPath) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, DatabaseException
MailModulemove in interface MailModulemailPath - The path that identifies an unique mail.dstPath - The path of the destination mail.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.PathNotFoundException - If the dstPath does not exists.ItemExistsException - If there is already a mail in the
destination mail with the same name.DatabaseExceptionpublic void copy(String token, String mailPath, String dstPath) throws AccessDeniedException, RepositoryException, PathNotFoundException, ItemExistsException, IOException, DatabaseException, UserQuotaExceededException
MailModulecopy in interface MailModulemailPath - The path that identifies an unique mail.dstPath - The path of the destination mail.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.PathNotFoundException - If the dstPath does not exists.ItemExistsException - If there is already a mail in the
destination mail with the same name.IOExceptionDatabaseExceptionUserQuotaExceededExceptionpublic void extendedCopy(String token, String mailPath, String dstPath, ExtendedAttributes extAttr) throws PathNotFoundException, ItemExistsException, AccessDeniedException, RepositoryException, IOException, DatabaseException, UserQuotaExceededException
MailModuleextendedCopy in interface MailModulemailPath - The path that identifies an unique mail.dstPath - The path of the destination mail.extAttr - Attributes to define what need to be duplicated.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.IOExceptionDatabaseExceptionUserQuotaExceededException@Deprecated public List<Mail> getChilds(String token, String fldPath) throws PathNotFoundException, RepositoryException, DatabaseException
MailModulegetChilds in interface MailModulefldPath - The path that identifies an unique folder or its UUID.PathNotFoundException - If there is no folder in the repository in this pathRepositoryException - If there is any general repository problem.DatabaseExceptionpublic List<Mail> getChildren(String token, String fldPath) throws PathNotFoundException, RepositoryException, DatabaseException
MailModulegetChildren in interface MailModulefldPath - The path that identifies an unique folder or its UUID.PathNotFoundException - If there is no folder in the repository in this pathRepositoryException - If there is any general repository problem.DatabaseExceptionpublic boolean isValid(String token, String mailPath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
MailModuleisValid in interface MailModulemailPath - The path that identifies an unique mail or its UUID.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.DatabaseExceptionpublic String getPath(String token, String uuid) throws AccessDeniedException, RepositoryException, DatabaseException
MailModulegetPath in interface MailModuleuuid - 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.DatabaseExceptionCopyright © 2015. All Rights Reserved.