Skip navigation links

Interface Configuration

All Known Implementing Classes:

public interface Configuration

Encapsulates the configuration of a connector. The configuration includes every property that a caller MUST specify in order to use the connector, as well as every property that a caller MAY specify in order to affect the behavior of the connector overall (as opposed to operation options, which affect only a specific invocation of a specific operation). Required configuration parameters ConfigurationProperty.required() generally include the information required to connect to a target instance--such as a URL, username and password. Optional configuration parameters often specify preferences as to how the connector-bundle should behave.

A class that implements this interface should be a Java bean that exposes for each configuration property a getter method and a setter method. The class must have a default constructor. All bean properties are considered configuration for the connector. The initial value of the property getter method is considered the default value of the property. The types of the bean properties can be only:

and multi-dimensional arrays thereof. The bean properties are not required by default, but a property can be marked as required through use of the ConfigurationProperty annotation.

Each bean property corresponds to two keys in a properties file named Messages in the same package as the implementing class: ${property}.display and ${property}.help. For example, and hostname.display would be the keys corresponding to a hostname property. The display message is the display name of the property and can be used to display the property in a view. The help message holds the description of the property. The names of the two keys can be overridden through the ConfigurationProperty annotation.

Method Summary
 ConnectorMessages getConnectorMessages()
          Should return the message catalog that is set by setConnectorMessages(ConnectorMessages).
 void setConnectorMessages(ConnectorMessages messages)
          Sets the message catalog instance that allows the Connector to localize messages.
 void validate()
          Determines if the configuration is valid.


Method Detail


void validate()
Determines if the configuration is valid.

A valid configuration is one that is ready to be used by the connector: it is complete (all the required properties have been given values) and the property values are well-formed (are in the expected range, have the expected format, etc.)

Implementations of this method should not connect to the resource in an attempt to validate the configuration. For example, implementations should not attempt to check that a host of the specified name exists by making a connection to it. Such checks can be performed in the implementation of the TestOp.test() method.

java.lang.RuntimeException - iff the configuration is not valid. Implementations are encouraged to throw the most specific exception available. When no specific exception is available, implementations can throw ConfigurationException.


ConnectorMessages getConnectorMessages()
Should return the message catalog that is set by setConnectorMessages(ConnectorMessages).
the ConnectorMessages instance.


void setConnectorMessages(ConnectorMessages messages)
Sets the message catalog instance that allows the Connector to localize messages. This method is called before any bean property setter, the validate() method or the getConnectorMessages() method.
messages - the message catalog.

Skip navigation links

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.