Interface BlueMindMailbox
- All Known Implementing Classes:
BlueMindSessionMailbox
public interface BlueMindMailbox
The settings of one mailbox as a job of
BlueMindMailboxTransport.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.mail.service.BlueMindMailbox, T>)
sees them: the mailbox of the session's own login, and no other. It
takes no mailbox parameter at all, since the mailbox and domain uids are the
login answer's, and it carries no session key: the key stays inside
bluemind-client. The sharing calls follow the same rule: the
access-control list read and replaced is the login's own mailbox's, and the
subscriptions edited are the login's own user's; the only other user they
name is one the caller resolved through the directory. A folder's list is
one of the login's own folders, named by the uid the login's own folder
listing gave it.
Valid for the duration of the job only, like the session under it.
-
Method Summary
Modifier and TypeMethodDescriptionlongaddRule(tools.jackson.databind.node.ObjectNode rule) Adds one filter rule (PUT _rules) after the last rule of its own client, and nothing else.voiddeleteRule(long id) Removes one filter rule (DELETE _rules/{id}), and nothing else.org.exoplatform.bluemind.client.model.BlueMindDirectoryEntryfindByEmail(String email) The directory entry of an address (directory/_byEmail).org.exoplatform.bluemind.client.model.BlueMindDirectoryEntryThe directory entry of a uid (directory/entry-uid).List<org.exoplatform.bluemind.client.model.BlueMindAclEntry> getAcls()The access-control list of the login's own mailbox (GET _acls).List<org.exoplatform.bluemind.client.model.BlueMindAclEntry> getFolderAcl(String folderUid) The access-control list of one of the login's own folders (GET _aclof its records container), every subject's verbs expanded, the owner's row included.List<org.exoplatform.bluemind.client.model.BlueMindMailFolder> The folders of the login's own mailbox, the deleted ones left out.org.exoplatform.bluemind.client.model.BlueMindForwardingThe forward (GET _forwarding).List<tools.jackson.databind.node.ObjectNode> getRules()Every filter rule of the login's own mailbox (GET _rules), whatever client wrote it, in BlueMind's order.List<tools.jackson.databind.node.ObjectNode> getRulesByClient(String client) The filter rules one client wrote in the login's own mailbox (GET _rulesByClient), in BlueMind's order.List<org.exoplatform.bluemind.client.model.BlueMindSharedContainer> The login's own folders shared with somebody, in one call (_shared?type=mailbox_records): each folder's records container and the rows given on it, as stored (compact, the owner's rows left out).org.exoplatform.bluemind.client.model.BlueMindVacationThe automatic reply (GET _vacation).List<org.exoplatform.bluemind.client.model.BlueMindMailboxSubscription> The login's own user's subscriptions to mailboxes, its own mailbox included.voidReplaces the access-control list of the login's own mailbox (POST _acls) with exactly the rows given.voidsetFolderAcl(String folderUid, List<org.exoplatform.bluemind.client.model.BlueMindAclEntry> entries) Replaces the access-control list of one of the login's own folders (PUT _aclof its records container) with exactly the rows given.voidsetForwarding(org.exoplatform.bluemind.client.model.BlueMindForwarding forwarding) Replaces the forward (POST _forwarding), and nothing else.voidsetVacation(org.exoplatform.bluemind.client.model.BlueMindVacation vacation) Replaces the automatic reply (POST _vacation), and nothing else.voidsubscribeToMailbox(String ownerUid) Subscribes the login's own user to another user's mailbox.timeZone()The account's own time zone, as its login answered it.voidunsubscribeFromMailbox(String ownerUid) Withdraws the login's own user's subscription to another user's mailbox.voidupdateRule(long id, tools.jackson.databind.node.ObjectNode rule) Replaces one filter rule in place (POST _rules/{id}), and nothing else.userUid()The directory entry uid the session was authenticated as, as its login answered it: the owner of the mailbox every call here addresses.
-
Method Details
-
timeZone
String timeZone()The account's own time zone, as its login answered it.- Returns:
- the zone id, or null when the answer named none
-
getVacation
org.exoplatform.bluemind.client.model.BlueMindVacation getVacation()The automatic reply (GET _vacation).- Returns:
- what the server holds; off and empty when nothing was ever set
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails
-
setVacation
void setVacation(org.exoplatform.bluemind.client.model.BlueMindVacation vacation) Replaces the automatic reply (POST _vacation), and nothing else.- Parameters:
vacation- the reply- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails
-
getForwarding
org.exoplatform.bluemind.client.model.BlueMindForwarding getForwarding()The forward (GET _forwarding).- Returns:
- what the server holds; off when nothing was ever set
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails
-
setForwarding
void setForwarding(org.exoplatform.bluemind.client.model.BlueMindForwarding forwarding) Replaces the forward (POST _forwarding), and nothing else. The caller has checked the destination.- Parameters:
forwarding- the forward- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails
-
userUid
String userUid()The directory entry uid the session was authenticated as, as its login answered it: the owner of the mailbox every call here addresses.- Returns:
- the uid, or null when the answer named none
-
getAcls
List<org.exoplatform.bluemind.client.model.BlueMindAclEntry> getAcls()The access-control list of the login's own mailbox (GET _acls).- Returns:
- the rows, in BlueMind's order
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails, or answers a row eXo cannot read
-
setAcls
Replaces the access-control list of the login's own mailbox (POST _acls) with exactly the rows given.- Parameters:
entries- the whole list, the owner's own rows included- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails
-
findByEmail
The directory entry of an address (directory/_byEmail).- Parameters:
email- the address- Returns:
- the entry, or null when the directory holds none
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, a route the deployment's proxy filters included
-
findByUid
The directory entry of a uid (directory/entry-uid).- Parameters:
uid- the uid- Returns:
- the entry, or null when the directory holds none
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
subscribeToMailbox
Subscribes the login's own user to another user's mailbox.- Parameters:
ownerUid- the owner's uid- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
unsubscribeFromMailbox
Withdraws the login's own user's subscription to another user's mailbox.- Parameters:
ownerUid- the owner's uid- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
mailboxSubscriptions
List<org.exoplatform.bluemind.client.model.BlueMindMailboxSubscription> mailboxSubscriptions()The login's own user's subscriptions to mailboxes, its own mailbox included.- Returns:
- the subscriptions
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
getRules
List<tools.jackson.databind.node.ObjectNode> getRules()Every filter rule of the login's own mailbox (GET _rules), whatever client wrote it, in BlueMind's order.- Returns:
- the rules, as BlueMind's JSON objects
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
getRulesByClient
The filter rules one client wrote in the login's own mailbox (GET _rulesByClient), in BlueMind's order.- Parameters:
client- the client- Returns:
- the rules, as BlueMind's JSON objects
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
addRule
long addRule(tools.jackson.databind.node.ObjectNode rule) Adds one filter rule (PUT _rules) after the last rule of its own client, and nothing else.- Parameters:
rule- the rule, without an id- Returns:
- the id BlueMind gave it
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, a validator's refusal included
-
updateRule
void updateRule(long id, tools.jackson.databind.node.ObjectNode rule) Replaces one filter rule in place (POST _rules/{id}), and nothing else.- Parameters:
id- the rule's idrule- the rule- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, a validator's refusal included
-
deleteRule
void deleteRule(long id) Removes one filter rule (DELETE _rules/{id}), and nothing else.- Parameters:
id- the rule's id- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
getFolders
List<org.exoplatform.bluemind.client.model.BlueMindMailFolder> getFolders()The folders of the login's own mailbox, the deleted ones left out.- Returns:
- the folders
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind
-
getFolderAcl
The access-control list of one of the login's own folders (GET _aclof its records container), every subject's verbs expanded, the owner's row included.- Parameters:
folderUid- the folder's uid, fromgetFolders()- Returns:
- the rows, in BlueMind's order
- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails, or answers a row eXo cannot read
-
setFolderAcl
void setFolderAcl(String folderUid, List<org.exoplatform.bluemind.client.model.BlueMindAclEntry> entries) Replaces the access-control list of one of the login's own folders (PUT _aclof its records container) with exactly the rows given.- Parameters:
folderUid- the folder's uid, fromgetFolders()entries- the whole list, the owner's own rows included- Throws:
org.exoplatform.bluemind.client.exception.BlueMindException- by kind, when the server refuses or fails
-