Class BlueMindMailboxSharingClient
IMailboxes
_acls, read and replaced), the directory lookups by address and by
uid (IDirectory _byEmail and entry-uid), and the
session user's own subscription to another user's mailbox
(IUserSubscription _subscribe / _unsubscribe). A
folder is shared through its own list, the one of its records container
mbox_records_<folder uid> (IContainerManagement
_acl, read and replaced), and one call lists every shared folder of
the session's user (IContainers _shared); all three answered
200 live on an ordinary user's session (2026-10-01). The
login, the key header, the bounds and the redirect refusal are the
session's (BlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)).
The session's own mailbox and subscriptions, and nobody else's. The ACL read and written is the one of the mailbox the login answered, and the subscriptions edited are the login's own: every such path is built from the two uids of the login answer, never from a value a caller supplies. The other user a subscription names is a uid the caller resolved; it is checked against a conservative uid shape before it is written into a container uid.
A folder's list is addressed by the folder's uid, which the caller read from the session's own folder listing; this client checks only its shape. The list's container is the session user's own by construction of that uid, and BlueMind checks the session may manage it.
The ACL write is a full replace, with no version to compare.
POST _acls, and PUT _acl on a folder, replace the whole
list, and BlueMind offers no ETag: the
caller reads the list, changes its own rows, writes the whole list back and
reads it again. This client does neither the merge nor the comparison; it
reads and writes exactly the rows it is given, and refuses a list it cannot
read row by row rather than dropping a row it did not understand.
Failures are read by kind as BlueMindAnswers says; a lookup that
finds nothing answers null, never a guessed entry.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe access-control list of a mailbox.static final StringThe prefix of a folder's records container, whose list is the folder's.static final StringThe container type of a folder's records, as_sharedfilters on it.static final StringThe prefix of the ACL container of a user's mailbox. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindByEmail(BlueMindSession session, String email) The directory entry of an address, as the session's user may see it (GET /api/directory/{domainUid}/_byEmail/{email}).findByUid(BlueMindSession session, String uid) The directory entry of a uid, as the session's user may see it (GET /api/directory/{domainUid}/entry-uid/{uid}).static StringfolderContainerUid(String folderUid) The records container of one folder,mbox_records_<folderUid>: the container whose list is the folder's.getAcls(BlueMindSession session) ReadsGET _aclsof the session's own mailbox.getFolderAcl(BlueMindSession session, String folderUid) Reads the list of one folder of the session's own mailbox (GET /api/containers/_manage/mbox_records_<folderUid>/_acl): every subject's verbs expanded, the owner's row included.getSharedFolders(BlueMindSession session) Lists the session's own folders that are shared with somebody (GET /api/containers/{domainUid}/{userUid}/_shared?type=mailbox_records): each folder's records container and the rows given on it, as stored.static booleanWhether a value has a uid's shape, the one checked before a uid reaches a path or a container uid.static StringmailboxContainerUid(String ownerUid) The ACL container of a user's mailbox,mailbox:acls-<uid>: the container a mailbox share is subscribed to.mailboxSubscriptions(BlueMindSession session) The session's own user's subscriptions to mailboxes (GET /api/users/{domainUid}/subscriptions/{userUid}?type=mailboxacl), the user's own mailbox included (its owner is the user).voidsetAcls(BlueMindSession session, List<BlueMindAclEntry> entries) Replaces the access-control list of the session's own mailbox (POST _acls) with exactly the rows given, in their order.voidsetFolderAcl(BlueMindSession session, String folderUid, List<BlueMindAclEntry> entries) Replaces the list of one folder of the session's own mailbox (PUT /api/containers/_manage/mbox_records_<folderUid>/_acl) with exactly the rows given, in their order.voidsubscribeToMailbox(BlueMindSession session, String ownerUid) Subscribes the session's own user to another user's mailbox (POST /api/users/{domainUid}/subscriptions/{userUid}/_subscribewith the containermailbox:acls-<ownerUid>, synchronised offline and mounted automatically, as BlueMind's own clients hold it).voidunsubscribeFromMailbox(BlueMindSession session, String ownerUid) Withdraws the session's own user's subscription to another user's mailbox (POST .../_unsubscribewith["mailbox:acls-<ownerUid>"]).
-
Field Details
-
ACLS
The access-control list of a mailbox.- See Also:
-
MAILBOX_ACL_CONTAINER
The prefix of the ACL container of a user's mailbox.- See Also:
-
FOLDER_CONTAINER
The prefix of a folder's records container, whose list is the folder's.- See Also:
-
FOLDER_CONTAINER_TYPE
The container type of a folder's records, as_sharedfilters on it.- See Also:
-
-
Constructor Details
-
BlueMindMailboxSharingClient
public BlueMindMailboxSharingClient()
-
-
Method Details
-
getAcls
ReadsGET _aclsof the session's own mailbox.- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)- Returns:
- the rows, in the order BlueMind answered them
- Throws:
BlueMindException- by kind, and when the answer is not a list of rows each naming a subject and a verb
-
getFolderAcl
Reads the list of one folder of the session's own mailbox (GET /api/containers/_manage/mbox_records_<folderUid>/_acl): every subject's verbs expanded, the owner's row included.- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)folderUid- the folder's uid, from the session's folder listing- Returns:
- the rows, in the order BlueMind answered them
- Throws:
BlueMindException- by kind, when the uid does not have a uid's shape, and when the answer is not a list of rows each naming a subject and a verb
-
setFolderAcl
Replaces the list of one folder of the session's own mailbox (PUT /api/containers/_manage/mbox_records_<folderUid>/_acl) with exactly the rows given, in their order.- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)folderUid- the folder's uid, from the session's folder listingentries- the whole list, the owner's own rows included- Throws:
BlueMindException- by kind, when the uid does not have a uid's shape, and when a row names no subject or no verb
-
setAcls
Replaces the access-control list of the session's own mailbox (POST _acls) with exactly the rows given, in their order.- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)entries- the whole list, the owner's own rows included- Throws:
BlueMindException- by kind, and when a row names no subject or no verb
-
findByEmail
The directory entry of an address, as the session's user may see it (GET /api/directory/{domainUid}/_byEmail/{email}).- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)email- the address- Returns:
- the entry, or null when the directory holds none for it: a 404
whose body is empty or JSON, a
NOT_FOUNDfault, or an empty answer -- the shapes BlueMind's REST layer gives a missing entry, inferred and not yet observed live - Throws:
BlueMindException- by kind -- a route the deployment's proxy filters included, a 403 or a 404 whose body is not BlueMind's, which is never read as "none" -- and when the address is blank or the answer names no uid
-
findByUid
The directory entry of a uid, as the session's user may see it (GET /api/directory/{domainUid}/entry-uid/{uid}).- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)uid- the entry's uid- Returns:
- the entry, or null when the directory holds none for it
- Throws:
BlueMindException- by kind, and when the uid does not have a uid's shape or the answer names no uid
-
subscribeToMailbox
Subscribes the session's own user to another user's mailbox (POST /api/users/{domainUid}/subscriptions/{userUid}/_subscribewith the containermailbox:acls-<ownerUid>, synchronised offline and mounted automatically, as BlueMind's own clients hold it).- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)ownerUid- the uid of the mailbox's owner- Throws:
BlueMindException- by kind, and when the uid does not have a uid's shape
-
unsubscribeFromMailbox
Withdraws the session's own user's subscription to another user's mailbox (POST .../_unsubscribewith["mailbox:acls-<ownerUid>"]).- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)ownerUid- the uid of the mailbox's owner- Throws:
BlueMindException- by kind, and when the uid does not have a uid's shape
-
mailboxSubscriptions
The session's own user's subscriptions to mailboxes (GET /api/users/{domainUid}/subscriptions/{userUid}?type=mailboxacl), the user's own mailbox included (its owner is the user).- Parameters:
session- the session, fromBlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)- Returns:
- the subscriptions naming a container and an owner, in BlueMind's order
- Throws:
BlueMindException- by kind, and when the answer is not a list
-
isUid
Whether a value has a uid's shape, the one checked before a uid reaches a path or a container uid.- Parameters:
uid- the value- Returns:
- true when it may be sent as a uid
-
mailboxContainerUid
The ACL container of a user's mailbox,mailbox:acls-<uid>: the container a mailbox share is subscribed to.- Parameters:
ownerUid- the owner's uid- Returns:
- the container uid
- Throws:
BlueMindException- when the uid does not have a uid's shape
-
folderContainerUid
The records container of one folder,mbox_records_<folderUid>: the container whose list is the folder's.- Parameters:
folderUid- the folder's uid- Returns:
- the container uid
- Throws:
BlueMindException- when the uid does not have a uid's shape
-