ForumSharingManager interface with UI
The ForumSharingManager will be rewritten and changes its paradigm from "sharing as state" to "sharing as action", so the UI interface will need to change along with it.
This is how it could look like:
/** Returns the unique ID of the forum sharing client. */ ClientId getClientId(); /** Sends an invitation to share the given forum with the given contact and sends an optional message along with it. */ void sendForumInvitation(Forum f, ContactId contactId, @Nullable String message) throws DbException; /** Responds to a pending forum invitation */ void respondToInvitation(SessionId sessionId, ContactId contactId, boolean accept) throws DbException; /** Returns all forum sharing messages sent by the Contact identified by contactId. */ Collection<ForumInvitationMessage> getForumInvitationMessages(ContactId contactId) throws DbException; /** Returns all forums to which the user could subscribe. */ Collection<Forum> getAvailableForums() throws DbException; /** Returns all contacts who are sharing the given forum with the user. */ Collection<Contact> getSharedBy(Forum f) throws DbException; /** Returns the IDs of all contacts with whom the given forum is shared. */ Collection<ContactId> getSharedWith(Forum f) throws DbException;
Note that I removed methods for adding and (un)subscribing to/from a forum. These are probably better placed into the
This is a subtask of Issue #121 (closed).