Annotations
Annotations are used to specify the needed attributes on type and field level attributes for the configuration objects. See Configuration Object Example for the full example used for illustration below.
Class Level Annotations
@DRStorableId("devkitexamples.DiskCollectionConfig") @DRConfigTypeInfo(version = 10f, section = "Disk Collection") public class DiskCollectionConfig extends DRAbstractConfigObject {
Configuration objects handles serialization through the normal  DRStorable
data serialization interface (see ), but the actual implementation is handled automatically through reflection. Therefore a DRStorableId
must be specified and also a version parameter in the DRConfigTypeInfo
annotation. The section
parameter is a field level parameter and is described below.
Field Level Annotations
@DRConfigFieldInfo(title = DIRECTORY, description = "The path to the source directory") public void setDirectory(String directory) { _directory = directory; } public String getDirectory() { return _directory; }
Configuration fields are defined through normal Java beans semantics. This means that by defining a get and a set method a field is defined. In the example above a field named directory
is defined. Configuration fields have a number of additional attributes that can be set through the DRConfigFieldInfo
annotation
Parameter | Description |
---|---|
title | Short human readable title. This is what is used in the workflow table heading. If it is not set, field name is used as default. |
description | Longer human readable description |
section | Which section name should be used for the field in the workflow table. If the section parameter is defined in the |
newLineAllowed | Set as true for "large" text fields where newlines should be allowed in GUI interactions |
since | To handle automatic upgrade from old versions of the configuration object, this should be specified whenever new fields are added for a new version |
level | If it should be allowed to set this field on workflow level, then the level should be set to DRConfigFieldLevel.TEMPLATE . This should be done in cases where for example configuration controls the output type of the agent. |