|
||||||||||
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.DSMLv2SOAPConnector
public class DSMLv2SOAPConnector
The DSMLv2 SOAP Connector implements the DSMLv2 standard (http://www.oasis-open.org/committees/dsml/docs/DSMLv2.doc). It is able to execute DSMLv2 requests against a DSML Server. It also provides the option to use DSML SOAP binding.
Field Summary | |
---|---|
static java.lang.String |
ATTR_NAME_HTTP_BODY
An attribute name: "http.body" |
static java.lang.String |
ATTR_NAME_HTTP_CHARACTER_SET
An attribute name: "characterSet" |
static java.lang.String |
ATTR_NAME_HTTP_CONTENT_TYPE
An attribute name: "http.Content-Type" |
static java.lang.String |
ATTR_NAME_HTTP_METHOD
An attribute name: "http.method" |
static java.lang.String |
ATTR_NAME_HTTP_REMOTE_PASSWORD
An attribute name: "http.remote_pass" |
static java.lang.String |
ATTR_NAME_HTTP_REMOTE_USER
An attribute name: "http.remote_user" |
static java.lang.String |
ATTR_NAME_HTTP_SOAPACTION
An attribute name: "http.SOAPAction" |
static java.lang.String |
ATTR_NAME_HTTP_URL
An attribute name: "http.url" |
static java.lang.String |
BASE_OBJECT
IBM TDS DSMLv2 String constant. |
static java.lang.String |
HTTP_BASIC_AUTH
String constant. |
static java.lang.String |
PARAMETER_AUTH_METHOD
A parameter name: "authenticationMethod" |
static java.lang.String |
PARAMETER_BINARY_ATTRIBUTES
A parameter name: "binaryAttributes" |
static java.lang.String |
PARAMETER_PASSWORD
A parameter name: "password" |
static java.lang.String |
PARAMETER_SEARCH_BASE
A parameter name: "searchBase" |
static java.lang.String |
PARAMETER_SEARCH_FILTER
A parameter name: "searchFilter" |
static java.lang.String |
PARAMETER_SEARCH_SCOPE
A parameter name: "searchScope" |
static java.lang.String |
PARAMETER_SOAPACTION
A parameter name: "soapAction" |
static java.lang.String |
PARAMETER_SOAPBINDING
A parameter name: "soapbinding" |
static java.lang.String |
PARAMETER_URL
A parameter name: "url" |
static java.lang.String |
PARAMETER_USERNAME
A parameter name: "username" |
static java.lang.String |
SINGLE_LEVEL
IBM TDS DSMLv2 String constant. |
static java.lang.String |
WHOLE_SUBTREE
IBM TDS DSMLv2 String constant. |
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
DSMLv2SOAPConnector()
Default constructor. |
Method Summary | |
---|---|
void |
deleteEntry(Entry aEntry,
SearchCriteria aSearch)
This method first look for an attribute with name Dsmlv2Parser.ATTR_NAME_DN in the provided entry if not found it
looks the first criteria in the SearchCriteria object for the same name. |
Entry |
findEntry(SearchCriteria aSearch)
Finds an existing entry. The search criteria specifies which entry to locate 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!"); } } |
Entry |
getNextEntry()
Gets an entry form the resultSet. |
java.lang.String |
getVersion()
Version information. |
void |
initialize(java.lang.Object o)
Initializes the connector. |
boolean |
isDeltaSupported()
Delta mode supported. |
void |
modEntry(Entry entry,
SearchCriteria search)
Modifies an existing entry. The new entry data is given by the entry parameter and the search criteria specifies which entry to modify. |
void |
modEntry(Entry entry,
SearchCriteria search,
Entry old)
Modifies an existing entry. The new entry data is given by the entry parameter and the search criteria specifies which entry to modify. |
void |
putEntry(Entry aPutEntry)
Sends the DSML request to the DSML Server. |
Entry |
queryReply(Entry aQueryEntry)
Sends the DSML request to the DSML Server. |
void |
selectEntries()
Initializes the connection with the server and sends a request based on the configured parameters. |
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, isExceptionFatal, isIOException, pushback, queryOperations, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer |
Field Detail |
---|
public static final java.lang.String PARAMETER_URL
public static final java.lang.String PARAMETER_AUTH_METHOD
public static final java.lang.String PARAMETER_USERNAME
public static final java.lang.String PARAMETER_PASSWORD
public static final java.lang.String PARAMETER_BINARY_ATTRIBUTES
public static final java.lang.String PARAMETER_SEARCH_BASE
public static final java.lang.String PARAMETER_SEARCH_FILTER
public static final java.lang.String PARAMETER_SEARCH_SCOPE
public static final java.lang.String PARAMETER_SOAPBINDING
public static final java.lang.String PARAMETER_SOAPACTION
public static final java.lang.String ATTR_NAME_HTTP_SOAPACTION
public static final java.lang.String ATTR_NAME_HTTP_URL
public static final java.lang.String ATTR_NAME_HTTP_METHOD
public static final java.lang.String ATTR_NAME_HTTP_REMOTE_USER
public static final java.lang.String ATTR_NAME_HTTP_REMOTE_PASSWORD
public static final java.lang.String ATTR_NAME_HTTP_BODY
public static final java.lang.String ATTR_NAME_HTTP_CONTENT_TYPE
public static final java.lang.String ATTR_NAME_HTTP_CHARACTER_SET
public static final java.lang.String HTTP_BASIC_AUTH
public static final java.lang.String BASE_OBJECT
public static final java.lang.String SINGLE_LEVEL
public static final java.lang.String WHOLE_SUBTREE
Constructor Detail |
---|
public DSMLv2SOAPConnector()
Method Detail |
---|
public void initialize(java.lang.Object o) throws java.lang.Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
o
- -
ignored
java.lang.Exception
- if the "url" parameter is missing or the
protocol used is neither "http" nor "https".public void putEntry(Entry aPutEntry) throws java.lang.Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
aPutEntry
- the DSML request as an Entry object, used by the DSMLv2Parser.
java.lang.Exception
- if the distinguish parameter is missing or the DSML Server
replied with an error code.public Entry queryReply(Entry aQueryEntry) throws java.lang.Exception
Entry
object.
queryReply
in interface ConnectorInterface
queryReply
in class Connector
aQueryEntry
- the DSML request as an Entry object, used by the DSMLv2Parser.
java.lang.Exception
- if the DSML Server replied with an error code.public void selectEntries() throws java.lang.Exception
getNextEntry()
could return single entry at a time.
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
java.lang.Exception
- if the server responded with an error message.public Entry getNextEntry() throws java.lang.Exception
selectEntries()
operation.
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
java.lang.Exception
- -
neverConnectorInterface.selectEntries()
public Entry findEntry(SearchCriteria aSearch) 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 ConnectorInterface
findEntry
in class Connector
aSearch
- The search criteria used to locate the entry to be modified
java.lang.Exception
- if an error occurs.public void modEntry(Entry entry, SearchCriteria search) throws java.lang.Exception
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- The entry datasearch
- The search criteria used to locate the entry to be modified
java.lang.Exception
- if an error occurs.public void modEntry(Entry entry, SearchCriteria search, Entry old) throws java.lang.Exception
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- The entry datasearch
- The search criteria used to locate the entry to be modifiedold
- The old entry found by the search criteria
java.lang.Exception
- if an error occurs.public void deleteEntry(Entry aEntry, SearchCriteria aSearch) throws java.lang.Exception
Dsmlv2Parser.ATTR_NAME_DN
in the provided entry if not found it
looks the first criteria in the SearchCriteria object for the same name.
If not found an exception is thrown. After the distinguished name is
found the entry is parsed as a DSMLv2 request and sent. If the returned
response indicates that an error had occurred then an exception is
thrown.
deleteEntry
in interface ConnectorInterface
deleteEntry
in class Connector
aEntry
- the entry which is the result of the attribute mappingaSearch
- the search criteria object.
java.lang.Exception
- if an error while deleting the entry has occurred.public boolean isDeltaSupported()
isDeltaSupported
in interface ConnectorInterface
isDeltaSupported
in class Connector
public java.lang.String getVersion()
getVersion
in interface VersionInfoInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |