Class BlueMindSessionMailbox
java.lang.Object
org.exoplatform.bluemind.mail.service.BlueMindSessionMailbox
- All Implemented Interfaces:
BlueMindMailbox
The mailbox of one open session, over
bluemind-client's mailbox
calls: every call is the client's, on the session the client opened, so the
paths, the key header and the failures by kind are the client's rules.-
Constructor Summary
ConstructorsConstructorDescriptionBlueMindSessionMailbox(org.exoplatform.bluemind.client.BlueMindMailboxClient mailboxClient, org.exoplatform.bluemind.client.BlueMindMailboxSharingClient sharingClient, org.exoplatform.bluemind.client.BlueMindSession session) The mailbox of a session. -
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.
-
Constructor Details
-
BlueMindSessionMailbox
public BlueMindSessionMailbox(org.exoplatform.bluemind.client.BlueMindMailboxClient mailboxClient, org.exoplatform.bluemind.client.BlueMindMailboxSharingClient sharingClient, org.exoplatform.bluemind.client.BlueMindSession session) The mailbox of a session.- Parameters:
mailboxClient- the client's mailbox callssharingClient- the client's sharing callssession- the session the client opened for the job
-
-
Method Details
-
timeZone
The account's own time zone, as its login answered it.- Specified by:
timeZonein interfaceBlueMindMailbox- Returns:
- the zone id, or null when the answer named none
-
getVacation
public org.exoplatform.bluemind.client.model.BlueMindVacation getVacation()The automatic reply (GET _vacation).- Specified by:
getVacationin interfaceBlueMindMailbox- Returns:
- what the server holds; off and empty when nothing was ever set
-
setVacation
public void setVacation(org.exoplatform.bluemind.client.model.BlueMindVacation vacation) Replaces the automatic reply (POST _vacation), and nothing else.- Specified by:
setVacationin interfaceBlueMindMailbox- Parameters:
vacation- the reply
-
getForwarding
public org.exoplatform.bluemind.client.model.BlueMindForwarding getForwarding()The forward (GET _forwarding).- Specified by:
getForwardingin interfaceBlueMindMailbox- Returns:
- what the server holds; off when nothing was ever set
-
setForwarding
public void setForwarding(org.exoplatform.bluemind.client.model.BlueMindForwarding forwarding) Replaces the forward (POST _forwarding), and nothing else. The caller has checked the destination.- Specified by:
setForwardingin interfaceBlueMindMailbox- Parameters:
forwarding- the forward
-
userUid
The directory entry uid the session was authenticated as, as its login answered it: the owner of the mailbox every call here addresses.- Specified by:
userUidin interfaceBlueMindMailbox- Returns:
- the uid, or null when the answer named none
-
getAcls
The access-control list of the login's own mailbox (GET _acls).- Specified by:
getAclsin interfaceBlueMindMailbox- Returns:
- the rows, in BlueMind's order
-
setAcls
Replaces the access-control list of the login's own mailbox (POST _acls) with exactly the rows given.- Specified by:
setAclsin interfaceBlueMindMailbox- Parameters:
entries- the whole list, the owner's own rows included
-
findByEmail
The directory entry of an address (directory/_byEmail).- Specified by:
findByEmailin interfaceBlueMindMailbox- Parameters:
email- the address- Returns:
- the entry, or null when the directory holds none
-
findByUid
The directory entry of a uid (directory/entry-uid).- Specified by:
findByUidin interfaceBlueMindMailbox- Parameters:
uid- the uid- Returns:
- the entry, or null when the directory holds none
-
subscribeToMailbox
Subscribes the login's own user to another user's mailbox.- Specified by:
subscribeToMailboxin interfaceBlueMindMailbox- Parameters:
ownerUid- the owner's uid
-
unsubscribeFromMailbox
Withdraws the login's own user's subscription to another user's mailbox.- Specified by:
unsubscribeFromMailboxin interfaceBlueMindMailbox- Parameters:
ownerUid- the owner's uid
-
mailboxSubscriptions
public List<org.exoplatform.bluemind.client.model.BlueMindMailboxSubscription> mailboxSubscriptions()The login's own user's subscriptions to mailboxes, its own mailbox included.- Specified by:
mailboxSubscriptionsin interfaceBlueMindMailbox- Returns:
- the subscriptions
-
getRules
Every filter rule of the login's own mailbox (GET _rules), whatever client wrote it, in BlueMind's order.- Specified by:
getRulesin interfaceBlueMindMailbox- Returns:
- the rules, as BlueMind's JSON objects
-
getRulesByClient
The filter rules one client wrote in the login's own mailbox (GET _rulesByClient), in BlueMind's order.- Specified by:
getRulesByClientin interfaceBlueMindMailbox- Parameters:
client- the client- Returns:
- the rules, as BlueMind's JSON objects
-
addRule
public 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.- Specified by:
addRulein interfaceBlueMindMailbox- Parameters:
rule- the rule, without an id- Returns:
- the id BlueMind gave it
-
updateRule
public void updateRule(long id, tools.jackson.databind.node.ObjectNode rule) Replaces one filter rule in place (POST _rules/{id}), and nothing else.- Specified by:
updateRulein interfaceBlueMindMailbox- Parameters:
id- the rule's idrule- the rule
-
deleteRule
public void deleteRule(long id) Removes one filter rule (DELETE _rules/{id}), and nothing else.- Specified by:
deleteRulein interfaceBlueMindMailbox- Parameters:
id- the rule's id
-
getFolders
The folders of the login's own mailbox, the deleted ones left out.- Specified by:
getFoldersin interfaceBlueMindMailbox- Returns:
- the folders
-
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.- Specified by:
getFolderAclin interfaceBlueMindMailbox- Parameters:
folderUid- the folder's uid, fromBlueMindMailbox.getFolders()- Returns:
- the rows, in BlueMind's order
-
setFolderAcl
public 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.- Specified by:
setFolderAclin interfaceBlueMindMailbox- Parameters:
folderUid- the folder's uid, fromBlueMindMailbox.getFolders()entries- the whole list, the owner's own rows included
-