Package com.ibm.di.connector
Class IdMLConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- 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
Constructors Constructor Description IdMLConnector()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
checkDbConnection()
Checks if with the currently configured IT registry properties, a connection to the IT registry can be established.java.lang.String
getCdmVersion()
Returns the version of the CDM that this Connector is using.java.lang.String
getDbUsername()
This method returns the username for connecting to the IT registry used by the Connector.java.lang.String
getJdbcDriver()
This method returns the JDBC Driver used by the Connector.java.lang.String
getJdbcUrl()
This method returns the JDBC Url used by the Connector.java.util.Map<java.lang.String,java.lang.Object>
getTypes()
Returns the types of CIs/Relationships available for this Connector.java.lang.String
getVersion()
Version information.void
initialize(java.lang.Object obj)
Initialize the connector.Entry
queryReply(Entry aEntry)
Adds the CI/Relationship to the IdML book.java.lang.Object
querySchema(java.lang.Object input)
This method displays the attributes supported by a chosen CI/Relationship.java.lang.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, extractExceptionInformation, 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
-
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object obj) throws java.lang.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 interfaceConnectorInterface
- Overrides:
initialize
in classConnector
- Parameters:
obj
- User provided parameter- Throws:
java.lang.Exception
- if the initialization of this connector fails.
-
queryReply
public Entry queryReply(Entry aEntry) throws java.lang.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 interfaceConnectorInterface
- Overrides:
queryReply
in classConnector
- 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:
java.lang.Exception
- if a problem occurs.
-
querySchema
public java.lang.Object querySchema(java.lang.Object input) throws java.lang.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 interfaceConnectorInterface
- Overrides:
querySchema
in classConnector
- Parameters:
input
- entry object- Returns:
- null, since this Components has itself populated the Schemas.
- Throws:
java.lang.Exception
- if a problem occurs.- See Also:
Entry
,Vector
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Returns:
- version information
-
getJdbcUrl
public java.lang.String getJdbcUrl()
This method returns the JDBC Url used by the Connector.- Returns:
- a JDBC Url.
-
getJdbcDriver
public java.lang.String getJdbcDriver()
This method returns the JDBC Driver used by the Connector.- Returns:
- a JDBC Driver.
-
getDbUsername
public java.lang.String getDbUsername()
This method returns the username for connecting to the IT registry used by the Connector.- Returns:
- a database username.
-
checkDbConnection
public java.lang.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 java.lang.String getCdmVersion() throws java.lang.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:
java.lang.Exception
- if a problem occurs.
-
getTypes
public java.util.Map<java.lang.String,java.lang.Object> getTypes() throws java.lang.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:
java.lang.Exception
- if a problem occurs.
-
resetBook
public java.lang.String resetBook() throws java.io.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:
java.io.IOException
- if a problem occurs.
-
-