Attribute Definitions

An attribute is a variable that contains specific information used to control the target system. Attributes are often (but not necessarily) visible in the user interface. The value of an attribute can be any Java primitive type, a list of strings, or a map of strings.

[TODO: Check if this is still correct] If stdout and stderr from a scheduled job is to be delivered to the client, the attributes stdout_remote_path and stderr_remote_path should be included in the resource manager attribute set. Similarly, the native designation for the selected queue, if used, should be linked to control.queue.name.

Attribute

Attribute Map

Each target system configuration constructs an "attribute map" which contains all the attributes known by the system. Attributes are either defined in the configuration file or are created dynamically as the result of processing the output from commands. Other configuration elements reference attributes by obtaining a string representation of attribute fields using the Eclipse variable resolver syntax: ${ptp_rm:name#element} where name is the name of the attribute and element is the name of an attribute element (see further below on the specific elements for attributes.)

All attributes defined in the configuration are included in the map. The following pre-defined attributes are also added at runtime:

control.user.name
control.address
control.working.dir
executablePath
progArgs
directory

In addition, the following attributes may be linked (see below) to other attributes to provide an implementation-independent mechanism for referencing the queue and for any remote output files produced in connection with the job submission.

control.queue.name
stdout_remote_path
stderr_remote_path

Attribute Properties

The following properties are available when defining new attributes:

Property Description Default
name Used to specify the name of an attribute. This name can then be used to look up the values of the attribute's elements. none
type Specifies the type of the attribute value. The type is primarily used by the user interface elements to determine how values are to be input. Values can always be accessed as strings regardless of their type. String
visible Indicates that the user will not be directly changing the value of the attribute via the user interface. Certain widgets (such as the attribute viewer ) check this to see if the attribute should be included automatically in its list.
Always mark attributes which are the targets of attribute (see below) as visible="true"; if this value is false, the attribute will always be passed to the configuration/environment of the resource manager; selection/exclusion of sets of attributes pertains only to those marked visible.
true
status An optional property for capturing the validity of the attribute at runtime or for a particular installation, if such information is made available by the system. true
readOnly Used to mark the attribute as read-only. The value of a read-only attribute will always remain the default value. true
translateBooleanAs Can be applied to boolean values which should be represented as strings rather than "true" and "false". A comma-delimited pair is used to indicate the string equivalent to the boolean value. e.g., "YES,NO" would mean true yields the string "YES" and false the string "NO". null
min and max Used to give the upper and lower bounds for integer attributes. UI elements such as the spinner widget will use this information. null

Attribute Elements

Attributes are structured objects that carry more information than just a value. This information is specified using elements in the XML specification. Elements can be accessed using the Eclipse variable syntax described in the Attribute Map section.

Element Description
description Provides a brief one-sentence definition of the attribute. This information is displayed by the user interface.
tooltip Provides a string that will be displayed when the mouse hovers over the attribute in the user interface.
choice Provides a predetermined, fixed set of values to choose from. These are specified as a comma-delimited string and will appear as the items of a combo-box.
items-from Links the combo items specified in a choice element to another attribute value (whose type must be java.util.Collection).
default Specifies a default value for the attribute. Default values must be primitive types. If no default value is specified, then the value of the attribute will be null.
value Represents the current value of the attribute. Only used to fetch the value of an attribute.
link-value-to If provided, the attribute gets its value from the attribute specified, unless that attribute has an undefined (empty) value. In this case, any default defined on the present attribute will be used. This feature is primarily intended for defining dependent attributes whose values are not directly modified by the user.
validator Specifies a validator for the attribute. Used to enforce semantics of the attribute value.

Validators

Attributes carry optional validators which allow you to enforce syntactic rules, numerical ranges (each with one or both boundaries; these are OR'd) or file-system semantics on the value when the user enters text.

Validator

The validator makes use of the regex type (also used in the parser or tokenizer; see below), along with a special file-match type. A regex can be used to match by setting the expression property. To split the segment into tokens on the basis of the expression, set the split property to true (this applies only to the match type discussed below). The expression should follow the grammar in java.util.regex ; the flags are those made available in the java.util.regex.Pattern class (consult the Javadoc for explanations):

These can be OR'd in the usual manner. NOTE: when using the regex on the match type, the expression can contain variable references to be resolved in the environment.

The file-match type specifies the attributes pertaining to org.eclipse.core.filesystem.IFileInfo. The efsAttributes property is an OR'd string of the EFS constants:

The lastModifiedBefore and lastModifiedAfter properties are specified using the format yyyy/MM/dd HH:mm:ss.