Content Manager OnDemand V8.5 WEK APIs

com.ibm.edms.od
Class ODCallback

java.lang.Object
  extended by com.ibm.edms.od.ODCallback
Direct Known Subclasses:
ODFolder

public class ODCallback
extends java.lang.Object

This class is used with all methods in which the server operation returns data while processing.
For example:

    ODCallback odc = new ODCallback();
    folder.search(odc);
 
(c) Copyright IBM Corp. 1993, 2003. All Rights Reserved


Constructor Summary
ODCallback()
          The class constructor.
 
Method Summary
 boolean DataCallback(byte[] data)
          Bulk retrieval data callback.
 boolean HitCallback(java.lang.String docId, char type, int hit_location, java.lang.String[] values)
          Search folder callback.
 boolean HitCallback(java.lang.String docId, char type, java.lang.String[] values)
          Search folder callback.
 void HitHandleCallback(int hit, int off, int len)
          Bulk retrieval hit callback.
 void xmlProcessBegin(java.lang.String objectType, java.lang.String objectName, int action)
          XML processing begin callback.
 void xmlProcessEnd(java.lang.String objectType, java.lang.String objectName, int action, boolean success)
          XML processing end callback.
 void xmlProcessMsg(java.lang.String message)
          XML processing message callback.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODCallback

public ODCallback()
The class constructor.

Method Detail

HitCallback

public boolean HitCallback(java.lang.String docId,
                           char type,
                           java.lang.String[] values)
                    throws java.lang.Exception
Search folder callback. When performing a folder search this method is called for each hit.

Parameters:
docId - Persistent document identifier.
type - Document type.
values - Hit field values for Display Criteria.
Returns:
The search operation can be canceled by return false.

Throws:
java.lang.Exception
See Also:
ODConstant, ODFolder.searchWithCallback(ODCallback), ODFolder.searchWithCallback(String, ODCallback), ODFolder.searchWithCallback(String, String, String, ODCallback)

HitCallback

public boolean HitCallback(java.lang.String docId,
                           char type,
                           int hit_location,
                           java.lang.String[] values)
                    throws java.lang.Exception
Search folder callback. When performing a folder search this method is called for each hit.

Parameters:
docId - Persistent document identifier.
type - Document type.
hit_location - document location, cache, etc.
values - Hit field values for Display criteria.
Returns:
The search operation can be canceled by return false.

Throws:
java.lang.Exception
See Also:
ODConstant, ODFolder.searchWithCallback(ODCallback), ODFolder.searchWithCallback(String, ODCallback), ODFolder.searchWithCallback(String, String, String, ODCallback)

HitHandleCallback

public void HitHandleCallback(int hit,
                              int off,
                              int len)
Bulk retrieval hit callback. When performing a bulk retrieval from the server this method is called by the server periodically when data becomes available. This method works in cooperation with the ODFolder.DataCallback(byte[]) method. Together they should be used to process the data returned from the bulk retrieval request.

Parameters:
hit - The hit number.
off - Offset of the data to be returned.
len - Length of the data to be returned.

Note: The server will not continue processing the bulk retrieval request until this method returns. Therefore care should be taken to minimalize the amount of processing that occurs before returning.
See Also:
ODFolder.retrieve(Vector, ODCallback), ODFolder.retrieve(String[], ODCallback)

DataCallback

public boolean DataCallback(byte[] data)
Bulk retrieval data callback. When performing a bulk retrieval from the server this method is called by the server periodically when data becomes available. This method works in cooperation with the ODCallback.HitHandleCallback(int, int, int) method. Together they should be used to process the data returned from the bulk retrieval request.

Parameters:
data - Document data for the requested hit(s).
Returns:
Return true to continue processing, false otherwise.

Note: The server will not continue processing the bulk retrieval request until this method returns. Therefore care should be taken to minimize the amount of processing that occurs before returning.
See Also:
ODFolder.retrieve(Vector, ODCallback), ODFolder.retrieve(String[], ODCallback)

xmlProcessBegin

public void xmlProcessBegin(java.lang.String objectType,
                            java.lang.String objectName,
                            int action)
XML processing begin callback. When performing a XML job this method is called periodically as objects are processed. A call to this method will be made for each object in the XML input file. The call made to this method for an object will indicate that processing has begun on the object.

Parameters:
objectType - The type of object being processed
objectName - The name of the object being processed
action - The type of action being performed on the object

Note: Processing will not continue until control is returned from this method, therefore care should be taken to minimize the amount of processing that occurs before returning.
See Also:
ODServer#xmlParse()

xmlProcessMsg

public void xmlProcessMsg(java.lang.String message)
XML processing message callback. When performing a XML job this method is called periodically as objects are processed. A call to this method will be made for each object in the XML input file when a message is issued.

Parameters:
message - The process message returned

Note: Processing will not continue until control is returned from this method, therefore care should be taken to minimize the amount of processing that occurs before returning.
See Also:
ODServer#xmlParse()

xmlProcessEnd

public void xmlProcessEnd(java.lang.String objectType,
                          java.lang.String objectName,
                          int action,
                          boolean success)
XML processing end callback. When performing a XML job this method is called periodically as objects are processed. A call to this method will be made for each object in the XML input file. The call made to this method for an object will indicate that processing has ended on the object.

Parameters:
objectType - The type of object being processed
objectName - The name of the object being processed
action - The type of action being performed on the object
success - Value indicating success or not
See Also:
ODServer#xmlParse()

CM OnDemand V8.5 WEK Java APIs

(c)Copyright International Business Machines Corporation 2001, 2013. IBM Corp. All rights reserved.