Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.connecterra.ale.dynamicconfig.api
Interface PluginParameterMeta

    public interface PluginParameterMeta

Describes a configuration parameter of a plugin. A parameter represented by PluginParameterMeta has the following attributes:

- Key name that uniquely identifies the parameter from its siblings
- Display name
- Type of the parameter
- Short description
- Boolean indicating if this parameter may have multiple values.
- Boolean indicating whether it is a required parameter or not
- Default value that will be used if the user does not explicitly specify a value
- Parameter constraint to further constrain parameter values

A PluginParameterMeta may represent a group of parameters. For example, all configuration parameters for a subdevice may be grouped together. In this case, the PluginParameterMeta representing the parameter group will have child parameters, each of which will represent one configuration parameter of the subdevice.

Complex parameters like tables are also supported by PluginParameterMeta. This is treated as a separate group from the child parameters and have separate accessor methods.

Nested Class Summary
`static interface` | `PluginParameterMeta.Type` Supported parameter types.

Method Summary
`void` | `addChildParameterMeta(PluginParameterMeta parameterMeta)` Adds a parameter to this parameter's child parameter list.
`PluginParameterMeta` | `getChildParameterMeta(String keyName)` Finds and returns the child parameter with the given key.
`List` | `getChildParameterMetaList()` Returns the child parameters as a list of `PluginParameterMeta`.
`Object` | `getDefaultParameterValue()` Returns the default value for this parameter.
`String` | `getDescription()` Returns a short description of the parameter.
`String` | `getDisplayName()` Returns the display name of this parameter.
`String` | `getKeyName()` Returns the unique key name that identifies this parameter from its siblings.
`PluginParameterConstraint` | `getParameterConstraint()` Returns `PluginParameterConstraint` for additional constraints, if any, on the parameter.
`PluginParameterMeta` | `getTableColumnParameterMeta(String keyName)` Finds and returns the table column parameter with the given key name.
`List` | `getTableColumnParameterMetaList()` Returns list of parameter metas for the columns of the table that this parameter could contain.
`String` | `getType()` Returns the `PluginParameterMeta.Type` identifying the data type of the parameter.
`boolean` | `hasMultipleValues()` Returns true is this parameter may have multiple values, false otherwise.
`boolean` | `isRequired()` Returns true if this is a required parameter, false otherwise.
`void` | `setChildParameterMetaList(List parameterMetaList)` Sets the child parameters of this parameter.
`void` | `setDefaultParameterValue(Object value)` Specifies the default value for this parameter.
`void` | `setDescription(String description)` Specifies a short description for the parameter.
`void` | `setHasMultipleValues(boolean hasMultiple)` Specifies whether this parameter may have multiple values.
`void` | `setParameterConstraint(PluginParameterConstraint parameterConstraint)` Specifies additional constraints on values of this parameter through a `PluginParameterConstraint`.
`void` | `setRequired(boolean required)` Specifies if this is a required or optional parameter.
`void` | `setTableColumnParameterMetaList(List columnMetas)` Sets the column parameter metas for the table that this parameter could contain.
`void` | `validate(StringBuffer buffer, PluginConfigParameter configParameter)` Validates a `PluginConfigParameter` containing a value for this parameter.

Method Detail

### getKeyName

    String getKeyName()

  Returns the unique key name that identifies this parameter from its siblings.

  Returns:
    unique key name of this parameter

### getDisplayName

    String getDisplayName()

  Returns the display name of this parameter. This is typically an internationalized value.

  Returns:
    the display name of this parameter

### getType

    String getType()

  Returns the `PluginParameterMeta.Type` identifying the data type of the parameter.

  Returns:
    the `PluginParameterMeta.Type` of the parameter

### getDescription

    String getDescription()

  Returns a short description of the parameter. This may be used to provide more information to users; for example, as tooltips in GUIs.

  Returns:
    a short description of the parameter

### setDescription

    void setDescription(String description)

  Specifies a short description for the parameter. This should be an internationalized string. This may be used to provide more information to users; for example, as tooltips in GUIs.

  Parameters:
    `description` - a short description of the parameter

### isRequired

    boolean isRequired()

  Returns true if this is a required parameter, false otherwise.

  Returns:
    true if this is a required parameter, false otherwise

### setRequired

    void setRequired(boolean required)

  Specifies if this is a required or optional parameter.

  Parameters:
    `required` - boolean indicating if this is a required parameter. Pass in true if this is a required parameter, false otherwise.

### hasMultipleValues

    boolean hasMultipleValues()

  Returns true is this parameter may have multiple values, false otherwise.

  Returns:
    True is this parameter may have multiple values, false otherwise

### setHasMultipleValues

    void setHasMultipleValues(boolean hasMultiple)

  Specifies whether this parameter may have multiple values.

  Parameters:
    `hasMultiple` - boolean indicating if this parameter may have multiple values. Pass in true if this parameter could have multiple values. False if this parameter must have only one value.

### getDefaultParameterValue

    Object getDefaultParameterValue()

  Returns the default value for this parameter. This value will be used if no value is explicitly specified for the parameter.

  Returns:
    the default parameter value, or null if there is no default

### setDefaultParameterValue

    void setDefaultParameterValue(Object value)

  Specifies the default value for this parameter. This value will be used if no value is explicitly specified for the parameter.

  Parameters:
    `value` - the default value

### getParameterConstraint

    PluginParameterConstraint getParameterConstraint()

  Returns `PluginParameterConstraint` for additional constraints, if any, on the parameter. This returns null if the parameter has no additional constraints.

  Numeric value must be in a given range is an example of a constraint that may be enforced by `PluginParameterConstraint`.

  Returns:
    `PluginParameterConstraint` representing additional constraints, if any, on the parameter

### setParameterConstraint

    void setParameterConstraint(PluginParameterConstraint parameterConstraint)

  Specifies additional constraints on values of this parameter through a `PluginParameterConstraint`.

  Parameters:
    `parameterConstraint` - `PluginParameterConstraint` that enforces additional constraints on values of this parameter

### getChildParameterMetaList

    List getChildParameterMetaList()

  Returns the child parameters as a list of `PluginParameterMeta`. Returns empty list of this parameter does not have any children.

  A parameter will have child parameters if it represents a parameter group.

  Returns:
    the child parameters as a list of `PluginParameterMeta`. Returns empty list of this parameter does not have any children.

### setChildParameterMetaList

    void setChildParameterMetaList(List parameterMetaList)

  Sets the child parameters of this parameter. A parameter will have child parameters if it represents a parameter group.

  Parameters:
    `parameterMetaList` - list of `PluginParameterMeta` for the child parameters

### addChildParameterMeta

    void addChildParameterMeta(PluginParameterMeta parameterMeta)

  Adds a parameter to this parameter's child parameter list. The parameter will be added at the end of the list.

  Parameters:
    `parameterMeta` - the new child parameter that is to be added to this parameter's child list

### getChildParameterMeta

    PluginParameterMeta getChildParameterMeta(String keyName)
                                              throws NoSuchNameException

  Finds and returns the child parameter with the given key. This method only looks at the PluginParameterMetas that are direct children of this PluginParameterMeta; it will not match the given key with the key names of the descendants that are not direct children of this PluginConfig.

  Parameters:
    `keyName` - the key name of the child parameter that is to be found
  Returns:
    the child parameter with the given key
  Throws:
    `NoSuchNameException` - if this parameter does not have a child parameter with the given key

### getTableColumnParameterMetaList

    List getTableColumnParameterMetaList()

  Returns list of parameter metas for the columns of the table that this parameter could contain.

  Returns:
    list of parameter metas for the columns of the table that this parameter could contain. Returns an empty list if this parameter cannot contain a table.

### getTableColumnParameterMeta

    PluginParameterMeta getTableColumnParameterMeta(String keyName)
                                                    throws NoSuchNameException

  Finds and returns the table column parameter with the given key name.

  Parameters:
    `keyName` - the key name of the column parameter that is to be found
  Returns:
    the column parameter with the given name
  Throws:
    `NoSuchNameException` - if this parameter does not have a table column with the given name

### setTableColumnParameterMetaList

    void setTableColumnParameterMetaList(List columnMetas)

  Sets the column parameter metas for the table that this parameter could contain.

  Parameters:
    `columnMetas` - list of PluginParameterMeta for the table columns
  Throws:
    `IllegalArgumentException` - if any types disallowed for table columns are used. Only string and numeric types are allowed currently

### validate

    void validate(StringBuffer buffer,
                  PluginConfigParameter configParameter)

  Validates a `PluginConfigParameter` containing a value for this parameter. This will validate the value specified for this parameter based on required and has-multiple attributes as well as using any parameter constraints specified. This will also recurse through all its children parameters and table parameters to validate that the values specified on those are valid as well.

  Parameters:
    `buffer` - Validation error messages, if any, will be appended in to this string buffer.
    `configParameter` - the `PluginConfigParameter` containing the value for this parameter

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD