Skip to main content
Skip table of contents

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:

  • AddKeys: Adds all parameters to the respective parameters groups
  • Export: Exports all parameters from the parameter storage (doesn't need any input document)
  • Get: Outputs all parameters of the requested parameter groups, taking into account the cache
  • Import: All parameters within the respective parameter groups are added or replaced
  • Refresh: Reloads all parameters from the database
  • RemoveKeys: Removes all parameters within the respective parameter groups
  • RemoveGroups: Removes all parameter groups
  • ReplaceGroups: Replaces all parameters within the respective parameter groups

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.x4.plugins.globalparameter.adapter.GlobalParameterStorageAdapter: Main class (default)

Status values

1 (successful)

The operation was successful

-1 (failed)

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 GetAddKeysRemoveKeysRemoveGroupsReplaceGroups 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
<?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
<?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
 <?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
 <?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
<?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>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.