com.ibm.di.connector
Class IdMLConnector

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.IdMLConnector
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface

public class IdMLConnector
extends Connector
implements ConnectorInterface

This Connector is used for adding Configuration Items(CIs)/ Relationships to an IdML book.


Field Summary
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
IdMLConnector()
          Constructor.
 
Method Summary
 String checkDbConnection()
          Checks if with the currently configured IT registry properties, a connection to the IT registry can be established.
 String getCdmVersion()
          Returns the version of the CDM that this Connector is using.
 String getDbUsername()
          This method returns the username for connecting to the IT registry used by the Connector.
 String getJdbcDriver()
          This method returns the JDBC Driver used by the Connector.
 String getJdbcUrl()
          This method returns the JDBC Url used by the Connector.
 Map<String,Object> getTypes()
          Returns the types of CIs/Relationships available for this Connector.
 String getVersion()
          Version information.
 void initialize(Object obj)
          Initialize the connector.
 Entry queryReply(Entry aEntry)
          Adds the CI/Relationship to the IdML book.
 Object querySchema(Object input)
          This method displays the attributes supported by a chosen CI/Relationship.
 String resetBook()
          Returns the current contents of the in-memory IdML book and emties the buffer.
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextEntry, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, selectEntries, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminate, terminateServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextEntry, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, reconnect, registerScriptBeans, replyEntry, selectEntries, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer
 

Constructor Detail

IdMLConnector

public IdMLConnector()
Constructor. Initializes the connector to work in CallReply mode.

Method Detail

initialize

public void initialize(Object obj)
                throws Exception
Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
obj - User provided parameter
Throws:
Exception - if the initialization of this connector fails.

queryReply

public Entry queryReply(Entry aEntry)
                 throws Exception
Adds the CI/Relationship to the IdML book. The Connector first checks if any of its primary parameters are not overridden.

Specified by:
queryReply in interface ConnectorInterface
Overrides:
queryReply in class Connector
Parameters:
aEntry - the work entry passed to the Connector.
Returns:
an Entry object that can contain the id of the CI/Relationship registered by the Connector.
Throws:
Exception - if a problem occurs.

querySchema

public Object querySchema(Object input)
                   throws Exception
This method displays the attributes supported by a chosen CI/Relationship. For a source of this meta-data it uses either a local jar file or meta-data calls to an IT registry (depending on its configuration).

Specified by:
querySchema in interface ConnectorInterface
Overrides:
querySchema in class Connector
Parameters:
input - entry object
Returns:
null, since this Components has itself populated the Schemas.
Throws:
Exception - if a problem occurs.
See Also:
Entry, Vector

getVersion

public String getVersion()
Version information.

Specified by:
getVersion in interface VersionInfoInterface
Returns:
version information

getJdbcUrl

public String getJdbcUrl()
This method returns the JDBC Url used by the Connector.

Returns:
a JDBC Url.

getJdbcDriver

public String getJdbcDriver()
This method returns the JDBC Driver used by the Connector.

Returns:
a JDBC Driver.

getDbUsername

public String getDbUsername()
This method returns the username for connecting to the IT registry used by the Connector.

Returns:
a database username.

checkDbConnection

public String checkDbConnection()
Checks if with the currently configured IT registry properties, a connection to the IT registry can be established.

Returns:
if the connection was established successfully null is returned, otherwise the method returns a String containing the exception's text.

getCdmVersion

public String getCdmVersion()
                     throws Exception
Returns the version of the CDM that this Connector is using. depending on its configuration this can be either the version of CDM that IT registry is using or the version of the CDM meta-data stored in the locally used jar file.

Returns:
the CDM version, with format '<version>.<release>.<modifier>'.
Throws:
Exception - if a problem occurs.

getTypes

public Map<String,Object> getTypes()
                            throws Exception
Returns the types of CIs/Relationships available for this Connector. Depending on its Configuration we can get the names of all supported CIs, or of all Relationships.

Returns:
a List with all CI/Relationship types.
Throws:
Exception - if a problem occurs.

resetBook

public String resetBook()
                 throws IOException
Returns the current contents of the in-memory IdML book and emties the buffer.

Returns:
the current contents of the in-memory book.
Throws:
IOException - if a problem occurs.