|
|||||||||
| Home >> All >> org >> mitre >> [ cvw overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mitre.cvw
Class DSIController

java.lang.Objectorg.mitre.cvw.DSIController
- All Implemented Interfaces:
- ObjectValues
- public class DSIController
- extends java.lang.Object
- implements ObjectValues
- extends java.lang.Object
A shell class to handle launching of DocServer threads. Other classes wishing to control the Document Server and get information should funnel all calls through this shell. This class also deals with user-interface issues and error reporting. The calling routine can call into here and never worry again about what happens. This allows DSIController to run multiple document server threads and control the results. In beginning, the document server availability was also tied to the availability of the Netscape plugin (NPDocServer), since this client was an applet. Now that it is an application, the availability of the plugin is not relevant but the code dependency has not been removed. 8/23/00 SRJ MAJOR REWRITE!!! Added a level above this class (DocumentServerList) to incorporate federation Did a lot of cleanup and changing. Basically, made this class more of a container for each document server encountered. The main entry point will now be DocumentServerList
- Version:
- 1.0
| Field Summary | |
private boolean |
available
|
private static java.lang.String |
CheckDir
|
(package private) static java.util.Vector |
docIDTable
|
protected java.lang.String |
DSHost
|
protected int |
DSPort
|
protected java.lang.String |
DSUrl
|
(package private) org.mitre.cvw.docclnt.DocFactory |
factory
|
private static boolean |
firstTime
|
(package private) static CVWCoordinator |
jcvw
|
(package private) static NPDocServer |
plugin
|
private static java.lang.String |
PROTOCOL
|
(package private) DSIParms |
resultParms
|
(package private) static java.util.Vector |
runTable
|
(package private) static java.util.Vector |
runThreads
|
| Fields inherited from interface org.mitre.cvw.ObjectValues |
BALLOT, CHECKEDOUTDOC, CHECKOUT, CURRONLINEUSER, CURRUSER, DISCONNECTED, DOC, DOC_SC, DOCBUSY, DOCCHECKIN, DOCCOPY, DOCCREATE, DOCCREATEBACKGROUND, DOCCREATEDATE, DOCCREATOR, DOCCREATORONLY, DOCDELETE, DOCDESC, DOCEDITORS, DOCEXPORT, DOCINFO, DOCMIMETYPE, DOCOPEN, DOCSETDESC, DOCSTATUS, DOCTYPE, DOCUMENT, DROP, FLOOR, FOLDER, FOLDER_SC, FORM, FORMFOLDER, GETALLTYPES, GETCHECKEDDOCS, GETDOCTEXTS, GETDOCTEXTSCO, GETEXTDESC, GROUP, IMAGEMENU, NOTCHECKEDOUTDOC, NOTE, NOTE_SC, ONLINEUSER, PROXY, PROXYWIN, RECORDER, REMOTE, REMOTEUSER, REVERT, REVISION, ROOM, ROOMKEY, SETDOCATTRS, SETDOCNAME, STANDARD, TAKE, UNKNOWN, URL, URL_SC, USER, USERSTAT, WB, WHITEBOARD, WHITEBOARD_SC |
| Constructor Summary | |
DSIController()
Constructor |
|
DSIController(java.net.URL location)
Constructor |
|
| Method Summary | |
static void |
checkoutDirNotAvailable()
Display error for debugging purposes. |
static void |
displayDocServInUseError()
Displays the standard error that the document server is currently busy. |
static void |
displayDocServNotInstalled()
Displays the standard error that the document server is not installed. |
static void |
displayError(java.lang.String msg)
Displays the specified error message. |
static void |
docGenericError()
Display error for debugging purposes. |
boolean |
docServerLogout()
Checks to see if user is currently editing documents, if so warns them, and user can cancel logout. |
boolean |
documentIsBusy(java.lang.String docID)
Checks to see if the document specified can be accessed and is not busy. |
boolean |
doDocDelete(java.lang.String objNum,
int docID,
boolean finalTime)
Deletes the specified document from the document server. |
boolean |
doDocDelete(java.lang.String objNum,
java.lang.Integer docID,
boolean finalTime)
Deletes the specified document from the document server. |
boolean |
doDocMenu(CVWDocument document,
java.lang.String function)
Preforms the right mouse menu functions on the specified document. |
org.mitre.cvw.docclnt.DocFactory |
getDocFactory()
|
java.net.URL |
getDSUrl()
|
int |
getNewDocID(java.lang.String docid)
Returns a new document id needed when copying an existing document. |
java.lang.String |
getUserName()
|
private DSIParms |
handleThreadReturn(int threadID)
Handles the return of a particular thread. |
private boolean |
initDocServerCheck(java.net.URL location)
Checks to see if document server connectivity is available. |
private void |
initDocServerInterface(java.net.URL location)
Initializes the single instance of this class, checks to make sure connectivity to the document server is available, the user checkout dir exists and tries to start its own thread. |
boolean |
inUse(java.lang.Integer docID)
Returns true if the docID is currently active/in use. |
boolean |
isAvailable()
Returns whether connectivity to the document server is available. |
private boolean |
isFinished(int transIdx)
Check status of request/transaction. |
private void |
releaseDSOp(int transIdx)
Remove this transaction from the indexes, it's no longer needed. |
void |
releaseThreadInfo(java.lang.Thread thread)
Cleans up thread information |
void |
run()
Runs the current thread. |
void |
setupUser()
Sets the current user name once the user has connected. |
int |
startDSOp(int opcode,
DSIParms params)
Methods to start a DS request, query a current request's status, and retrieve the results of a request Start a request. |
DSIParms |
startDSSyncOp(int opcode,
DSIParms params)
Start a request, and wait for it to finish. |
void |
syncWithDocServer()
Synchronize the user's local database file with the information on the document server. |
private void |
verifyCache()
Verifies the cache integrity, database integrity, and synchronization with the document server. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DSHost
protected java.lang.String DSHost
DSUrl
protected java.lang.String DSUrl
DSPort
protected int DSPort
CheckDir
private static java.lang.String CheckDir
PROTOCOL
private static java.lang.String PROTOCOL
jcvw
static CVWCoordinator jcvw
plugin
static NPDocServer plugin
factory
org.mitre.cvw.docclnt.DocFactory factory
runTable
static java.util.Vector runTable
runThreads
static java.util.Vector runThreads
docIDTable
static java.util.Vector docIDTable
resultParms
DSIParms resultParms
available
private boolean available
firstTime
private static boolean firstTime
| Constructor Detail |
DSIController
public DSIController()
- Constructor
DSIController
public DSIController(java.net.URL location)
- Constructor
| Method Detail |
isAvailable
public boolean isAvailable()
- Returns whether connectivity to the document server is available.
initDocServerCheck
private boolean initDocServerCheck(java.net.URL location)
- Checks to see if document server connectivity is available.
initDocServerInterface
private void initDocServerInterface(java.net.URL location) throws CheckoutDirectoryException, java.lang.Throwable
- Initializes the single instance of this class, checks to make sure
connectivity to the document server is available, the user checkout dir
exists and tries to start its own thread.
docServerLogout
public boolean docServerLogout()
- Checks to see if user is currently editing documents, if so warns them,
and user can cancel logout.
syncWithDocServer
public void syncWithDocServer()
- Synchronize the user's local database file with the information on the
document server.
doDocMenu
public boolean doDocMenu(CVWDocument document, java.lang.String function)
- Preforms the right mouse menu functions on the specified document.
doDocDelete
public boolean doDocDelete(java.lang.String objNum, int docID, boolean finalTime)
- Deletes the specified document from the document server.
doDocDelete
public boolean doDocDelete(java.lang.String objNum, java.lang.Integer docID, boolean finalTime)
- Deletes the specified document from the document server.
getNewDocID
public int getNewDocID(java.lang.String docid)
- Returns a new document id needed when copying an existing document.
documentIsBusy
public boolean documentIsBusy(java.lang.String docID)
- Checks to see if the document specified can be accessed and is not busy.
displayDocServInUseError
public static void displayDocServInUseError()
- Displays the standard error that the document server is currently busy.
displayDocServNotInstalled
public static void displayDocServNotInstalled()
- Displays the standard error that the document server is not installed.
Note: this was pertinent when the doc server availability was tied to the
Netscape plugin.
displayError
public static void displayError(java.lang.String msg)
- Displays the specified error message.
docGenericError
public static void docGenericError()
- Display error for debugging purposes.
checkoutDirNotAvailable
public static void checkoutDirNotAvailable()
- Display error for debugging purposes.
run
public void run()
- Runs the current thread.
setupUser
public void setupUser()
throws CheckoutDirectoryException
- Sets the current user name once the user has connected.
startDSOp
public int startDSOp(int opcode,
DSIParms params)
throws DocInUseException
- Methods to start a DS request, query a current request's status,
and retrieve the results of a request
Start a request. In general, the philosophy is that we can
perform *one* operation at a time on a given docID, so we check
to see which docID's are currently having operations performed
on them. If the docID does not appear, we can continue to start
the operation. Returns a transaction index.
inUse
public boolean inUse(java.lang.Integer docID)
- Returns true if the docID is currently active/in use.
NOTE NOTE NOTE
Until the plugin is made re-entrant (i.e., it can support
more than one file open at a time), this routine will always return
TRUE if there is ANY document operation in progress.
CHANGE THIS ROUTINE for multiple operations on multiple documents,
after the plugin is rewritten.
startDSSyncOp
public DSIParms startDSSyncOp(int opcode, DSIParms params) throws DocInUseException
- Start a request, and wait for it to finish. Return the process'
DSI result block.
isFinished
private boolean isFinished(int transIdx)
- Check status of request/transaction.
releaseDSOp
private void releaseDSOp(int transIdx)
- Remove this transaction from the indexes, it's no longer
needed. Removes the object from the runtable,
removes the thread from the thread table, and releases the
op lock on the docID
releaseThreadInfo
public void releaseThreadInfo(java.lang.Thread thread)
- Cleans up thread information
handleThreadReturn
private DSIParms handleThreadReturn(int threadID)
- Handles the return of a particular thread.
verifyCache
private void verifyCache()
throws org.mitre.cvw.docserv.DocServException
- Verifies the cache integrity, database integrity, and
synchronization with the document server.
getDocFactory
public org.mitre.cvw.docclnt.DocFactory getDocFactory()
getDSUrl
public java.net.URL getDSUrl() throws java.net.MalformedURLException
getUserName
public java.lang.String getUserName()
|
|||||||||
| Home >> All >> org >> mitre >> [ cvw overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.mitre.cvw.DSIController