|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConnectionPersistence
Interface describing how to persist and retrieve connection configuration information. The MetadataDiscovery service may implement this interface and return it from ConnectionType.getConnectionPersistence(). It is strongly recommended that tool environments provide the implementation of this interface as well.
If the MetadataDiscovery service provides the non-null
ConnectionPersistence
instance, the hosting tool must use this instance when performing persistence operations for this type of
connection. In addition, if the tool provides its own persistence implementation, it
can it may also choose to also use its own implementation.
The instance of the ConnectionPersistence not necessarily have the scope of Connection Type, it may be appropriate for other connection types and is only guaranteed to be appropriate for the ConnectionType by which it was created.
Nested Class Summary | |
---|---|
static interface |
ConnectionPersistence.ConnectionSummary
Summary information for a persisted connection configuration. |
Method Summary | |
---|---|
void |
addConnectionConfiguration(ConnectionConfiguration connection,
boolean overwrite)
Add a new connection configuration to the repository represented by this ConnectionPersistence instance. |
boolean |
exists(ConnectionConfiguration configuration)
Check whether a ConnectionConfiguration matching the argument configuration already exists in the persistent storage. |
ConnectionPersistence.ConnectionSummary[] |
getConnectionSummaries(ConnectionType connectionType)
Summarize all connections configurations stored in this repository for the given connection type. |
InboundConnectionConfiguration |
getInboundConnectionConfiguration(ConnectionPersistence.ConnectionSummary summary)
Get an InboundConnectionConfiguration instance holding the persisted connection information for the connection with the given summary. |
OutboundConnectionConfiguration |
getOutboundConnectionConfiguration(ConnectionPersistence.ConnectionSummary summary)
Get an OutboundConnectionConfiguration instance holding the persisted connection information for the connection with the given summary. |
ConnectionConfiguration |
removeConnectionConfiguration(ConnectionPersistence.ConnectionSummary summary)
Remove an existing ConnectionConfiguration from the repository. |
Method Detail |
---|
void addConnectionConfiguration(ConnectionConfiguration connection, boolean overwrite) throws MetadataException
Implementations should ensure they don't store two entries of the same name for any given ConnectionType as returned by ConnectionAdvancedConfiguration.getConnectionType().
connection
- A ConnectionConfiguration to be persisted. The name field of the
configuration must be set to the non-null value for the configuration to be persisted. The connection
parameter must not be null
.overwrite
- Specifes whether to overwrite ConnectionConfiguration if it already exists in the
persitence. Can be used for concurrent access detection
MetadataException
- if an error occured during executionboolean exists(ConnectionConfiguration configuration)
configuration
- A ConnectionConfiguration which existence in thje persistent storage is being
verified. The configuration argument must not be null
true
if the configuration is present in the persistent storage, false
otherwise.ConnectionPersistence.ConnectionSummary[] getConnectionSummaries(ConnectionType connectionType) throws MetadataException
connectionType
- The type of the connection for which the configuration summaries are requested.
The connectionType must not be null.
null
.
MetadataException
- if an error occured during executionInboundConnectionConfiguration getInboundConnectionConfiguration(ConnectionPersistence.ConnectionSummary summary) throws MetadataException
summary
- The ConnectionSummary describing the connection to retrieve.
The argument must not be null
.
null
. If the connection doesn't
exist, an exception should be thrown for the summary should have been selected
from the array returned by the getConnectionSummaries
.
MetadataException
- if an error occured during executionOutboundConnectionConfiguration getOutboundConnectionConfiguration(ConnectionPersistence.ConnectionSummary summary) throws MetadataException
summary
- The ConnectionSummary describing the connection to retrieve.
The argument must not be null
.
null
. If the connection doesn't
exist, an exception should be thrown for the summary should have been selected
from the array returned by the getConnectionSummaries
.
MetadataException
- if an error occured during executionConnectionConfiguration removeConnectionConfiguration(ConnectionPersistence.ConnectionSummary summary) throws MetadataException
null
.
summary
- The information summary about connection to be removed, must not be null
.
null
if it doesn't exist.
MetadataException
- if an error occured during execution
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |