Global Parameter Management
This adapter manages the global parameters within the defined global parameter storage.
Properties
Operation | Defines the operation executed by the adapter Possible values:
|
Parameters
Adapter | Main adapter class (do not change!) Possible values: de.softproject.x4.plugins.globalparameter.adapter.GlobalParameterStorageAdapter: Main class (default) |
Status values
| The operation was successful |
| The operation failed due to a technical error |
The documentation of the ReST interface can be found at http://localhost:8080/X4/X4Api/.
Input
The operations Get, AddKeys, RemoveKeys, RemoveGroups, ReplaceGroups and Import expect the following input XML documents:
Operation Get
The following input XML structure loads the groups DEV and DEFAULT from the global parameter storage:
<?xml version="1.0" encoding="UTF-8"?>
<Placeholder>
<Group name="DEV"/>
<Group name="DEFAULT"/>
</Placeholder>
Operation AddKeys, ReplaceGroups and Import
The following XML document describes parameters for adding, replacing and importing:
<?xml version="1.0" encoding="UTF-8"?>
<Placeholder><!-- For operation Import optional attribute (default=false): deleteAndImport=true|false -->
<Group name="DEV">
<Key name="message" type="String">Hello X4 developer!</Key>
<!-- valid types: String|Password|Boolean|Integer|Decimal|Date -->
</Group>
<Group name="DEFAULT">
<Key name="message" type="String">Hello world!</Key>
<Key name="endOfTheWorld" type="Date">2012-12-21</Key>
<Key name="sayHello" type="Boolean">true</Key>
</Group>
<Group name="PASSW">
<Key name="Password" type="Password">MyNewPassword</Key>
</Group>
</Placeholder>
An empty parameter group when calling the operation Replace causes the entire parameter group to be emptied. Thus, the call corresponds to the operation Remove. For the operation Import, it is optionally possible to delete the corresponding parameter groups before the import. To do this, the attribute deleteAndImport in the root node must be set to true.
Operation RemoveKeys
The following XML document removes single parameters of a group:
<?xml version="1.0" encoding="UTF-8"?>
<Placeholder>
<Group name="DEFAULT">
<Key name="endOfTheWorld"/>
</Group>
</Placeholder>
Operation RemoveGroups
The following XML document removes a complete parameter group:
<?xml version="1.0" encoding="UTF-8"?>
<Placeholder>
<Group name="DEFAULT" />
</Placeholder>
Output
The operation Refresh outputs the current state of all parameters in an XML document.
All other operations return the parameter groups requested or changed by the request:
<?xml version="1.0" encoding="UTF-8"?>
<Placeholder>
<Group name="DEV">
<Key name="message" type="String">Hello X4 developer!</Key>
</Group>
<Group name="DEFAULT">
<Key name="message" type="String">Hello world!</Key>
<Key name="endOfTheWorld" type="Date">2012-12-21</Key>
<Key name="sayHello" type="Boolean">true</Key>
</Group>
<Group name="PASSW">
<Key name="Password" type="Password">MyNewPassword</Key>
</Group>
</Placeholder>