com.ibm.di.fc.itregistry
Class InitITRegistryFC

java.lang.Object
  extended by com.ibm.di.fc.Function
      extended by com.ibm.di.fc.itregistry.InitITRegistryFC
All Implemented Interfaces:
FunctionInterface, VersionInfoInterface

public class InitITRegistryFC
extends Function

This Component initializes a connection to the IT registry and registers a Management Software System(MSS) in the IT registry database. It also returns the GUID with which MSS has got registered wrapped as a ConfigurationItemId, thus preventing the user to see its content, but allowing its usage by the other IT registry Components.


Field Summary
 
Fields inherited from class com.ibm.di.fc.Function
logger
 
Constructor Summary
InitITRegistryFC()
           
 
Method Summary
 String checkDbConnection()
          Checks if with the currently configured properties, a connection to the IT registry database can be established.
 String getCdmVersion()
          Returns the version of the CDM that this component is using.
 String getDbUsername()
          This method returns the username for connecting to the UT registry database 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.
 String getVersion()
          Version information.
 void initialize(Object obj)
          Called once to initialize the Function Component.
 Object perform(Object obj)
          The FC receives the information about MSS data either from the configuration panel or from its Output Map and registers the MSS in the IT registry.
 Object querySchema(Object input)
          This method displays the attributes belonging to the MSS class.
 void terminate()
          This method frees any resources allocated by the Component.
 
Methods inherited from class com.ibm.di.fc.Function
debug, getConfiguration, getContext, getDebug, getLog, getParam, getRSInterface, getUI, initialize, logmsg, setConfiguration, setContext, setDebug, setLog, setParam, setRSInterface, updateSchema, verifyInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitITRegistryFC

public InitITRegistryFC()
Method Detail

initialize

public void initialize(Object obj)
                throws Exception
Called once to initialize the Function Component.

Specified by:
initialize in interface FunctionInterface
Overrides:
initialize in class Function
Parameters:
obj - ignored.
Throws:
Exception - if an error occurs.

perform

public Object perform(Object obj)
               throws Exception
The FC receives the information about MSS data either from the configuration panel or from its Output Map and registers the MSS in the IT registry. Also it opens a IT registry book and fill the registration information in an IT registry Book and shares it statically.

Parameters:
obj - the work entry passed to the FC.
Returns:
an empty Entry object.
Throws:
Exception - if a problem occurs.

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 UT registry database used by the Connector.

Returns:
a database username.

querySchema

public Object querySchema(Object input)
                   throws Exception
This method displays the attributes belonging to the MSS class. For a source of this meta-data it uses either a local jar file or meta-data calls to an IT registry system (depending on its configuration).

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

getVersion

public String getVersion()
Version information.

Returns:
version information

terminate

public void terminate()
               throws Exception
This method frees any resources allocated by the Component.

Specified by:
terminate in interface FunctionInterface
Overrides:
terminate in class Function
Throws:
Exception - an exception is thrown if this method fails

checkDbConnection

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

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

getCdmVersion

public String getCdmVersion()
                     throws Exception
Returns the version of the CDM that this component is using. depending on its configuration this can be either the version of CDM that the 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.