Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "STP/Policy editor integration"

< STP
(Integration scenarious: WTP-based and XEF Policy Editors)
(Integration scenarious: WTP-based and XEF Policy Editors)
Line 9: Line 9:
  
 
WTP-based Editor provide “add assertion” command via context menu or button. The following happens by activation of this command:
 
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”);
+
* 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];
 
* 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;
 
* user selects new assertion in dialog;
Line 37: Line 37:
 
* User can add/delete assertions using “Add Assertion” button in XEF-Editor (now “Add Policy button”).
 
* User can add/delete assertions using “Add Assertion” button in XEF-Editor (now “Add Policy button”).
  
2.2) Allow to add new assertions in both: XEF and in WTP-based editors.
+
2.2) Allow to add new assertions in WTP Editor only.  
This scenario includes 2.1 functionality and, additionally, 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 whole alternative element as input and sets special property: “assertion=new”; [IEditorInput.getName() will return empty string in this case]
* WTP-based Editor will invoke XEF-Editor with whole alternative element as input and sets special property: “assertion=new”;
+
 
* 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];
 
* 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;
 
* 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;
 
* 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.
  
The advantage of this approach is that user can see/edit/add/delete assertions in single XEF Editor. Disadvantages are: higher efforts, not consistent as the first (alternatives and assertions will be double displayed in both editors).
+
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).
  
 
Figure 3: XEF processes multile assertions
 
Figure 3: XEF processes multile assertions
 
[[Image:STPPolicyMultipleXEF.gif]]
 
[[Image:STPPolicyMultipleXEF.gif]]

Revision as of 09:24, 22 February 2008

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.


Figure 1: XEF processes single assertion STPPolicySingleXEF.gif


Figure 2: Adding new assertion STPPolicyAddAssertion.gif



2. XEF Editor will always edit 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).

Figure 3: XEF processes multile assertions STPPolicyMultipleXEF.gif

Copyright © Eclipse Foundation, Inc. All Rights Reserved.