|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.monitor.AbstractMonitorEnabled de.bea.domingo.proxy.BaseProxy de.bea.domingo.proxy.SessionProxy
public final class SessionProxy
Notes session.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.bea.domingo.proxy.BaseProxy |
---|
BaseProxy.DocumentCollectionIterator |
Field Summary |
---|
Fields inherited from class de.bea.domingo.proxy.BaseProxy |
---|
DATETIME_STRING_LENGTH, EMPTY_STRING, MAX_DATETIME_LENGTH, NUM_DATETIME_VALUES, RESOURCES |
Method Summary | |
---|---|
DDatabase |
createDatabase(java.lang.String serverName,
java.lang.String databaseName)
Creates an empty database and opens it. |
DDxlExporter |
createDxlExporter()
Creates a DxlExporter object. |
DLog |
createLog(java.lang.String name)
Creates a new Log object with the name you specify. |
java.util.List |
evaluate(java.lang.String formula)
Evaluates a domino formula. |
java.util.List |
evaluate(java.lang.String formula,
DBaseDocument doc)
Evaluates a domino formula. |
java.lang.String |
getAbbreviatedName(java.lang.String canonicalName)
Converts a canonical name to it's abbreviated form. |
java.util.List |
getAddressBooks()
The Domino Directories and Personal Address Books that are known to the current session. |
DAgentContext |
getAgentContext()
Represents the agent environment of the current program, if an agent is running it. |
java.lang.String |
getCanonicalName(java.lang.String abreviatedName)
Converts a abbreviated name to it's canonical form. |
java.lang.String |
getCanonicalUserName()
returns a String value containing the canonical form of a hierarchical name. |
java.lang.String |
getCommonUserName()
Returns a String value containing the common name (CN=) component of a hierarchical name. |
java.util.Calendar |
getCurrentTime()
Returns the current date/time. |
DDatabase |
getDatabase(java.lang.String serverName,
java.lang.String databaseName)
Returns a database interface to a Notes database. |
java.lang.String |
getEnvironmentString(java.lang.String name)
Given the name of an environment variable, retrieves its value. |
java.lang.String |
getEnvironmentString(java.lang.String name,
boolean isSystem)
Given the name of an environment variable, retrieves its value. |
java.lang.Object |
getEnvironmentValue(java.lang.String name)
Given the name of an environment variable, retrieves its value. |
java.lang.Object |
getEnvironmentValue(java.lang.String name,
boolean isSystem)
Given the name of an environment variable, retrieves its value. |
static DSession |
getInstance(NotesProxyFactory theFactory,
lotus.domino.Session theSession,
DNotesMonitor monitor)
Creates an encapsulated notes session object. |
InternationalProxy |
getInternational()
|
DDatabase |
getMailDatabase()
Returns the mail database of the current user. |
DDatabase |
getMailDatabase(java.lang.String username)
Returns the mail database of a given user. The mail server of the current user is used as registration server. |
java.lang.String |
getMailDatabaseName()
Returns the file/path of the mail database of the current users. The two methods getMailServer()() and getMailDatabaseName()()
are synchronized to prevent double-reading of mail information. |
java.lang.String |
getMailDomain()
Returns the name of the mail-domain of the current user. |
java.lang.String |
getMailServer()
Returns the name of the mail server of the current user. The two methods getMailServer()() and getMailDatabaseName()()
are synchronized to prevent double-reading of mail information. |
java.lang.String |
getNotesVersion()
The release of Domino the session is running on. |
java.lang.String |
getPlatform()
The name of the platform the session is running on. |
java.lang.String |
getServerName()
Returns the full name of the server that the session is running on. |
java.util.TimeZone |
getTimeZone()
Returns the time zone of calendar instances that are created by domingo. |
java.lang.String |
getUserName()
The full name of the user or server that created the session. |
boolean |
isOnServer()
Indicates if the session is running on a server. |
boolean |
isValid()
Indicates whether an instantiated Session object is still valid. |
(package private) static java.lang.String |
parseLocationNoteId(java.lang.String locationValue)
Extracts the note-id of the current location from a location value as used in the file notes.ini . |
DBase |
resolve(java.lang.String url)
Returns the Domino object that a URL addresses. |
void |
setEnvironmentString(java.lang.String name,
java.lang.String value)
Sets the value of an environment variable. |
void |
setEnvironmentString(java.lang.String name,
java.lang.String value,
boolean isSystem)
Sets the value of a string environment variable. |
void |
setTimeZone(java.util.TimeZone zone)
Sets the time zone of calendar instances that are created by domingo. |
java.lang.String |
toString()
Returns a short description of an instance. |
Methods inherited from class de.bea.domingo.monitor.AbstractMonitorEnabled |
---|
getMonitor, setMonitor |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.bea.domingo.DBase |
---|
equals, hashCode |
Method Detail |
---|
public static DSession getInstance(NotesProxyFactory theFactory, lotus.domino.Session theSession, DNotesMonitor monitor)
theFactory
- the controlling factorytheSession
- the Notes Sessionmonitor
- the monitor
public InternationalProxy getInternational()
public boolean isOnServer()
isOnServer
in interface DSession
true
if the program is running on a server, false
if the program is running
on a workstation
Usage
A remote (IIOP) session always runs on a server.
A local session is running on a server if it is an agent in a server- based database, and the agent has one of the following triggers:
All other programs run on a workstation.
DSession.isOnServer()
public DDatabase getDatabase(java.lang.String serverName, java.lang.String databaseName) throws DNotesException
getDatabase
in interface DSession
serverName
- notes server namedatabaseName
- notes database filename
DNotesException
- if the database cannot be openedDSession.getDatabase(java.lang.String, java.lang.String)
public java.lang.String toString()
DBase
toString
in interface DBase
toString
in class java.lang.Object
Object.toString()
public java.lang.String getUserName()
getUserName
in interface DSession
DSession.getUserName()
public DDatabase createDatabase(java.lang.String serverName, java.lang.String databaseName)
createDatabase
in interface DSession
serverName
- notes server namedatabaseName
- notes database filename
DSession.createDatabase(java.lang.String, java.lang.String)
public java.lang.String getCommonUserName()
Example:
Kurt Riede
getCommonUserName
in interface DSession
DSession.getCommonUserName()
public java.lang.String getCanonicalUserName()
Example:
Kurt Riede/Development/BEAP
getCanonicalUserName
in interface DSession
DSession.getCanonicalUserName()
public java.util.List evaluate(java.lang.String formula) throws DNotesException
If the formula contains the name of a field, you must use the
2-parameter method. The formula takes the field from the document
specified as the doc
parameter.
0x0040Functions that affect the user interface do not work in evaluate. These include: 0x0040Command, 0x0040DbManager, 0x0040DbName, 0x0040DbTitle, 0x0040DDEExecute, 0x0041DDEInitiate, 0x0040DDEPoke, 0x0040DDETerminate, 0x0040DialogBox, 0x0040PickList, 0x0040PostedCommand, 0x0040Prompt, and 0x0040ViewTitle.
You cannot change a document with evaluate; you can only get a result. To change a document, write the result to the document with a method such as Document.replaceItemValue.
evaluate
in interface DSession
formula
- The formula
null
if an error
occurred. A scalar result is returned as the first element.
DNotesException
- if an error occurs during evaluation of the formulaDSession.evaluate(java.lang.String)
public java.util.List evaluate(java.lang.String formula, DBaseDocument doc) throws DNotesException
If the formula contains the name of a field, the formula takes the
field from the document specified as the doc
parameter.
0x0040Functions that affect the user interface do not work in evaluate. These include: 0x0040Command, 0x0040DbManager, 0x0040DbName, 0x0040DbTitle, 0x0040DDEExecute, 0x0041DDEInitiate, 0x0040DDEPoke, 0x0040DDETerminate, 0x0040DialogBox, 0x0040PickList, 0x0040PostedCommand, 0x0040Prompt, and 0x0040ViewTitle.
You cannot change a document with evaluate; you can only get a result. To change a document, write the result to the document with a method such as Document.replaceItemValue.
evaluate
in interface DSession
formula
- The formuladoc
- optional document as context for formula
null
if an error
occurred. A scalar result is returned as the first element.
DNotesException
- if an error occurs during evaluation of the formulaDSession.evaluate(java.lang.String, de.bea.domingo.DBaseDocument)
public java.lang.String getEnvironmentString(java.lang.String name)
Usage
This method retrieves the environment variable from the NOTES.INI file
for the current session.
The method prepends "$" to the name before retrieving its value.
getEnvironmentString
in interface DSession
name
- the name of the environment variable
DSession.getEnvironmentString(java.lang.String)
public java.lang.Object getEnvironmentValue(java.lang.String name)
Usage
This method retrieves the environment variable from the NOTES.INI file
for the current session.
The method prepends "$" to the name before retrieving its value.
Do not use this method for string values.
getEnvironmentValue
in interface DSession
name
- the name of the environment variable to get.
DSession.getEnvironmentValue(java.lang.String)
public java.lang.String getEnvironmentString(java.lang.String name, boolean isSystem)
Usage
This method retrieves the environment variable from the NOTES.INI file
for the current session.
getEnvironmentString
in interface DSession
name
- the name of the environment variableisSystem
- If true
, the method uses the exact name of the
environment variable. If false or omitted, the method
prepends "$" to the name before retrieving its value.
DSession.getEnvironmentString(java.lang.String, boolean)
public java.lang.Object getEnvironmentValue(java.lang.String name, boolean isSystem)
Usage
This method retrieves the environment variable from the NOTES.INI file
for the current session.
Do not use this method for string values.
getEnvironmentValue
in interface DSession
name
- the name of the environment variable to get.isSystem
- If true
, the method uses the exact name of the
environment variable. If false or omitted, the method
prepends "$" to the name before retrieving its value.
DSession.getEnvironmentValue(java.lang.String, boolean)
public void setEnvironmentString(java.lang.String name, java.lang.String value)
The method prepends "$" to the name before retrieving its value.
setEnvironmentString
in interface DSession
name
- the name of the environment variablevalue
- The value of the environment variable.DSession.setEnvironmentString(java.lang.String, java.lang.String)
public void setEnvironmentString(java.lang.String name, java.lang.String value, boolean isSystem)
setEnvironmentString
in interface DSession
name
- the name of the environment variablevalue
- The value of the environment variable.isSystem
- If true
, the method uses the exact name of the
environment variable. If false or omitted, the method
prepends "$" to the name before retrieving its value.DSession.setEnvironmentString(java.lang.String, java.lang.String, boolean)
public DLog createLog(java.lang.String name)
createLog
in interface DSession
name
- a name that identifies the log
DSession.createLog(java.lang.String)
public java.util.List getAddressBooks()
Usage
To find out if an address book is a Domino Directory or a Personal
Address Book, use DDatabase.isPublicAddressBook()
and DDatabase.isPrivateAddressBook()
of
DDatabase
.
If the program runs on a workstation, both Domino Directories and Personal Address Books are included. If the program runs on a server or through remote (IIOP) calls, only Domino Directories on the server are included.
A database retrieved through getAddressBooks is closed.
The following Database methods are available on the closed database:
DDatabase.getFileName()
,
DDatabase.getFilePath()
,
DDatabase.isOpen()
,
DDatabase.isPrivateAddressBook()
,
DDatabase.isPublicAddressBook()
,
DDatabase.getSession()
, and
DDatabase.getServer()
.
To access all other properties and methods, you must explicitly open
the database. See DDatabase.open()
in
DDatabase
.
getAddressBooks
in interface DSession
DSession.getAddressBooks()
public java.lang.String getAbbreviatedName(java.lang.String canonicalName)
The canonical format for storing hierarchical names displays the
hierarchical attribute of each component of the name.
Example: CN=Kurt Riede/OU=Development/O=BEAP
where:
CN is the common name
OU is the organizational unit
O is the organization
C is the country code
The abbreviated format of the example above is Kurt Riede/Development/BEAP.
getAbbreviatedName
in interface DSession
canonicalName
- a name in canonical form
DSession.getAbbreviatedName(java.lang.String)
public java.lang.String getCanonicalName(java.lang.String abreviatedName)
The canonical format for storing hierarchical names displays the
hierarchical attribute of each component of the name.
Example: CN=Kurt Riede/OU=Development/O=BEAP
where:
CN is the common name
OU is the organizational unit
O is the organization
C is the country code
The abbreviated format of the example above is Kurt Riede/Development/BEAP.
getCanonicalName
in interface DSession
abreviatedName
- a name in abbreviated form
DSession.getCanonicalName(java.lang.String)
public DAgentContext getAgentContext()
getAgentContext
in interface DSession
DSession.getAgentContext()
public java.util.Calendar getCurrentTime()
If using IIOP or running as a server agent, the server date/time is returned. If running on the client, the date/time of the client is returned.
getCurrentTime
in interface DSession
DSession.getCurrentTime()
public boolean isValid()
isValid
in interface DSession
DSession.isValid()
public java.lang.String getNotesVersion()
getNotesVersion
in interface DSession
DSession.getNotesVersion()
public java.lang.String getPlatform()
possible values:
Value | Platform |
---|---|
"Macintosh" | Macintosh |
"MS-DOS" | MS-DOS |
"Netware" | NetWare |
"OS/2v1" | OS/2� 16-bit |
"OS/2v2" | OS/2 32-bit |
"OS/400" | OS/400 |
"Windows/16" | Windows 16-bit |
"Windows/32" | Windows 32-bit |
"UNIX" | UNIX (Sun, SCO, AIX�) |
getPlatform
in interface DSession
DSession.getPlatform()
public DDxlExporter createDxlExporter() throws DNotesException
createDxlExporter
in interface DSession
DNotesException
- if the DxlExporter object cannot be createdDSession.createDxlExporter()
public java.lang.String getMailServer()
The two methods getMailServer()()
and getMailDatabaseName()()
are synchronized to prevent double-reading of mail information. The field
fMailInfoMutex
is used as the locking mutex.
getMailServer
in interface DSession
DSession.getMailServer()
public java.lang.String getMailDatabaseName()
The two methods getMailServer()()
and getMailDatabaseName()()
are synchronized to prevent double-reading of mail information. The field
mailServer
is used as the locking mutex.
getMailDatabaseName
in interface DSession
DSession.getMailDatabaseName()
public DDatabase getMailDatabase() throws DNotesException
getMailDatabase
in interface DSession
DNotesException
- if the mail database cannot be opened or, in case
of a remote session, is not on the current serverDSession.getMailDatabase()
public DDatabase getMailDatabase(java.lang.String username) throws DNotesException
The mail server of the current user is used as registration server.
getMailDatabase
in interface DSession
username
- username
DNotesException
- if the mail database cannot be opened or, in case
of a remote session, is not on the current serverDSession.getMailDatabase()
,
DSession.getMailDatabase(String)
public java.lang.String getMailDomain()
getMailDomain
in interface DSession
DSession.getMailDomain()
public DBase resolve(java.lang.String url)
The general forms of URLs that address Domino objects are as follows:
protocol://host/database?OpenDatabase
protocol://host/database/view?OpenView
protocol://host/database/form?OpenForm
protocol://host/database/document?OpenDocument
protocol://host/database/agent?OpenAgent
For local calls, the protocol is "notes" and the host is empty so that the URL starts with "notes:///" ("notes," colon, and three slashes).
The database can be specified by name or replica ID. The name can include spaces (you can substitute plus signs for the spaces but it is not necessary). The name need not include the type suffix if it is NSF. The replica ID can be specified as the 16-digit ID by itself or the 16-digit ID prefixed by two underscores and suffixed by the file type (for example, NSF).
The view, form, document, or agent can be specified by name, universal ID, or note ID (not recommended because note IDs change between replicas).
The action (following the question mark) must be specified.
You can use getURL to specify the URL.
resolve
in interface DSession
url
- a URL that addresses a Domino object
DSession.resolve(String)
static java.lang.String parseLocationNoteId(java.lang.String locationValue)
notes.ini
.
The note-id is between the last two commas in the string.
Example from notes.ini: Location=Office (Network),9EA,CN=Kurt Riede/O=acme
locationValue
-
public java.lang.String getServerName()
getServerName
in interface DSession
DSession.getServerName()
public void setTimeZone(java.util.TimeZone zone)
setTimeZone
in interface DSession
zone
- the time zoneDSession.setTimeZone(java.util.TimeZone)
public java.util.TimeZone getTimeZone()
getTimeZone
in interface DSession
DSession.getTimeZone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |