Framework Professional Edition Package


org.mbs.services.cu
Interface ControlConstants

All Known Implementing Classes:
DefaultControlUnit, DeviceControlUnit, TokenControlUnit, TokenDeviceControlUnit

public interface ControlConstants

This interface defines constants used as service registration properties and metada attribute keys in the scope of Control Unit API.
Note: The names of the properties should not be localized, only their values should be localized.


Field Summary
static java.lang.String CONSTRUCTOR_PREFIX
          Actions defined in the metadata of the control unit whose action ID starts with this prefix may be used for explicit creation of new control units.
static java.lang.String DESTRUCTOR
          An action with ID equal to the value of this constant and taking a single argument of type String should be defined in the metadata of a control unit to specify that the corresponding type of control units can be explicitly removed.
static java.lang.String EVENT_FILTER
          This service registration property may be used by the ControlUnitListeners, StateVariableListeners and HierarchyListeners to specify the events they are interested in.
static java.lang.String EVENT_SYNC
          This service registration property may be used by the ControlUnitListeners, StateVariableListeners and HierarchyListeners to specify they whish to be receive events synchronosly.
static java.lang.String EVENT_TYPE
          This service registration property may be used by ControlUnitListeners and HierarchyListeners as attribute in their filter definition to narrow the type of events they wish to receive.
static java.lang.String FINDER_PREFIX
          Actions defined in the metadata of the control unit whose action ID starts with this prefix may be used for searching the control units.
static java.lang.String ID
          The ID property uniquely identifies a control unit instance in the scope of its TYPE.
static java.lang.String PARENT_ID
          Property specifying the id of a parent control unit.
static java.lang.String PARENT_ROOT
          Control unit types may decalre parent of this type and thus, to announce they are root types.
static java.lang.String PARENT_TYPE
          Property specifying the type of the parent control unit.
static java.lang.String STATE_VARIABLE_ID
          This property may be used in the event filters of StateVariableListeners to specify the state variables which the listeners are interested in.
static java.lang.String SV_LIST_SV_ID
          Control units must have state variable with ID equal to this constant, which value should be a string array containing the IDs of all other control unit's state variables.
static java.lang.String TYPE
          The TYPE of a control unit specifies its type.
static java.lang.String VERSION
          The VERSION of a control unit specifies the version of its type.
 

Field Detail

VERSION

static final java.lang.String VERSION
The VERSION of a control unit specifies the version of its type.

The value of this constant is "mbs.control.version".

See Also:
ObjectClassDefinition.getID(), Constant Field Values

TYPE

static final java.lang.String TYPE
The TYPE of a control unit specifies its type. There may be many control unit with the same type. All control unit of one type have a same set of state variable ids and a same set of supported actions specified by the ObjectClassDefinition with the same id.

The value of this constant is "mbs.control.type".

See Also:
ObjectClassDefinition.getID(), Constant Field Values

ID

static final java.lang.String ID
The ID property uniquely identifies a control unit instance in the scope of its TYPE. Therefore a control unit is uniquely identified in the scope of the framework by the pair (TYPE, ID).

The value of this constant is "mbs.control.id".

See Also:
Constant Field Values

PARENT_ID

static final java.lang.String PARENT_ID
Property specifying the id of a parent control unit.

The value of this constant is "mbs.control.parent.id".

See Also:
Constant Field Values

PARENT_TYPE

static final java.lang.String PARENT_TYPE
Property specifying the type of the parent control unit.

The value of this constant is "mbs.control.parent.type".

See Also:
Constant Field Values

PARENT_ROOT

static final java.lang.String PARENT_ROOT
Control unit types may decalre parent of this type and thus, to announce they are root types. In case the control unit type needs to be a root type only, then it may just skip the parent-types section in its metatype definition. This property is usefull when the control unit type needs to be a root type and sub type of other cu type simultaneously. In this case the metatype definition should contain enumration of all parent types, including this rpoperty to denote this is a root type as well.

The value of this constant is "mbs.control.parent.root".

See Also:
Constant Field Values

CONSTRUCTOR_PREFIX

static final java.lang.String CONSTRUCTOR_PREFIX
Actions defined in the metadata of the control unit whose action ID starts with this prefix may be used for explicit creation of new control units.
These actions are called constructors and their action ID must be supplied as argument to the ControlUnitAdmin.createControlUnit or ControlUnitFactory.createControlUnit methods. A control unit type may have arbitrary number of constructors.

The value of this constant is "$create.".

See Also:
Constant Field Values

DESTRUCTOR

static final java.lang.String DESTRUCTOR
An action with ID equal to the value of this constant and taking a single argument of type String should be defined in the metadata of a control unit to specify that the corresponding type of control units can be explicitly removed.
This action is called destructor. It takes as single argument the ID of the control unit to be destroyed and its responsibility is to remove the control unit from the framework and to free the resources used by it. A control unit type may have one or zero destructor.
The destructor may be invoked through the ControlUnitAdmin.destroyControlUnit or ControlUnitFactory.destroyControlUnit methods.

The value of this constant is "$destroy".

See Also:
Constant Field Values

FINDER_PREFIX

static final java.lang.String FINDER_PREFIX
Actions defined in the metadata of the control unit whose action ID starts with this prefix may be used for searching the control units.

These actions are called finders and their action ID must be supplied as argument to the ControlUnitAdmin.findControlUnits or ControlUnitFactory.findControlUnits methods. A control unit type may have arbitrary number of finders.

The value of this constant is "$find.".

See Also:
Constant Field Values

EVENT_FILTER

static final java.lang.String EVENT_FILTER
This service registration property may be used by the ControlUnitListeners, StateVariableListeners and HierarchyListeners to specify the events they are interested in.

The value of this constant is "mbs.control.event.filter".

See Also:
Constant Field Values

EVENT_SYNC

static final java.lang.String EVENT_SYNC
This service registration property may be used by the ControlUnitListeners, StateVariableListeners and HierarchyListeners to specify they whish to be receive events synchronosly. The value of the property doesn't matter - if it's present events will be delivered synchronously to the corresponding listener. Otherwise events are delivered asynchronously.

The value of this constant is "mbs.control.event.sync".

See Also:
Constant Field Values

EVENT_TYPE

static final java.lang.String EVENT_TYPE
This service registration property may be used by ControlUnitListeners and HierarchyListeners as attribute in their filter definition to narrow the type of events they wish to receive. It's value must be a string representation of one of the possible values for the eventType parameter of ControlUnitListener.controlUnitEvent for ControlUnitListeners or HierarchyListener.hierarchyChanged for HierarchyListeners. If the filter doesn't restrict the event types to be received the listener will receive all events mathing the control unit filtering criterion.

The value of this constant is "mbs.control.event.type".

See Also:
Constant Field Values

STATE_VARIABLE_ID

static final java.lang.String STATE_VARIABLE_ID
This property may be used in the event filters of StateVariableListeners to specify the state variables which the listeners are interested in.

The value of this constant is "mbs.control.var.id".

See Also:
Constant Field Values

SV_LIST_SV_ID

static final java.lang.String SV_LIST_SV_ID
Control units must have state variable with ID equal to this constant, which value should be a string array containing the IDs of all other control unit's state variables.

The ControlUnitAdmin uses the state variable with this ID when it has to send initial state variables values to StateVariableListeners, which have registered with the StateVariableListener.RECEIVE_VALUES_ON_REGISTER service registration property.
The value of this constant is "mbs.control.var.list_sv".

See Also:
Constant Field Values

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved