Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Today the IContext interface and the implementation have a concept of "owner" facets. In our implementation we actually mark with an isOwner bit the facet within a context that represents the user. So at present we have two roles "owner" and "non-owner" defined.There are two huge problems with this approach. First this limits us to exactly two fixed roles for all contexts (owner and non-owner) when in reality each context needs to be able to define its own roles (and there certainly may be more than two!). Second, if we replicate a context data structure (as we do with ProfileShare) to another machine which facet object is marked as the owner will be the wrong one. If a context had two facets A and B running on a machine where A represented the user then facet A would be marked with isOwner == true. If this context was replicated to B's machine and not modified then A would remain marked when in fact it should be B that is marked.
We already have code that uses the IContext interface and relies on it to know if a facet is an owner facet or a non-owner facet. We need to add a method to the Higgins class that can provide this information about a facet/member so that the existing code can call this new method instead of invoking isOwner() on the facet. The new Higgins method should look something like this:
public boolean isOwner(IFacet f)
It will return true if the facet f is an "owner" facet. This mew method will work completely differently from the existing code. It will rely on the fact that there should be a facet reference stored on the ONE sole facet in the "user" context org.eclipse.higgins.context.user pointing to whichever facet within a context (e.g. the ProfileShare context) represents the user. A facet that is the target of one of these facet references from the sole facet in the "user" context is considered an "owner" facet.
We said above that there "should" be a facet reference in the one sole facet in the user context. Well there isn't one there now. See H5-11-26.