|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.base.Service | +--com.ibm.dse.services.notes.Notes
The Notes class provides access to the Lotus Notes databases. To use this service, the notes.jar file must be added to the classpath. The keyed collection fields are used to map the fields of the database with the data fields in the context. The name of an entry in this collection is the field name in the database and its value is the data field name in the context.
Field Summary | |
static java.lang.String |
COMPID
Trace identification for Notes |
Fields inherited from class com.ibm.dse.base.Service |
externalizer |
Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
Constructor Summary | |
Notes()
This constructor creates a Notes object. |
|
Notes(java.lang.String aName)
This constructor creates a Notes object with a name. |
Method Summary | |
void |
appendDocument(Context ctx)
Appends a new document to the current database. |
void |
appendDocument(HashtableFormat htf,
Context ctx)
Appends a new document to the current database with the values specified in the HashtableFormat htf. |
void |
closeDatabase()
Closes the current database. |
void |
closeSession()
Terminates the current session. |
void |
establishSession()
Establish a new session. |
protected void |
finalize()
Provides the finalize method for this class. |
boolean |
getAutomaticEstablishment()
Gets automaticEstablishment. |
java.lang.String |
getDatabaseName()
Returns the name of the current database. |
KeyedCollection |
getDataFields()
Returns the keyed collection fields. |
lotus.notes.DateTime |
getDateTime(java.lang.String dateTime)
Converts the String dateTime to a DateTime. |
java.util.Vector |
getField(java.lang.String docField)
Returns the value of the document field named docField from the current document. |
java.util.Vector |
getField(java.lang.String docField,
int index)
Returns the value of the document field named docField from the document at the index position. |
KeyedCollection |
getFields()
Reads the fields from the current document. |
KeyedCollection |
getFields(int index)
Reads the fields from the document at the index position. |
java.lang.String |
getServerName()
Returns the serverName. |
java.lang.String |
getUniversalId()
Returns the univesal ID of the current document. |
java.lang.String |
getUserName()
Returns the userName. |
boolean |
getVerifyACL()
Gets verifyACL. |
java.lang.Object |
initializeFrom(Tag aTag)
Reads the tags for this service from the xml file. |
protected void |
initializeThread()
Initializes the thread. |
boolean |
isDatabaseOpened()
Returns true if the database is opened. |
boolean |
isSessionEstablished()
Returns true if the session is established. |
boolean |
isVerifyACL()
Returns true if it is necessary to check the ACL. |
void |
modifyDocument(Context ctx)
Modifies the current document. |
void |
modifyDocument(HashtableFormat htf,
Context ctx)
Modifies the current document by taking the values from the HashtableFormat htf. |
int |
numOfDocuments()
Returns the number of documents in the current database. |
void |
openDatabase()
Opens the database and selects the first document. |
void |
openDatabase(int index)
Opens the database and selects the document at the index position. |
void |
readDocument(Context ctx)
Reads the current document from the database. |
void |
readDocument(HashtableFormat htf,
Context ctx)
Reads the fields specified in the hash table from the current document and copies the values into the context. |
void |
removeDocument()
Removes the current document from the database. |
void |
run()
Provides the main thread. |
void |
searchDocuments(java.lang.String q)
Selects a document collection which documents match with the query string q. |
boolean |
selectDocument(int index)
Selects the document at the index position. |
void |
selectDocumentByUniversalId(java.lang.String uniId)
Selects a document by its universal identification. |
void |
selectDocuments(java.lang.String q)
Selects a documents collection and compares it with the query string q. |
boolean |
selectFirstDocument()
Selects the first document from the database. |
boolean |
selectLastDocument()
Selects the last document from the current database. |
boolean |
selectNextDocument()
Selects the next document from the current database. |
boolean |
selectPrevDocument()
Selects the previous document from the current database. |
void |
setAutomaticEstablishment(boolean b)
Sets automaticEstablishment. |
void |
setDatabaseName(java.lang.String name)
Sets the name of the database. |
void |
setFields(KeyedCollection kc)
Sets the keyed collection fields. |
void |
setServerName(java.lang.String name)
Sets the server name. |
void |
setUserName(java.lang.String user)
Sets the userName. |
void |
setVerifyACL(boolean b)
Sets the value of verifyACL. |
void |
terminate()
Stops the main thread. |
Vector |
toStrings()
Returns an xml representation of this service. |
Methods inherited from class com.ibm.dse.base.Service |
externalizer,
getExternalizer,
getTagName,
readExternal,
readExternal,
readObject,
removeExternal,
setExternalizer,
toString,
toTags,
writeExternal,
writeExternal |
Methods inherited from class com.ibm.dse.base.DSENotifier |
addHandler,
getHandlersList,
getName,
removeHandler,
setName,
signalEvent,
signalEvent,
signalEvent |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String COMPID
Constructor Detail |
public Notes() throws DSENotesSessionNotEstablishedException
public Notes(java.lang.String aName) throws java.io.IOException, DSENotesSessionNotEstablishedException
Method Detail |
public void appendDocument(Context ctx) throws DSENotesSessionNotEstablishedException, DSENotesException, DSEObjectNotFoundException, DSEInvalidArgumentException, java.lang.Exception
ctx
- com.ibm.dse.base.Contextpublic void appendDocument(HashtableFormat htf, Context ctx) throws DSENotesSessionNotEstablishedException, DSENotesException, DSEObjectNotFoundException, DSEInvalidArgumentException, java.lang.Exception
htf
- com.ibm.dse.base.HashtableFormatctx
- com.ibm.dse.base.Contextpublic void closeDatabase() throws java.lang.Exception
public void closeSession() throws java.lang.Exception
public void establishSession() throws DSENotesSessionNotEstablishedException, java.lang.Exception
protected void finalize()
public boolean getAutomaticEstablishment()
public java.lang.String getDatabaseName()
public KeyedCollection getDataFields()
public lotus.notes.DateTime getDateTime(java.lang.String dateTime) throws DSENotesException, java.lang.Exception
dateTime
- java.lang.Stringpublic java.util.Vector getField(java.lang.String docField) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
docField
- java.lang.Stringpublic java.util.Vector getField(java.lang.String docField, int index) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
docField
- java.lang.Stringindex
- intpublic KeyedCollection getFields() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public KeyedCollection getFields(int index) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
index
- intpublic java.lang.String getServerName()
public java.lang.String getUniversalId() throws DSENotesException, java.lang.Exception
public java.lang.String getUserName()
public boolean getVerifyACL()
public java.lang.Object initializeFrom(Tag aTag) throws DSENotesSessionNotEstablishedException
aTag
- com.ibm.dse.base.Tagprotected void initializeThread() throws java.lang.Exception
public boolean isDatabaseOpened()
public boolean isSessionEstablished()
public boolean isVerifyACL()
public void modifyDocument(Context ctx) throws DSENotesException, DSENotesSessionNotEstablishedException, DSEObjectNotFoundException, DSEInvalidArgumentException, java.lang.Exception
ctx
- com.ibm.dse.base.Contextpublic void modifyDocument(HashtableFormat htf, Context ctx) throws DSENotesException, DSENotesSessionNotEstablishedException, DSEObjectNotFoundException, DSEInvalidArgumentException, java.lang.Exception
htf
- com.ibm.dse.base.HashtableFormatctx
- com.ibm.dse.base.Contextpublic int numOfDocuments() throws lotus.notes.NotesException, java.lang.Exception
public void openDatabase() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public void openDatabase(int index) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
index
- intpublic void readDocument(Context ctx) throws DSENotesSessionNotEstablishedException, DSENotesException, DSEObjectNotFoundException, DSEInvalidArgumentException, java.lang.Exception
ctx
- com.ibm.dse.base.Contextpublic void readDocument(HashtableFormat htf, Context ctx) throws DSENotesSessionNotEstablishedException, DSENotesException, DSEObjectNotFoundException, DSEInvalidArgumentException, java.lang.Exception
htf
- com.ibm.dse.base.HashtableFormatctx
- com.ibm.dse.base.Contextpublic void removeDocument() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public void run()
public void searchDocuments(java.lang.String q) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
q
- java.lang.Stringpublic boolean selectDocument(int index) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
index
- intpublic void selectDocumentByUniversalId(java.lang.String uniId) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
uniId
- java.lang.Stringpublic void selectDocuments(java.lang.String q) throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
q
- java.lang.Stringpublic boolean selectFirstDocument() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public boolean selectLastDocument() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public boolean selectNextDocument() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public boolean selectPrevDocument() throws DSENotesSessionNotEstablishedException, DSENotesException, java.lang.Exception
public void setAutomaticEstablishment(boolean b)
b
- booleanpublic void setDatabaseName(java.lang.String name)
name
- java.lang.Stringpublic void setFields(KeyedCollection kc)
kc
- com.ibm.dse.base.KeyedCollectionpublic void setServerName(java.lang.String name)
name
- java.lang.Stringpublic void setUserName(java.lang.String user)
name
- java.lang.Stringpublic void setVerifyACL(boolean b)
b
- booleanpublic void terminate()
public Vector toStrings()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |