|
|||||||||||
| 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.maximo.core.SimpleTpaeIFConnector
com.ibm.di.connector.maximo.TpaeIFConnector
public class TpaeIFConnector
Tpae IF Connector is able to work with hierarchical entries and is based on the SimpleTpaeIFConnector.
| Field Summary |
|---|
| Fields inherited from class com.ibm.di.connector.maximo.core.SimpleTpaeIFConnector |
|---|
cfg, connIterator, connLookup, proxyLog |
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Constructor Summary | |
|---|---|
TpaeIFConnector()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
deleteEntry(Entry entry,
SearchCriteria sc)
Deletes an existing entry. |
Entry |
findEntry(SearchCriteria searchCriteria)
Finds an existing entry. |
Entry |
getNextEntry()
Returns the next Entry from the connector. |
java.lang.String |
getVersion()
Version information. |
void |
initialize(java.lang.Object obj)
Initialize the connector. |
void |
modEntry(Entry newEntry,
SearchCriteria searchCriteria,
Entry oldEntry)
Modifies an existing entry. |
void |
putEntry(Entry newEntry)
Adds a new entry to the data source |
java.lang.Object |
querySchema(java.lang.Object obj)
This method populates the input/output map of the connector with the hierarchical schema of the specified Object structure. |
void |
selectEntries()
Prepare the Connector for sequential read. |
void |
setConfiguration(java.lang.Object config)
This method makes sure that InternalSchema.CONNECTOR_COMPUTE_CHANGES is set to
false since compute changes logic is not supported for
hierarchical entries yet. |
| Methods inherited from class com.ibm.di.connector.maximo.core.SimpleTpaeIFConnector |
|---|
clearSchemaCache, extractExceptionInformation, extractMaximoException, getFc, getMboList, getResHash, setParam, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TpaeIFConnector()
| Method Detail |
|---|
public void setConfiguration(java.lang.Object config)
InternalSchema.CONNECTOR_COMPUTE_CHANGES is set to
false since compute changes logic is not supported for
hierarchical entries yet.
setConfiguration in interface ConnectorInterfacesetConfiguration in class Connectorconfig - The configuration object (an instance of ConnectorConfig)
public void initialize(java.lang.Object obj)
throws java.lang.Exception
initialize in interface ConnectorInterfaceinitialize in class SimpleTpaeIFConnectorobj - User provided parameter
java.lang.Exception - if the initialization of this connector fails.
public void selectEntries()
throws MxConnectorException
selectEntries in interface ConnectorInterfaceselectEntries in class SimpleTpaeIFConnectorMxConnectorException
public Entry getNextEntry()
throws MxConnectorException
Example:
var ctor = input.getConnector();
var entry = ctor.getNextEntry();
for (; entry != null; entry = ctor.getNextEntry()) {
main.logmsg("Read entry...");
main.dumpEntry(entry);
}
getNextEntry in interface ConnectorInterfacegetNextEntry in class SimpleTpaeIFConnectorMxConnectorExceptionConnectorInterface.selectEntries()
public void putEntry(Entry newEntry)
throws MxConnectorException
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 SimpleTpaeIFConnectornewEntry - The entry data to add
MxConnectorException
public Entry findEntry(SearchCriteria searchCriteria)
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 SimpleTpaeIFConnectorsearchCriteria - The search criteria used to locate the entry to be modified
java.lang.Exception - if an error occurs.
public void modEntry(Entry newEntry,
SearchCriteria searchCriteria,
Entry oldEntry)
throws MxConnectorException
modEntry in interface ConnectorInterfacemodEntry in class SimpleTpaeIFConnectornewEntry - The entry datasearchCriteria - The search criteria used to locate the entry to be modifiedoldEntry - The old entry found by the search criteria
MxConnectorException
public void deleteEntry(Entry entry,
SearchCriteria sc)
throws MxConnectorException
deleteEntry in interface ConnectorInterfacedeleteEntry in class SimpleTpaeIFConnectorentry - The entry datasc - The search criteria used to locate the entry to be deleted
MxConnectorException
public java.lang.Object querySchema(java.lang.Object obj)
throws java.lang.Exception
Note: This method uses
SchemaUtils.convertEntryToSchemaHier(Entry, ConnectorConfig, boolean)
method to display a hierarchical schema. However currently this method is
no converting correctly the hierarchical entry to a hierarchical schema.
This will be addressed later in the release.
querySchema in interface ConnectorInterfacequerySchema in class SimpleTpaeIFConnectorobj - The object on which to discover schema. This may be an Entry
or a string value
java.lang.Exception - if an error while retrieving the schema occurs.Entry,
Vectorpublic java.lang.String getVersion()
getVersion in interface VersionInfoInterfacegetVersion in class SimpleTpaeIFConnector
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||