STP/Policy Component/Policy editor documentation
The STP Policy Editor and XEF (Xml Editing Framework)
The STP policy editor is an Eclipse editor for editing WS-Policy content or other XML content that is based on XML-Schema with a graphical editor. It is based on the XML Editing Framework (XEF), which also part of STP.
What kind of policies can be edited
The simplest way to use the policy editor is on a file in the Eclipse workspace. In the example below you can see the policy editor being used on a file called 'myService.policies'. The file contains a logging and a security policy.
The policy editor dynamically generates an editor as the above one that can be used to edit policies. It provides both a graphical view as well as a text-based view of the policy document being edited.
The editor in the example above is editing the following XML:
<?xml version="1.0" encoding="UTF-8"?> <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"> <wsp:All> <acme:Logging xmlns:acme="http://www.acme.com/xsd/2007/08/logging"> <file encryption_password="edcba" encryption_type="DES" filename="myService.log" rolling_file="true" /> </acme:Logging> <acme:Security xmlns:acme="http://www.acme.com/xsd/2007/08/security" /> </wsp:All> </wsp:Policy>
In this example, the Logging and Security policy are based on their XML Schema definitions and the policy editor has created the editor dynamically by reading the Schema definitions. By looking at the editor, you can see that the policies document currently contains 2 policies: Logging and Security. The logging policy has a sub-element called 'file'.
The file element has a number of attributes, some of which has defaults others are required. They have tooltips and documentation in the policy help view. There are also extra sections with 'Encryption' and 'Advanced' attributes. There are fields that are enumerated (the encryption type) and password fields. Some fields have their units of measurement specified (the kb. field) and all of them have proper display names. The following section provides a quick start to getting here.
The resulting XML file in this example is a WS-Policy compliant document. However note that currently not all of the WS-Policy constructs are supported yet. Currently only
wsp:All is supported.