nasa/MCT-Plugins — pull request #136 by VWoeltjen (2014-02-07 21:29:27+00:00)
Title: [Scenario] Enforce containment rules for Tags and Activity Types

Per nasa/MCT-Plugins#135, Tags and Activity Types must always belong to exactly one repository of an appropriate type (e.g. User Tags, Mission Tags, et cetera)

In order to ensure this, the following changes are introduced:

* Prevent Remove Manifestation from repositories
* By the above definition, any Repository that contains an object is the _only_ repository that contains that object; a remove here would reduce the number of containing repositories to zero, violating the exactly-one rule.
* Add Tags/Activity Types to User Tags/User Activity Types whenever they are Created
* Otherwise, one of the objects could be Created in a Activity and belong to zero (not exactly one) repositories
* Remove objects from other repositories when they are added to a new repository
* Effectively converts a drag-drop into a move. Ensures that these components do not belong to more than one repository

Additionally, pop up a dialog when moving objects between repositories. This serves two purposes:
* Since behavior is different from the usual behavior of a drag-drop operation, this explains to the user that something different has happened.
* Removing components from other repositories requires identifying these other repositories, which in turn involves `getReferencingComponents`. As currently implemented, this method results in a database query before returning, meaning it is potentially time-consuming (particularly if there is connection latency). Popping the dialog allows progress notification to be shown while the operation is underway.