Class NT4UserMetaDataConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.NT4UserMetaDataConnector.NT4UserMetaDataConnector
-
- All Implemented Interfaces:
ConnectorInterface
,VersionInfoInterface
public class NT4UserMetaDataConnector extends Connector implements ConnectorInterface
This class represents a Connector for managing Windows User and Group accounts.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_PAGE_SIZE
Active Directory maximup "page size" for the "NetQueryDisplayInformation"static java.lang.String
PARAM_COMPUTER_NAME
Connector`s parameter namestatic java.lang.String
PARAM_ENTRY_TYPE
Connector`s parameter namestatic java.lang.String
PARAM_PAGE_SIZE
Connector`s parameter namestatic java.lang.String
PARAM_PASSWORD
Connector`s parameter namestatic java.lang.String
PARAM_USER_NAME
Connector`s parameter namestatic java.lang.String
PARAM_VALUE_ENTRY_GROUP
Value for the PARAM_ENTRY_TYPE connector's parameterstatic java.lang.String
PARAM_VALUE_ENTRY_USER
Value for the PARAM_ENTRY_TYPE connector's parameter-
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
-
-
Constructor Summary
Constructors Constructor Description NT4UserMetaDataConnector()
Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteEntry(Entry aEntry, SearchCriteria aRscSearchCriteria)
Deletes given entry (user or group) from Windows security database.Entry
findEntry(SearchCriteria aRscSearchCriteria)
Retrieves a single entry object matching the given search criteria parameter.Entry
getNextEntry()
Retrieves the next entry from the connector's containers.java.lang.String
getVersion()
Version information.void
initialize(java.lang.Object aObj)
Reads connector parameters' values.void
modEntry(Entry aEntry, SearchCriteria aRscSearchCriteria)
Modifies in Windows database the entry identified by the aRscSearchCriteria parameter with the data given in the aEntry parameter.void
putEntry(Entry aEntry)
Inserts given entry (user or group) into Windows security database.java.lang.Object
querySchema(java.lang.Object aObj)
Retrieves connector entry's structure.void
selectEntries()
Reads all entries from Windows security database in a connector's container.-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, extractExceptionInformation, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, pushback, queryOperations, queryReply, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, 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
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, pushback, queryOperations, queryReply, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer
-
-
-
-
Field Detail
-
PARAM_COMPUTER_NAME
public static final java.lang.String PARAM_COMPUTER_NAME
Connector`s parameter name- See Also:
- Constant Field Values
-
PARAM_USER_NAME
public static final java.lang.String PARAM_USER_NAME
Connector`s parameter name- See Also:
- Constant Field Values
-
PARAM_PASSWORD
public static final java.lang.String PARAM_PASSWORD
Connector`s parameter name- See Also:
- Constant Field Values
-
PARAM_ENTRY_TYPE
public static final java.lang.String PARAM_ENTRY_TYPE
Connector`s parameter name- See Also:
- Constant Field Values
-
PARAM_PAGE_SIZE
public static final java.lang.String PARAM_PAGE_SIZE
Connector`s parameter name- See Also:
- Constant Field Values
-
PARAM_VALUE_ENTRY_USER
public static final java.lang.String PARAM_VALUE_ENTRY_USER
Value for the PARAM_ENTRY_TYPE connector's parameter- See Also:
- Constant Field Values
-
PARAM_VALUE_ENTRY_GROUP
public static final java.lang.String PARAM_VALUE_ENTRY_GROUP
Value for the PARAM_ENTRY_TYPE connector's parameter- See Also:
- Constant Field Values
-
MAX_PAGE_SIZE
public static final int MAX_PAGE_SIZE
Active Directory maximup "page size" for the "NetQueryDisplayInformation"- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object aObj) throws NT4UserMetaDataException
Reads connector parameters' values. If UserName parameter is set tries to log on to the machine indicated by the ComputerName parameter.- Specified by:
initialize
in interfaceConnectorInterface
- Overrides:
initialize
in classConnector
- Parameters:
aObj
- This parameter is usually null but can be any type of object the caller chooses to passon. Normally the parameter is some kind of input stream or Reader object.- Throws:
NT4UserMetaDataException
- If bad parameter values are given.
-
selectEntries
public void selectEntries() throws NT4UserMetaDataException
Reads all entries from Windows security database in a connector's container. Depending on the value of EntryType connector's parameter this method dispatches the execution to either selectUserEntries or selectGroupEntries method.- Specified by:
selectEntries
in interfaceConnectorInterface
- Overrides:
selectEntries
in classConnector
- Throws:
NT4UserMetaDataException
- If an error occurs while obtaining data from Windows database.
-
getNextEntry
public Entry getNextEntry() throws NT4UserMetaDataException
Retrieves the next entry from the connector's containers. Depending on the value of EntryType connector's parameter this method dispatches the execution to either getNextUserEntry or getNextGroupEntry method.- Specified by:
getNextEntry
in interfaceConnectorInterface
- Overrides:
getNextEntry
in classConnector
- Returns:
- The consecutive Entry object.
- Throws:
NT4UserMetaDataException
- If an error occurs while obtaining data from Windows database or the EntryType value is invalid.- See Also:
ConnectorInterface.selectEntries()
-
findEntry
public Entry findEntry(SearchCriteria aRscSearchCriteria) throws NT4UserMetaDataException
Retrieves a single entry object matching the given search criteria parameter. Depending on the value of EntryType connector's parameter this method dispatches the execution to either findUserEntry or findGroupEntry method.- Specified by:
findEntry
in interfaceConnectorInterface
- Overrides:
findEntry
in classConnector
- Parameters:
aRscSearchCriteria
- The search criteria to locate the entry. Should contain just one rscSearch element (holding the entry's account name value) when operating with Users and two rscSearch elements (1st - group's account name and 2nd - global/local indicator) when operating with Groups.- Returns:
- Entry
- Throws:
NT4UserMetaDataException
- If an error occurs while obtaining data from Windows database. If unsupported search criteria is given.
-
putEntry
public void putEntry(Entry aEntry) throws NT4UserMetaDataException
Inserts given entry (user or group) into Windows security database. Depending on the value of EntryType connector's parameter this method dispatches the execution to either putUser or putGroup method.- Specified by:
putEntry
in interfaceConnectorInterface
- Overrides:
putEntry
in classConnector
- Parameters:
aEntry
- The Entry object to be inserted.- Throws:
NT4UserMetaDataException
- If an error occurs while inserting data into Windows database.
-
modEntry
public void modEntry(Entry aEntry, SearchCriteria aRscSearchCriteria) throws NT4UserMetaDataException
Modifies in Windows database the entry identified by the aRscSearchCriteria parameter with the data given in the aEntry parameter. Depending on the value of EntryType connector's parameter this method dispatches the execution to either modUserEntry or modGroupEntry method.- Specified by:
modEntry
in interfaceConnectorInterface
- Overrides:
modEntry
in classConnector
- Parameters:
aEntry
- Entry object containing the new data.aRscSearchCriteria
- The search criteria used by the assembly line to locate this entry.- Throws:
NT4UserMetaDataException
- If an error occurs while modifying data into Windows database.
-
deleteEntry
public void deleteEntry(Entry aEntry, SearchCriteria aRscSearchCriteria) throws NT4UserMetaDataException
Deletes given entry (user or group) from Windows security database. Depending on the value of EntryType connector's parameter this method dispatches the execution to either deleteUserEntry or deleteGroupEntry method.- Specified by:
deleteEntry
in interfaceConnectorInterface
- Overrides:
deleteEntry
in classConnector
- Parameters:
aEntry
- The entry object to be deleted.aRscSearchCriteria
- The search criteria used by the assembly line to locate this entry.- Throws:
NT4UserMetaDataException
- If an error occured while deleting data from Windows database.
-
querySchema
public java.lang.Object querySchema(java.lang.Object aObj) throws NT4UserMetaDataException
Retrieves connector entry's structure. Depending on the value of EntryType connector's parameter this method dispatches the execution to either UserInfo.queryUserSchema or GroupInfo.queryGroupSchema method.- Specified by:
querySchema
in interfaceConnectorInterface
- Overrides:
querySchema
in classConnector
- Parameters:
aObj
- Object- Returns:
- Vector of elements of type Entry describing each attribute's structure.
- Throws:
NT4UserMetaDataException
- If the value of the private member mEntryType is invalid.- See Also:
Entry
,Vector
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Returns:
- version information.
-
-