|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.dpa.DeployedAssetsConnector
public class DeployedAssetsConnector
| Field Summary |
|---|
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Constructor Summary | |
|---|---|
DeployedAssetsConnector()
Constructor which populates the modes supported by the Connector. |
|
| Method Summary | |
|---|---|
java.lang.String |
checkDbConnection()
Checks if with the currently configured properties, a connection to the Maximo database can be established. |
void |
deleteEntry(Entry entry,
SearchCriteria search)
Deletes an existing entry. |
Entry |
findEntry(SearchCriteria criteria)
Finds an existing entry. |
java.lang.String |
getDbUsername()
Returns the username for connection to the Maximo database. |
java.lang.String |
getJdbcDriver()
Returns the JDBC driver for connection to the Maximo database. |
java.lang.String |
getJdbcUrl()
Returns the JDBC URL for connection to the Maximo database. |
java.lang.String |
getMode()
Returns the Connector mode. |
Entry |
getNextEntry()
This method returns a single entry object for a deployed asset searched as per criteria. |
java.lang.String |
getVersion()
Version information. |
void |
initialize(java.lang.Object entry)
This standard method initializes the Connector with values present in its Configuration panel. |
boolean |
isAddOnlyMode()
Checks if the Connector is in AddOnly mode. |
void |
putEntry(Entry entry)
Adds a new entry to the data source |
java.lang.Object |
querySchema(java.lang.Object arg0)
This method populates Output Map for CallReply mode and Input Map for Iterator\Lookup mode. |
void |
selectEntries()
This is preparation method for Iterator mode. |
void |
terminate()
This method will close Connection to the Maximo database. |
| 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 |
|---|
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, queryReply, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
| Constructor Detail |
|---|
public DeployedAssetsConnector()
| Method Detail |
|---|
public java.lang.String getVersion()
getVersion in interface VersionInfoInterfacepublic java.lang.String getDbUsername()
public java.lang.String getJdbcDriver()
public java.lang.String getJdbcUrl()
public java.lang.String getMode()
public boolean isAddOnlyMode()
public void initialize(java.lang.Object entry)
throws java.lang.Exception
PROPERTIES_FILE file.
initialize in interface ConnectorInterfaceinitialize in class Connectorentry - an initial entry provided to the Connector.
java.lang.Exception - if a problem occurs.
public java.lang.Object querySchema(java.lang.Object arg0)
throws java.lang.Exception
querySchema in interface ConnectorInterfacequerySchema in class Connectorarg0 - an object parameter not used by this method.
null, since the Connector handles the schema
population on its own.
java.lang.Exception - if a problem occurs.Entry,
Vector
public void terminate()
throws java.lang.Exception
terminate in interface ConnectorInterfaceterminate in class Connectorjava.lang.Exception - if a problem occur.public java.lang.String checkDbConnection()
java.io.IOException - if a problem occurs.
public void selectEntries()
throws java.lang.Exception
selectEntries in interface ConnectorInterfaceselectEntries in class Connectorjava.lang.Exception - if a problem occurs.
public Entry getNextEntry()
throws java.lang.Exception
getNextEntry in interface ConnectorInterfacegetNextEntry in class Connectorjava.lang.Exception - if an error occurs.ConnectorInterface.selectEntries()
public Entry findEntry(SearchCriteria criteria)
throws java.lang.Exception
Here is an example of how to find all people with names starting with 'J' which are from IBM organization in US.
Example:
var ctor = input.getConnector();
var crit = new com.ibm.di.SearchCriteria("$dn",
com.ibm.di.SearchCriteria.SUBSTRING, "c=US,o=IBM");
crit.addCriteria("name", com.ibm.di.SearchCriteria.INITIAL_STRING, "J");
crit.addCriteria("objectclass", com.ibm.di.SearchCriteria.SUBSTRING, "person");
var res = ctor.findEntry(crit);
if (res != null) {
main.logmsg("Found entry:");
main.dumpEntry(res);
} else {
if( getFindEntryCount()> 1 ){
main.logmsg("Found these entries:");
while ( (entry = ctor.getNextFindEntry()) != null ) {
main.dumpEntry(entry);
}
}
else {
main.logmsg("Entry not found!");
}
}
findEntry in interface ConnectorInterfacefindEntry in class Connectorcriteria - The search criteria used to locate the entry to be modified
java.lang.Exception - if an error occurs.
public void deleteEntry(Entry entry,
SearchCriteria search)
throws java.lang.Exception
deleteEntry in interface ConnectorInterfacedeleteEntry in class Connectorentry - The entry datasearch - The search criteria used to locate the entry to be deleted
java.lang.Exception - if an error occurs.
public void putEntry(Entry entry)
throws java.lang.Exception
Example:
var ctor = write.getConnector();
for (i = 0; i < 10; i++) {
var entry = system.newEntry();
entry.setAttribute("linenumber", i);
entry.setAttribute("line", i + " line of text...");
main.logmsg("Writes entry to output...");
main.dumpEntry(entry);
ctor.putEntry(entry);
}
putEntry in interface ConnectorInterfaceputEntry in class Connectorentry - The entry data to add
java.lang.Exception - if an error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||