FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface Session

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Session

public interface Session
extends java.io.Serializable

A Session object contains information, such as configuration options and credentials, needed to execute an operation on the Content Services server. This base interface defines methods for setting and retrieving session configuration settings and credentials information.

See Also:
CS Java Toolkit Developer's Guide

Field Summary
static java.lang.String APPID
          Key for the application ID in the HashMap returned by fromToken.
static java.lang.String AUTHENTICATION_HEADER_NAME
          A String representing the name of the HTTP header field used to send credentials to the Content Services server.
static java.lang.String CLEAR
          A String representing a credentials protection level of "Clear" (no encryption).
static java.lang.String DATETIME
          Key for the date/time stamp in the HashMap returned by fromToken.
static java.lang.String DEFAULT
          A String representing a credentials protection level of null.
static java.lang.String LOCALE
          Key for the locale in the HashMap returned by fromToken.
static java.lang.String PASSWORD
          Key for the password in the HashMap returned by fromToken.
static java.lang.String SYMMETRIC
          A String representing a credentials protection level of "Symmetric" (encryption).
static java.lang.String USERID
          Key for the user ID in the HashMap returned by fromToken.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares two Session objects for logical equivalence.
 BatchResultItems executeBatch()
          

Not Implemented in CS Java Connector v3.0.

 java.util.HashMap fromToken(java.lang.String token)
          Returns the constituent keyword/value pairs of a credentials token in a Java HashMap object.
 java.util.HashMap fromToken(java.lang.String token, long toleranceSeconds)
          

Not Implemented in CS Java Connector v3.0.

 int getBatchItemCount()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getCredentialsProtectionScheme()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getProxyHost()
          

Not Implemented in CS Java Connector v3.0.

 int getProxyPort()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getRemoteServerDownloadUrl()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getRemoteServerUploadUrl()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getRemoteServerUrl()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getToken()
          Returns a String representing a credentials token in the same format as it would be sent when connecting to the Content Services server.
 java.lang.String getToken(boolean withPrecompensation)
          

Not Implemented in CS Java Connector v3.0.

 int hashCode()
          Returns an integer for the hash code for this Session object.
 boolean isInBatch()
          

Not Implemented in CS Java Connector v3.0.

 void resumeBatch(java.lang.Object context)
          

Not Implemented in CS Java Connector v3.0.

 void setBatchItemDiscardResults(boolean discardResults)
          

Not Implemented in CS Java Connector v3.0.

 void setBatchItemLabel(java.lang.String label)
          

Not Implemented in CS Java Connector v3.0.

 void setConfiguration(java.io.InputStream configStream)
          Provides the Session object with a java.io.InputStream from which to read configuration information (when needed).
 void setLocale(java.util.Locale locale)
          Sets the locale to be used on the Content Services server for localization of message text.
 void setPassword(java.lang.String password)
          Sets the logon password for the user ID.
 void setProxyHost(java.lang.String proxyHost)
          

Not Implemented in CS Java Connector v3.0.

 void setProxyPort(int proxyPort)
          

Not Implemented in CS Java Connector v3.0.

 void setRemoteServerDownloadUrl(java.lang.String remoteServerDownloadUrl)
          

Not Implemented in CS Java Connector v3.0.

 void setRemoteServerUploadUrl(java.lang.String remoteServerUploadUrl)
          

Not Implemented in CS Java Connector v3.0.

 void setRemoteServerUrl(java.lang.String remoteServerUrl)
          

Not Implemented in CS Java Connector v3.0.

 void setTransportHeaders(java.util.Hashtable headers)
          

Not Implemented in CS Java Connector v3.0.

 void setUserid(java.lang.String userid)
          Sets the user ID that will be used for any Content Services server operations.
 void startBatch(boolean asTransaction, boolean discardResults, boolean stopOnException)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.Object suspendBatch()
          

Not Implemented in CS Java Connector v3.0.

 User verify()
          

Not Implemented in CS Java Connector v3.0.

 

Field Detail

APPID

public static final java.lang.String APPID
Key for the application ID in the HashMap returned by fromToken.

See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
Key for the password in the HashMap returned by fromToken.

See Also:
Constant Field Values

USERID

public static final java.lang.String USERID
Key for the user ID in the HashMap returned by fromToken.

See Also:
Constant Field Values

DATETIME

public static final java.lang.String DATETIME
Key for the date/time stamp in the HashMap returned by fromToken. Multiply by 1000 to convert to the current time. For example:
Date d = new Date(1000 * new Long(dateTimeStampString));

See Also:
Constant Field Values

LOCALE

public static final java.lang.String LOCALE
Key for the locale in the HashMap returned by fromToken.

See Also:
Constant Field Values

AUTHENTICATION_HEADER_NAME

public static final java.lang.String AUTHENTICATION_HEADER_NAME
A String representing the name of the HTTP header field used to send credentials to the Content Services server. The Java Connector communicates with the Content Services via structured HTTP requests. Credentials information is sent to the Content Services server as an HTTP header field. Most applications do not need the credentials information. However, if you are setting up custom HTTP proxies, this information is useful for defining the HTTP header that contains the credentials information.

See Also:
Constant Field Values

CLEAR

public static final java.lang.String CLEAR
A String representing a credentials protection level of "Clear" (no encryption).

See Also:
Constant Field Values

SYMMETRIC

public static final java.lang.String SYMMETRIC
A String representing a credentials protection level of "Symmetric" (encryption).

See Also:
Constant Field Values

DEFAULT

public static final java.lang.String DEFAULT
A String representing a credentials protection level of null. This setting causes the default credentials protection setting to be read from the configuration file, WcmApiConfig.properties.

Method Detail

setUserid

public void setUserid(java.lang.String userid)
Sets the user ID that will be used for any Content Services server operations. If your application does not supply a user ID for the session, Content Services server operations are performed as an anonymous user. The anonymous user's ID is created by the site administrator. In standard configurations, the anonymous user typically has limited privileges, so it is recommended that applications supply a user ID.

Parameters:
userid - A String representing the user ID that will be used to perform operations on the Content Services server.

setPassword

public void setPassword(java.lang.String password)
Sets the logon password for the user ID. If you pass an empty string or null to the method, the password is set to the equivalent of "no password for this user ID."

Parameters:
password - A String representing the password for the user ID. Can be an empty string or null.

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale to be used on the Content Services server for localization of message text. The argument to this method is a Java Locale object.

A Locale object represents a specific geographical, political, or cultural region. When performing operations for which the results are to be displayed in the user's native language, create a Locale object and specify parameters for language and country. When you call setLocale on the Session object, pass in the Locale object. As a result, error information and messages generated for the session are localized to the language specified in the Locale object.

If you do not set a locale, the default locale for the Java virtual machine is used.

Parameters:
locale - A Java Locale object that identifies the language and country to be used for localization of session-related error information.

getToken

public java.lang.String getToken()
Returns a String representing a credentials token in the same format as it would be sent when connecting to the Content Services server.

The CS Java Connector generates a new credentials token each time it contacts the Content Services server. The CS Java Connector timestamps each new token on the application server. The token is invalidated when the credentials timeout value expires. For this reason, if your application is using symmetric credentials protection, you should not cache credentials tokens. (The timeout value is specified as part of the Content Services server configuration and defaults to 60 seconds. The CS Java Connector compensates for time differences between the client (Application Engine) and the Content Services server.)

You can call fromToken(), passing in the String returned from getToken(), to extract information from the credentials token. For example, you could extract the user ID for validation as part of another security mechanism employed for your environment.

Returns:
A String representing a credentials token.

getToken

public java.lang.String getToken(boolean withPrecompensation)

Not Implemented in CS Java Connector v3.0.

Returns a String representing a credentials token (with or without timestamp precompensation) in the same format as it would be sent when connecting to the Content Services server.

The Content Services Java Connector generates a new credentials token each time it contacts the Content Services server. The Content Services Java Connector timestamps each new token on the application server. The token is invalidated when the credentials timeout value expires. For this reason, if your application is using symmetric credentials protection, you should not cache credentials tokens.

The timeout value is specified as part of the Content Services server configuration and defaults to 60 seconds. The Content Services Java Connector automatically compensates for time differences between the client (Application Engine) and the Content Engine. If you do not want to use timestamp precompensation, disable it by setting the withPrecompensation parameter to false.

Note that the Content Services's timeout value only applies when tokens are used internally for network round-trips. It does not apply when callers specify their own tolerance values with the toleranceSeconds parameter of the fromToken method. If you call fromToken on the Application Engine, the time differences between the Content Services and the Application Engine are irrelevant and you can disable timestamp precompensation.

Timestamp precompensation is only relevant if you are using symmetric encryption. However, this method also operates on unencrypted tokens (that is, a credentials protection scheme of Session.CLEAR was specified for this Session object). In this case, the timestamp (whether precompensated or not) is ignored by a subsequent fromToken call.

To extract information from the credentials token, you can call fromToken(token) or fromToken(token, toleranceSeconds), passing in the String returned from the getToken method. For example, you could extract the user ID for validation as part of another security mechanism employed for your environment.

Parameters:
withPrecompensation - true if you want timestamp precompensation; otherwise, false. Note that setting the value to true is equivalent to calling getToken().

Returns:
A String representing a credentials token.

fromToken

public java.util.HashMap fromToken(java.lang.String token)
                            throws CannotDetokenizeException
Returns the constituent keyword/value pairs of a credentials token in a Java HashMap object. If the credentials token uses symmetric encryption, decryption is attempted, and the results will be the constituent pairs of the decrypted token.

To retrieve a String that represents the credentials token that you will pass to this method, call getToken(). Use the HashMap.get() method to retrieve data from the HashMap returned by fromToken.

Parameters:
token - A String representing the credentials token.

Returns:
A java.util.HashMap in which each entry maps a credentials token keyword/value pair to a HashMap key and value.

Throws:
CannotDetokenizeException - Thrown if a problem occurs when parsing a token or when decrypting an encrypted token. (This can occur, for example, when the appropriate cryptographic key cannot be found or when the encryption appears to have failed.)

fromToken

public java.util.HashMap fromToken(java.lang.String token,
                                   long toleranceSeconds)
                            throws CannotDetokenizeException

Not Implemented in CS Java Connector v3.0.

Returns a Java HashMap object that contains the constituent keyword/value pairs of a credentials token whose timestamp is within a specified window of time. The window is defined as the current time +/- a specified number of seconds. Specify the number of seconds in the method's toleranceSeconds parameter.

Current time is the time on the machine on which this method call is made. If the token was generated on a different machine, fromToken is unaware of clock differences between the two machines. The caller must take this into account when working with such tokens.

This method is useful to decrypt an encrypted token and to determine if it is stale. The method compares the timestamp within the token to the current time. If the credentials token uses symmetric encryption, this method attempts decryption and determines if the token's timestamp is within the window. If so, the method returns the constituent keyword/value pairs of the decrypted token. If the timestamp is outside the window, the method throws an exception indicating that the token date stamp is outside the acceptable range. Note that this method also operates on unencrypted tokens (that is, a credentials protection scheme of Session.CLEAR was specified for this Session object). In this case, the toleranceSeconds parameter is ignored.

To determine the credentials protection scheme for this Session object, call getCredentialsProtectionScheme(). To retrieve a String that represents the credentials token that you will pass to this method, call either getToken() or getToken(withPrecompensation). Use the HashMap.get() method to retrieve data from the HashMap returned by fromToken.

Set the toleranceSeconds parameter to a value that represents the number of seconds to use as the tolerance range for comparing the token timestamp against the current time.

Parameters:
token - A String representing the credentials token.

toleranceSeconds - A tolerance value in seconds. This parameter is ignored if its value is less than zero (0) or if the token is not encrypted. Note especially that a value of zero (0) is not ignored and implies an exact match of the token's timestamp to the current time.

Returns:
A java.util.HashMap in which each entry maps a credentials token keyword/value pair to a HashMap key and value.
Throws:
CannotDetokenizeException - Thrown if a problem occurs when parsing a token or when decrypting an encrypted token. This can occur, for example, when the timestamp within the encrypted token is outside the window defined by toleranceSeconds, when the appropriate cryptographic key cannot be found, or when the encryption appears to have failed.

See Also:
fromToken(token)

verify

public User verify()

Not Implemented in CS Java Connector v3.0.

Although the CS Java Connector will not throw an exception if you call this method, the method does not perform any function.


setRemoteServerUrl

public void setRemoteServerUrl(java.lang.String remoteServerUrl)

Not Implemented in CS Java Connector v3.0.

Sets the URL that will be used to connect to the Content Services server. The URL is normally constructed from a string read from the configuration file, WcmApiConfig.properties. However, you can use this method to override that string. The following code sample explicitly sets the upload and download URLs for the remote Content Services server:
 Session sess = ObjectFactory.getSession("com.example.apps.MyTestApp", null, "tester", null, null);
 sess.setRemoteServerUrl("http://AServer/ApplicationEngine/xcmisasoap.dll");
 sess.setRemoteServerUploadUrl("http://AServer/ApplicationEngine/doccontent.dll");
 sess.setRemoteServerDownloadUrl("http://AServer/ApplicationEngine/doccontent.dll");
 sess.verify();

You will use this method more often when writing applets because applets cannot conveniently access the configuration file.

Parameters:
remoteServerUrl - A String representing the URL for the Java Connector listener. The String is the entire URL including the DLL name, for example, "http://AServer/ApplicationEngine/xcmisasoap.dll".

getRemoteServerUrl

public java.lang.String getRemoteServerUrl()

Not Implemented in CS Java Connector v3.0.

Returns the URL to use to connect to the Content Services server. The returned string is the URL currently known to the Session object. The URL was either read by the Content Java API directly from the configuration file, WcmApiConfig.properties, or was set by explicitly calling setRemoteServerUrl. If the Java Connector has not yet read the configuration file, this method triggers it to do so.

Returns:
A String representing the URL for the Content Services Java Connector listener. The String is the entire URL including the DLL name, for example, "http://AServer/ApplicationEngine/xcmisasoap.dll".

setRemoteServerUploadUrl

public void setRemoteServerUploadUrl(java.lang.String remoteServerUploadUrl)

Not Implemented in CS Java Connector v3.0.

Sets the URL to use to upload document content to the Content Services server. Call this method to set the URL before calling the setContent method on the Document interface. (See setRemoteServerUrl for a code fragment that includes this method.)

Parameters:
remoteServerUploadUrl - A String representing the URL to use when uploading document content to the Content Services server. The String is the entire URL including the DLL name, for example, "http://AServer/ApplicationEngine/doccontent.dll".

getRemoteServerUploadUrl

public java.lang.String getRemoteServerUploadUrl()

Not Implemented in CS Java Connector v3.0.

Returns the URL to be used when uploading document content to the Content Services server.

Returns:
A String representing the URL to use when uploading document content to the Content Services server. The String is the entire URL including the DLL name, for example, "http://AServer/ApplicationEngine/doccontent.dll".

setRemoteServerDownloadUrl

public void setRemoteServerDownloadUrl(java.lang.String remoteServerDownloadUrl)

Not Implemented in CS Java Connector v3.0.

Sets the URL from which to download document content from the Content Services server. Call this method to set the URL before calling the getContent() method on the Document interface. (See setRemoteServerUrl for a code fragment that includes this method.)

Parameters:
remoteServerDownloadUrl - A String representing the URL from which to download document content. The String is the entire URL including the DLL name, for example, "http://AServer/ApplicationEngine/doccontent.dll". Note that the DLL name must be specified in lowercase characters.

getRemoteServerDownloadUrl

public java.lang.String getRemoteServerDownloadUrl()

Not Implemented in CS Java Connector v3.0.

Returns the URL to be used when downloading document content from the Content Services server.

Returns:
A String representing the URL to be used when downloading document content. The String is the entire URL including the DLL name, for example, "http://AServer/ApplicationEngine/doccontent.dll".

setTransportHeaders

public void setTransportHeaders(java.util.Hashtable headers)

Not Implemented in CS Java Connector v3.0.

Sets supplemental HTTP header fields.

Requests from the application server to the Content Services server travel over an HTTP connection. Generally, this is completely transparent to applications. In some special cases (for example, transiting an authenticating proxy, or having a Java applet participate in a JSP session), it may be necessary to send additional HTTP header fields with each request. Call this method to provide a set of supplemental HTTP header fields.

Each time this method is called, the fields passed in the headers argument completely replace any previously-provided set of header fields. Alternatively, since a reference is kept to the application-provided Hashtable, your application can directly update that Hashtable, and its current contents will be used at the time an HTTP transaction is initiated.

Parameters:
headers - A Java Hashtable object that contains the list of application-provided supplemental HTTP header fields. For each entry in the Hashtable, the key is a String giving the header field name without the trailing colon. The corresponding value is the header field value.

setProxyHost

public void setProxyHost(java.lang.String proxyHost)

Not Implemented in CS Java Connector v3.0.

Sets the name of the host to be used as a proxy server.

Interactions between the application server and the Content Services server occur over an HTTP connection. In many environments, the use of a proxy server (a server that acts as a security barrier) between those two endpoints is transparent to the application. However, when the proxy server is non-transparent, there is a difference in the format of the HTTP headers. This method allows you to set the name of the host used by the underlying transport mechanism.

Parameters:
proxyHost - A String representing the name of the host to be used as the proxy server. Setting this to null disables any previously-set value.


setProxyPort

public void setProxyPort(int proxyPort)

Not Implemented in CS Java Connector v3.0.

Sets the port of the host to be used as a proxy server.

Interactions between the application server and the Content Services server occur over an HTTP connection. In many environments, the use of a proxy server (a server that acts as a security barrier) between those two endpoints is transparent to the application. However, when the proxy server is non-transparent, there is a difference in the format of the HTTP headers. This method allows you to set the port used by the underlying transport mechanism.

Parameters:
proxyPort - An integer representing the port number to be used on the proxy server. This is used only if the proxy host has been set to a non-null value. Default value for the port (if this method is never called) is port 80.


getProxyHost

public java.lang.String getProxyHost()

Not Implemented in CS Java Connector v3.0.

Returns the value of a previously-set proxy host value. This method does not perform any proxy server discovery; that is, it does not automatically attempt to determine if a proxy server machine exists nor does it return the proxy server's URL. This method merely returns the value that was set by a setProxyHost call.

Returns:
A String representing the proxy server host name. (May be null, in which case a proxy is not used.)

getProxyPort

public int getProxyPort()

Not Implemented in CS Java Connector v3.0.

Returns the value of a previously-set proxy port value.

Returns:
An integer representing the proxy server port number.

setConfiguration

public void setConfiguration(java.io.InputStream configStream)
Provides the Session object with a java.io.InputStream from which to read configuration information (when needed). If the CS Java Connector has already located and read the WcmApiConfig.properties configuration file, calls to this method are ignored.

Parameters:
configStream - A java.io.InputStream object from which the Session object reads configuration information.

getCredentialsProtectionScheme

public java.lang.String getCredentialsProtectionScheme()

Not Implemented in CS Java Connector v3.0.

Returns a String matching the constant that represents the selected credentials protection scheme. The possible return values are Session.CLEAR or Session.SYMMETRIC.

If you specified null or Session.DEFAULT for the credTag parameter of the getSession method call that created this Session object, this method might read the WcmApiConfig.properties file to retrieve the protection scheme defined for the site. (The method does not read the file if the information is already available from a previous read.)

Returns:
A String containing either Session.CLEAR or Session.SYMMETRIC.

startBatch

public void startBatch(boolean asTransaction,
                       boolean discardResults,
                       boolean stopOnException)

Not Implemented in CS Java Connector v3.0.

Initiates batch activity. This method begins the accumulation of Content Java API methods to be executed, including parameters, into a batch. This method makes no round trips to the Content Services server. Actual execution of the accumulated items in the batch is performed by calling executeBatch().

Batches do not nest, so only one batch accumulation activity can take place at a time. If this Session object is already in a batch, that is, startBatch has been called but executeBatch has not been called, this method throws an exception. (To determine if there is an active batch that is accumulating batch items, call isInBatch()). You can, however, suspend and resume an active batch by calling suspendBatch and resumeBatch, respectively.

By setting the asTransaction parameter to true, you can cause the collection of items in the batch to be performed as a transaction. Transactions do not nest, so if this parameter is true and there is already an active transaction context for this Session object, an exception will be thrown. If asTransaction is false and there is already an active transaction context for the Session object, the executeBatch() method will be part of that already-active transaction.

The discardResults parameter sets the overall default for ignoring the results of individual items in the batch execution. Discarding results can save serialization/deserialization time. You can also explicitly discard the results of the most recent previous item in the batch by calling setBatchItemDiscardResults and passing in true for the discardResults parameter.

The setting of the discardResults parameter, either set by default in the startBatch call or in a setBatchItemDiscardResults call, does not apply if the result is an exception. Exceptions are propagated back even if the caller has chosen to discard results. The exception is not thrown; it is merely available for inspection by the caller (who may then elect to throw it).

Parameters:
asTransaction - If true, indicates that the entire collection of operations is part of a transaction. If no exceptions occur, the transaction is committed. If an exception occurs, the transaction is rolled back. An exception means a condition that would normally result in an exception being thrown if the operations were not part of a batch.
If false, indicates that each operation succeeds or fails independently of other operations and no commit or rollback occurs at the end of execution.

discardResults - If true, result objects that would normally be returned to the caller are simply discarded; if false, result objects are returned.

stopOnException - If true, the remote server halts attempts to perform operations if any one operation returns an exception. An exception in this context means a condition that would normally result in an exception being thrown if the operations were not part of a batch.

Throws:
BatchException - Thrown when the Session object is already in a batch.

executeBatch

public BatchResultItems executeBatch()

Not Implemented in CS Java Connector v3.0.

Sends accumulated actions and parameters to the remote server for execution. This method returns the results of the actions to the caller as a collection of BatchResultItem objects. If the Session object is not in a batch, for example, because the batch has been suspended, this method throws a BatchException.

Execution of this method marks the logical end of a batch.

Returns:
A collection of BatchResultItem objects.

suspendBatch

public java.lang.Object suspendBatch()

Not Implemented in CS Java Connector v3.0.

Suspends the accumulation of operations into the batch. If the Session object is not in a batch, for example, because the batch has already been suspended, this method throws a BatchException.

The returned Java Object is a context object for all of the information known by the Session object about the batch. To resume a suspended batch, this returned Object is required as input to the resumeBatch call. To completely discard the batch, simply discard the object returned from this method.

Returns:
A Java Object containing the context of the batch.

resumeBatch

public void resumeBatch(java.lang.Object context)

Not Implemented in CS Java Connector v3.0.

Resumes the accumulation of operations into the batch. The parameter to this method is the returned value from a suspendBatch() call on this Session object. A BatchException is thrown if the value is from a different Session object.

If the Session object is already in a non-suspended batch, this method throws a BatchException.

Parameters:
context - The Java Object returned from a suspendBatch() call.

isInBatch

public boolean isInBatch()

Not Implemented in CS Java Connector v3.0.

Indicates whether or not there is an active batch that is accumulating items.

Returns:
true if an active batch already exists or if a suspended batch exists; otherwise, returns false.

getBatchItemCount

public int getBatchItemCount()

Not Implemented in CS Java Connector v3.0.

Returns the number of items accumulated in the batch so far. For a caller who wishes to keep track of requests and results by numeric position rather than by setting the batch item label, this method is useful for reliably obtaining the number of the item most recently added to the batch. In addition, by comparing the batch item count before and after calling a given Java Connector method, a caller can use getBatchItemCount() to determine whether the given method call resulted in adding an item to the batch.

Returns:
An integer that represents the number of items accumulated in the batch so far.

setBatchItemLabel

public void setBatchItemLabel(java.lang.String label)

Not Implemented in CS Java Connector v3.0.

Assigns a label to the most recent previous item in the batch. If the Session object is not in the batch, or if there is no previous item, this method throws a BatchException.

Each item in the batch has a unique label, which, by default, is generated internally. Internally-generated labels always start with the letter "b". However, you can use this method to specify a label of your own choosing. To avoid conflicts with internally generated labels, do not prefix caller-supplied labels with the letter "b". Develop a naming convention that keeps your labels unique.

The label you supply to this method is assigned to the most recent previous item in the batch. For example, to assign your own label to the third of four getProperties calls in a batch, call setBatchItemLabel immediately after the third and before the fourth getProperties call. If an earlier previous item exists with the same label as the label supplied in this call, this method changes the earlier previous item's label to a unique string using the same technique as for internally generated labels.

To retrieve items by their unique caller-supplied labels, call getItemByLabel on the BatchResultItems collection returned by an executeBatch() call.

Parameters:
label - A String that represents the label to be assigned to the most recent previous item in the batch.

setBatchItemDiscardResults

public void setBatchItemDiscardResults(boolean discardResults)

Not Implemented in CS Java Connector v3.0.

Specifies whether or not to ignore (discard) the results of the most recent previous item in the batch. Discarding results can save serialization/deserialization time.

The setting of the discardResults parameter on the startBatch method call establishes the default for whether or not to ignore all results from batch execution. However, you can use setBatchItemDiscardResults to establish whether or not to ignore the results of the most recent previous item in the batch.

If the Session object is not in a batch, or if there is no previous item, this method throws a BatchException.

Parameters:
discardResults - Set to true to ignore the results of the most recent previous item in the batch; otherwise, set to false.

equals

public boolean equals(java.lang.Object o)
Compares two Session objects for logical equivalence. This method performs a case-sensitive comparison of the individual values of each object. Two Session objects are considered logically equivalent if:

For all values, a null for the same value in both Session objects is considered a match.

Parameters:
o - The Session object with which to compare.

Returns:
true if the two objects are logically equivalent; otherwise, false.

hashCode

public int hashCode()
Returns an integer for the hash code for this Session object. The hash code is used for storing and retrieving a reference to this Session object in a Hashtable data structure.

Returns:
An integer representing the hash code for this object reference.

FileNet Content Services
Java Connector v3.0