STP/Policy editor integration
Integration scenarious: WTP-based and XEF Policy Editors
Page describes some possible integration scenarios for WTP and XEF editors.
1. XEF Editor will always edit only one policy assertion
In this scenario XEF Editor will not show the left part of screen (Applied Policies, Add Policy/Delete) and leaves just right schema dependent GUI part [Fig. 1].
WTP-based Editor provide “add assertion” command via context menu or button. The following happens by activation of this command:
- WTP-based Editor will invoke XEF-Editor with empty input (it is also possible to set special property: “assertion=new”); [IEditorInput.getName() will return empty string in this case]
- XEF-Editor will recognize that new assertion should be added and immediately displays dialog to select available assertions (it is the same dialog as it displays now by Add Policy button) [Fig. 2];
- user selects new assertion in dialog;
- XEF-Editor displays appropriate GUI and saves assertion using normal Callback mechanism.
The advantages of this approach are: low efforts; consistency; possibility to see/edit some assertions in parallel in different XEF Editor windows.
2. XEF Editor processes all assertions inside one policy alternative
In this scenario WTP-based Editor will pass whole alternative element as input for XEF Editor. XEF Editor will displays the list of assertions and child alternatives in the list on left side of screen [Fig. 3]. Child alternatives should be disabled to expose, delete and edit. So user will be able to add/delete/edit only policy assertions in XEF Editor. For adding new assertion I see two possible ways:
2.1) Allow to add new assertions in XEF Editor only.
- User will click on assertion or alternative arrow in WTP Editor;
- XEF Editor XEF Editor will be activated for current alternative;
- User can add/delete assertions using “Add Assertion” button in XEF-Editor (now “Add Policy button”).
2.2) Allow to add new assertions in WTP Editor only.
- WTP-based Editor will invoke XEF-Editor with whole alternative element as input and sets special property: “assertion=new”; [IEditorInput.getName() will return empty string in this case]
- XEF-Editor will recognize that new assertion should be added and displays dialog to select available assertions (it is the same dialog as it displays now by Add Policy button) [Fig. 2];
- User selects new assertion in dialog;
- XEF Editor adds the new assertion to the list, selects it and displays appropriate GUI on the right side. Saving all assertions in alternative will be fulfilled using normal Callback mechanism;
Buttons "Add Policy ...", "Delete" will be removed from XEF Editor.
2.3) Allow to add new assertions in both: XEF and in WTP-based editors. Combination of 2.1 and 2.2 scenarios.
The advantage of this approach is that user can see/edit/add/delete assertions in single XEF Editor. Disadvantages are: higher efforts, lower consistenty (alternatives and assertions will be double displayed in both editors).