Oracle

com.compoze.domino
Class Session

java.lang.Object
  extended by com.compoze.domino.Session
All Implemented Interfaces:
java.io.Serializable

public class Session
extends java.lang.Object
implements java.io.Serializable

This class represents a session to the Compoze Domino Service. The session can connect to the service using any implemented protocol.

Methods names that begin with the string server (as well as the close method) require a query to the server to be completed. Because each query involves some overhead, keeping the number of queries to a minimum and doing as much as possible in one query will improve the performance of the application.

See Also:
Serialized Form

Field Summary
static java.lang.String PROP_DOMINO_AUTH_COOKIE_NAME
          Session cookie name
static java.lang.String PROP_DOMINO_AUTH_COOKIE_VALUE
          Session cookie value
static java.lang.String PROP_DOMINO_AUTH_DATA_NAME
          Session data cookie name
static java.lang.String PROP_DOMINO_AUTH_DATA_VALUE
          Session data cookie value
static java.lang.String PROP_DOMINO_ENCRYPTION_SUPPORT
          The flag to check for encryption, decryption, and signing support for domino.
static java.lang.String PROP_DOMINO_KEYFILE_PATH
          The full path including file name of the user id to use for encryption support.
static java.lang.String PROP_DOMINO_LOOKUP_SERVER
          The name of a machine in the Notes domain that will be used to lookup the specified user's mailbox information, such as database and server name to connect to (optional, leave blank to use the same machine as the Domino Service).
static java.lang.String PROP_DOMINO_MAILBOX
          The name of a mailbox to connect to (optional).
static java.lang.String PROP_DOMINO_SERVICE_REDIRECT
          The flag to use service redirect.
static java.lang.String PROP_DOMINO_VERSION_CHECK
          The flag to check for version conflict between the connector and the service.
static java.lang.String PROP_PROXY_PASSWORD
          The password used to log into the proxy server (optional).
static java.lang.String PROP_PROXY_URL
          The hostname of the proxy server as it can be resolved from the machine you are running this exerciser on.
static java.lang.String PROP_PROXY_USERNAME
          The username used to log into the proxy server (optional).
static java.lang.String PROP_SERVICE_URL
          The hostname of the Compoze Domino Service machine as it can be resolved from the machine you are running this exerciser on (required).
static java.lang.String PROP_SOCKET_TIMEOUT_MS
          Session data cookie value
static java.lang.String PROP_USER_PASSWORD
          The Internet password of the user that will access the Domino mailbox (required).
static java.lang.String PROP_USER_USERNAME
          The username of the user that will access the Domino mailbox (required).
 
Constructor Summary
Session(java.util.Properties connectionProps)
          Constructor.
 
Method Summary
 void close()
          Closes the session to the Domino server.
 java.lang.String endTrace()
          Ends tracing calls to the server and returns a string showing all calls that were made since tracing was started.
 AddressBooks getAddressBooks()
          Gets an instance of a class used to manipulate address books for the session.
 long getAttachmentSizeLimit()
          Gets the attachment size limit (in bytes).
 double getAttachmentSizeLimitInKilos()
          Gets the attachment size limit (in kilosbytes).
 Documents getDocuments()
          Gets an instance of a class used to manipulate documents for the session.
 Folders getFolders()
          Gets an instance of a class used to manipulate folders for the session.
 java.lang.String getID()
          Gets a unique ID for the session (only unique to the server the session is connected to).
 java.lang.String getMailbox()
          Gets the mailbox for the session.
 java.lang.String getServiceURL()
          Gets the Compoze Domino Service URL for the session.
 java.util.TimeZone getTimeZone()
          Gets the time zone for this session.
 UserInfo getUserInfo()
          Gets the user info for the session.
 void serverCheck()
          Hits the server and checks if the session has expired.
 void serverDisableOutOfOfficeAgent()
          Hits the server to disable the out of office agent.
 void serverEnableOutOfOfficeAgent()
          Hits the server to enable the out of office agent.
 FreeBusy serverGetFreeBusy(java.lang.String sFullName, java.util.Date startDate, java.util.Date endDate, int iFreeBusyInterval)
          Gets the free/busy information for the specified dates.
 MailboxQuota serverGetMailboxQuota()
          Hits the server to get the mailbox quota.
 OutOfOfficeProfile serverGetOutOfOfficeProfile(PropertyKey[] keys)
          Queries the server to get the default OutOfOffice profile from the server.
 Profile serverGetProfile(java.lang.String sProfileName, java.lang.String sProfileUser, PropertyKey[] keys)
          Queries the server to get the profile from the server.
 void setAuthorizationValue(java.lang.String[][] sCookies)
          Updates the session authorization cookies.
 void setAuthorizationValue(java.lang.String sName, java.lang.String sValue)
          Updates the session authorization cookie.
 void setTimeZone(java.util.TimeZone timeZone)
          Sets the time zone for this session.
 void startTrace()
          Starts tracing calls to the server (verbose).
 void startTrace(boolean bVerbose)
          Starts tracing calls to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SERVICE_URL

public static final java.lang.String PROP_SERVICE_URL
The hostname of the Compoze Domino Service machine as it can be resolved from the machine you are running this exerciser on (required). The hostname can be either a machine name or IP address. This is also referred to as the Domino/Notes Service Host Name.

See Also:
Constant Field Values

PROP_USER_USERNAME

public static final java.lang.String PROP_USER_USERNAME
The username of the user that will access the Domino mailbox (required).

See Also:
Constant Field Values

PROP_USER_PASSWORD

public static final java.lang.String PROP_USER_PASSWORD
The Internet password of the user that will access the Domino mailbox (required).

See Also:
Constant Field Values

PROP_DOMINO_MAILBOX

public static final java.lang.String PROP_DOMINO_MAILBOX
The name of a mailbox to connect to (optional).

See Also:
Constant Field Values

PROP_PROXY_URL

public static final java.lang.String PROP_PROXY_URL
The hostname of the proxy server as it can be resolved from the machine you are running this exerciser on. The hostname can be either a machine name or an IP address.

See Also:
Constant Field Values

PROP_PROXY_USERNAME

public static final java.lang.String PROP_PROXY_USERNAME
The username used to log into the proxy server (optional).

See Also:
Constant Field Values

PROP_PROXY_PASSWORD

public static final java.lang.String PROP_PROXY_PASSWORD
The password used to log into the proxy server (optional).

See Also:
Constant Field Values

PROP_DOMINO_VERSION_CHECK

public static final java.lang.String PROP_DOMINO_VERSION_CHECK
The flag to check for version conflict between the connector and the service.

See Also:
Constant Field Values

PROP_DOMINO_ENCRYPTION_SUPPORT

public static final java.lang.String PROP_DOMINO_ENCRYPTION_SUPPORT
The flag to check for encryption, decryption, and signing support for domino.

See Also:
Constant Field Values

PROP_DOMINO_KEYFILE_PATH

public static final java.lang.String PROP_DOMINO_KEYFILE_PATH
The full path including file name of the user id to use for encryption support.

See Also:
Constant Field Values

PROP_DOMINO_SERVICE_REDIRECT

public static final java.lang.String PROP_DOMINO_SERVICE_REDIRECT
The flag to use service redirect.

See Also:
Constant Field Values

PROP_DOMINO_AUTH_COOKIE_NAME

public static final java.lang.String PROP_DOMINO_AUTH_COOKIE_NAME
Session cookie name

See Also:
Constant Field Values

PROP_DOMINO_AUTH_COOKIE_VALUE

public static final java.lang.String PROP_DOMINO_AUTH_COOKIE_VALUE
Session cookie value

See Also:
Constant Field Values

PROP_DOMINO_AUTH_DATA_NAME

public static final java.lang.String PROP_DOMINO_AUTH_DATA_NAME
Session data cookie name

See Also:
Constant Field Values

PROP_DOMINO_AUTH_DATA_VALUE

public static final java.lang.String PROP_DOMINO_AUTH_DATA_VALUE
Session data cookie value

See Also:
Constant Field Values

PROP_SOCKET_TIMEOUT_MS

public static final java.lang.String PROP_SOCKET_TIMEOUT_MS
Session data cookie value

See Also:
Constant Field Values

PROP_DOMINO_LOOKUP_SERVER

public static final java.lang.String PROP_DOMINO_LOOKUP_SERVER
The name of a machine in the Notes domain that will be used to lookup the specified user's mailbox information, such as database and server name to connect to (optional, leave blank to use the same machine as the Domino Service). This is also referred to as the Domino Catalog Host Name.

See Also:
Constant Field Values
Constructor Detail

Session

public Session(java.util.Properties connectionProps)
        throws DominoException
Constructor.

Note: DominoACLException is thrown if the specified user and password credentials do not have adequate permission to access the specified mailbox.

Note: UserPasswordException is thrown if the user and/or password is incorrect.

Note: NoMailboxException is thrown if the user's mailbox does not exist. This could be due to the user not having a Notes mailbox.

Parameters:
connectionProps - the connection properties to authenticate against Domino (see PROP_ constants)
Throws:
DominoException - occurs if an exception occurs while connecting to Domino
Method Detail

getFolders

public Folders getFolders()
Gets an instance of a class used to manipulate folders for the session.

Returns:
the class used to manipulate folders

getDocuments

public Documents getDocuments()
Gets an instance of a class used to manipulate documents for the session.

Returns:
the class used to manipulate documents

getTimeZone

public java.util.TimeZone getTimeZone()
Gets the time zone for this session.

Returns:
the time zone

setTimeZone

public void setTimeZone(java.util.TimeZone timeZone)
Sets the time zone for this session.

Parameters:
timeZone - the time zone (may not be null)

getAddressBooks

public AddressBooks getAddressBooks()
Gets an instance of a class used to manipulate address books for the session.

Returns:
the class used to manipulate address books

getID

public java.lang.String getID()
                       throws DominoException
Gets a unique ID for the session (only unique to the server the session is connected to).

Returns:
the ID
Throws:
DominoException

getAttachmentSizeLimit

public long getAttachmentSizeLimit()
Gets the attachment size limit (in bytes).

Returns:
the attachment size limit (in bytes) or 0 for no limit

getAttachmentSizeLimitInKilos

public double getAttachmentSizeLimitInKilos()
Gets the attachment size limit (in kilosbytes).

Returns:
the attachment size limit (in kilosbytes) or 0 for no limit

getMailbox

public java.lang.String getMailbox()
Gets the mailbox for the session.

Returns:
the mailbox
See Also:
PROP_DOMINO_MAILBOX

getUserInfo

public UserInfo getUserInfo()
Gets the user info for the session.

Returns:
the user info

getServiceURL

public java.lang.String getServiceURL()
Gets the Compoze Domino Service URL for the session.

Returns:
the service URL
See Also:
PROP_SERVICE_URL

close

public void close()
           throws DominoException
Closes the session to the Domino server.

Throws:
DominoException

serverCheck

public void serverCheck()
                 throws DominoException
Hits the server and checks if the session has expired.

Throws:
DominoException - occurs if the session has expired

serverGetMailboxQuota

public MailboxQuota serverGetMailboxQuota()
                                   throws DominoException
Hits the server to get the mailbox quota.

Returns:
the mailbox quota
Throws:
DominoException
See Also:
MailboxQuota

serverEnableOutOfOfficeAgent

public void serverEnableOutOfOfficeAgent()
                                  throws DominoException
Hits the server to enable the out of office agent. The OutOfOfficeProfile needs to be updated with all the appropriate information prior to calling this function.

Throws:
DominoException - if a problem occurred while connecting to or interacting with the Compoze Domino Service
See Also:
serverGetOutOfOfficeProfile(com.compoze.domino.PropertyKey[]), OutOfOfficeProfile

serverDisableOutOfOfficeAgent

public void serverDisableOutOfOfficeAgent()
                                   throws DominoException
Hits the server to disable the out of office agent.

Throws:
DominoException - if a problem occurred while connecting to or interacting with the Compoze Domino Service
See Also:
serverGetOutOfOfficeProfile(com.compoze.domino.PropertyKey[]), OutOfOfficeProfile

serverGetProfile

public Profile serverGetProfile(java.lang.String sProfileName,
                                java.lang.String sProfileUser,
                                PropertyKey[] keys)
                         throws DominoException
Queries the server to get the profile from the server.

Parameters:
sProfileName - the profile name
sProfileUser - the user name, may be null
keys - the properties to bring back from the profile
Returns:
the profile or null if the arguments are invalid
Throws:
DominoException

serverGetOutOfOfficeProfile

public OutOfOfficeProfile serverGetOutOfOfficeProfile(PropertyKey[] keys)
                                               throws DominoException
Queries the server to get the default OutOfOffice profile from the server.

Parameters:
keys - the properties to bring back from the profile
Returns:
the OutOfOfficeProfile or null if the not found
Throws:
DominoException

startTrace

public void startTrace()
Starts tracing calls to the server (verbose).


startTrace

public void startTrace(boolean bVerbose)
Starts tracing calls to the server.

Parameters:
bVerbose - if true, trace data sent and received, otherwise just trace elapsed time and number of requests

endTrace

public java.lang.String endTrace()
Ends tracing calls to the server and returns a string showing all calls that were made since tracing was started.

Returns:
a string showing information about all queries that were made since startTrace() was called

serverGetFreeBusy

public FreeBusy serverGetFreeBusy(java.lang.String sFullName,
                                  java.util.Date startDate,
                                  java.util.Date endDate,
                                  int iFreeBusyInterval)
                           throws DominoException
Gets the free/busy information for the specified dates.

Note: The start date must be before the end date. If not, the dates are swapped.

Parameters:
sFullName - the full name of the person (may not be null)
startDate - the start date for the free/busy search (inclusive) (may not be null)
endDate - the end date for the free/busy search (exclusive) (may not be null)
iFreeBusyInterval - the free/busy interval (minutes)
Returns:
the free/busy information
Throws:
DominoException

setAuthorizationValue

public void setAuthorizationValue(java.lang.String[][] sCookies)
Updates the session authorization cookies. Overwrites any previous cookies stored.

Parameters:
sCookies - two dimensional array of name/value pairs for the authorization cookie

setAuthorizationValue

public void setAuthorizationValue(java.lang.String sName,
                                  java.lang.String sValue)
Updates the session authorization cookie. Overwrites any previous cookies stored.

Parameters:
sName - name of the cookie to set
sValue - value of the cookie to set

Oracle

Copyright ©1999-2008 Oracle All rights reserved.