|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ca.directory.jxplorer.broker.Broker
| Field Summary | |
protected DataQuery |
current
|
int |
id
|
protected java.util.Vector |
listeners
|
protected java.util.Vector |
requestQueue
|
| Constructor Summary | |
Broker()
|
|
| Method Summary | |
void |
addDataListener(DataListener l)
Adds a data listener to every DataQuery generated by this broker. |
void |
clearException()
Utility method for extended queries - allows a 'masked' exception to be cleared. |
DataQuery |
copyTree(DN oldNodeDN,
DN newNodeDN)
Copies the entry, and any child entries, identified by DN oldNodeDn to newNodeDN. |
protected DataQuery |
doCopyQuery(DataQuery request)
Method for the Broker interface - chains to copyTree(). |
protected DataQuery |
doEntryQuery(DataQuery request)
Method for the Broker interface - chains to dirOp.read(). |
protected DataQuery |
doExistsQuery(DataQuery request)
Method for the Broker interface - chains to dirOp.exists(). |
protected DataQuery |
doExtendedQuery(DataQuery request)
|
protected DataQuery |
doGetAllOCsQuery(DataQuery request)
Method for the Broker interface - chains to getObjectClasses(). |
protected DataQuery |
doGetRecOCsQuery(DataQuery request)
Method for the Broker interface - chains to getunthreadedGetRecOCs. |
protected DataQuery |
doListQuery(DataQuery request)
Method for the Broker interface - chains to list(). |
protected DataQuery |
doModifyQuery(DataQuery request)
Method for the Broker interface - chains to modifyEntry(). |
protected DataQuery |
doSearchQuery(DataQuery request)
Method for the Broker interface - chains to search(). |
DataQuery |
exists(DN nodeDN)
Checks the existence of a particular entry by DN, without (necessarily) reading any attributes. |
DataQuery |
extendedRequest(DataQuery query)
General Bail out - this allows the passing of a generic DataQuery object. |
protected DataQuery |
finish(DataQuery request)
Sets the finish flag of a request and returns the query. |
Broker |
getBroker()
As a way to directly access the directory broker, a DataSource MAY choose to publish the directory broker. |
DataQuery |
getChildren(DN nodeDN)
gets the children of a particular DN as an enumeration |
DataQuery |
getCurrent()
Returns the DataQuery currently being processed (if any). |
abstract javax.naming.directory.DirContext |
getDirContext()
As a way to directly access the raw jndi directory context, a DataSource MAY choose to publish the directory connection. |
DataQuery |
getEntry(DN nodeDN)
gets the attribute types and values for a particular DN |
java.lang.Exception |
getException()
Utility method for extended queries - returns whether a 'masked' exception has occured. |
DataQuery |
getObjectClasses()
Gets a list of all known schema object classes. |
DataQuery |
getRecommendedObjectClasses(DN dn)
Gets a list of the object classes most likely to be used for the next Level of the DN... |
java.util.Vector |
getRequestQueue()
Returns the vector of outstanding queries. |
abstract javax.naming.directory.DirContext |
getSchema()
Returns a schema context (for getting object classes etc.) |
boolean |
hasRequests()
Returns whether there are more DataQuerys pending. |
abstract boolean |
isActive()
whether the data source is currently on-line. |
abstract boolean |
isModifiable()
Checks whether the current data source is modifiable. |
DataQuery |
modifyEntry(DXEntry oldEntry,
DXEntry newEntry)
This changes an old entry to a new entry. |
DataQuery |
pop()
Gets the next DataQuery from the request Queue, removing it from the queue as it does so. |
protected boolean |
processQueue()
process all queue requests |
protected void |
processRequest(DataQuery request)
Process a specific request. |
DataQuery |
push(DataQuery request)
Adds a DataQuery to the request Queue. |
void |
registerStopMonitor(StopMonitor monitor)
Registers a stop monitor that is used by the gui to allow user cancellation of in-progress broker actions. |
void |
removeDataListener(DataListener l)
Removes a data listener from every DataQuery generated by this broker. |
void |
removeQuery(DataQuery query)
Removes a particular query from the pending query list... |
void |
run()
Wait until notified that something (presumably an addition to the queue) has occured. |
DataQuery |
search(DN nodeDN,
java.lang.String filter,
int searchLevel,
java.lang.String[] returnAttributes)
Executes a search request. |
abstract boolean |
unthreadedCopy(DN oldNodeDN,
DN newNodeDN)
Copies a DN representing a subtree to a new subtree, including copying all subordinate entries. |
abstract boolean |
unthreadedExists(DN checkMe)
Checks the existance of a given entry. |
abstract java.util.Vector |
unthreadedGetAllOCs()
Returns a complete list of all known object classes. |
abstract java.util.Vector |
unthreadedGetRecOCs(DN dn)
Gets a list of the object classes most likely to be used for the next Level of the DN... |
abstract DXNamingEnumeration |
unthreadedList(DN searchbase)
returns the next level of a directory tree, returning a Enumeration of the results |
abstract boolean |
unthreadedModify(DXEntry oldEntry,
DXEntry newEntry)
Update an entry with the designated DN. |
abstract DXEntry |
unthreadedReadEntry(DN entryDN,
java.lang.String[] returnAttributes)
Reads an entry with all its attributes from the directory. |
abstract DXNamingEnumeration |
unthreadedSearch(DN dn,
java.lang.String filter,
int search_level,
java.lang.String[] returnAttributes)
Performs a directory search. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Vector requestQueue
protected java.util.Vector listeners
public int id
protected DataQuery current
| Constructor Detail |
public Broker()
| Method Detail |
public void registerStopMonitor(StopMonitor monitor)
public DataQuery push(DataQuery request)
public DataQuery pop()
public void removeQuery(DataQuery query)
public boolean hasRequests()
public void run()
run in interface java.lang.Runnableprotected boolean processQueue()
protected void processRequest(DataQuery request)
public DataQuery getChildren(DN nodeDN)
DataSource
getChildren in interface DataSourcenodeDN - the DN to retrieve children for
public DataQuery getEntry(DN nodeDN)
DataSource
getEntry in interface DataSourcenodeDN - the DN to retrieve attribute data for
public DataQuery exists(DN nodeDN)
DataSource
exists in interface DataSourcepublic DataQuery getObjectClasses()
DataSource
getObjectClasses in interface DataSourcepublic DataQuery getRecommendedObjectClasses(DN dn)
DataSource
getRecommendedObjectClasses in interface DataSourcedn - the dn of the parent to determine likely
child object classes for
public DataQuery modifyEntry(DXEntry oldEntry,
DXEntry newEntry)
DataSource
modifyEntry in interface DataSourceoldEntry - the original entry (may be null if adding a new entry).newEntry - the new entry (may be null if deleting the entry).
public DataQuery copyTree(DN oldNodeDN,
DN newNodeDN)
DataSource
copyTree in interface DataSourceoldNodeDN - the entry or subtree apexto copy fromnewNodeDN - the entry/subtree apex to copy to
public DataQuery search(DN nodeDN,
java.lang.String filter,
int searchLevel,
java.lang.String[] returnAttributes)
DataSource
search in interface DataSourcenodeDN - the root DN to start searching fromfilter - the ldap string filter for the searchreturnAttributes - an array of attributes that the search should return.
or the entire sub tree.public DataQuery extendedRequest(DataQuery query)
DataSource
extendedRequest in interface DataSourcepublic void addDataListener(DataListener l)
While it is not an error to register a listener multiple times, a listener will still only be notified once.
addDataListener in interface DataSourcel - the listener to be notified when the data
operation has been completed.public void removeDataListener(DataListener l)
removeDataListener in interface DataSourcel - the listener to be notified when the data is ready.public abstract boolean isModifiable()
DataSource
isModifiable in interface DataSourcepublic abstract javax.naming.directory.DirContext getDirContext()
DataSource
getDirContext in interface DataSourcepublic abstract boolean isActive()
DataSource
isActive in interface DataSourcepublic abstract javax.naming.directory.DirContext getSchema()
DataSource
getSchema in interface DataSourceprotected DataQuery finish(DataQuery request)
public DataQuery getCurrent()
public java.util.Vector getRequestQueue()
protected DataQuery doExtendedQuery(DataQuery request)
protected DataQuery doExistsQuery(DataQuery request)
protected DataQuery doListQuery(DataQuery request)
protected DataQuery doEntryQuery(DataQuery request)
protected DataQuery doSearchQuery(DataQuery request)
protected DataQuery doModifyQuery(DataQuery request)
protected DataQuery doCopyQuery(DataQuery request)
protected DataQuery doGetRecOCsQuery(DataQuery request)
protected DataQuery doGetAllOCsQuery(DataQuery request)
public abstract DXNamingEnumeration unthreadedList(DN searchbase)
public abstract DXNamingEnumeration unthreadedSearch(DN dn,
java.lang.String filter,
int search_level,
java.lang.String[] returnAttributes)
filter - the non-null filter to use for the searchsearch_level - whether to search the base object, the next level or the whole subtree.returnAttributes - a vector of string names of attributes to return in the search.
(null means 'return all entries', a zero length array means 'return no attributes'.)
public abstract boolean unthreadedCopy(DN oldNodeDN,
DN newNodeDN)
oldNodeDN - the original DN of the sub tree root
to be copied (may be a single entry).newNodeDN - the target DN for the tree to be moved to.
public abstract boolean unthreadedExists(DN checkMe)
public abstract java.util.Vector unthreadedGetAllOCs()
public abstract DXEntry unthreadedReadEntry(DN entryDN,
java.lang.String[] returnAttributes)
returnAttributes - a vector of string names of attributes to return in the search.
(null means 'return all entries', a zero length array means 'return no attributes'.)
public abstract boolean unthreadedModify(DXEntry oldEntry,
DXEntry newEntry)
public abstract java.util.Vector unthreadedGetRecOCs(DN dn)
dn - the dn of the parent to determine likely
child object classes for
public java.lang.Exception getException()
public void clearException()
public Broker getBroker()
getBroker in interface DataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||