Content Manager OnDemand V8.5 WEK APIs

com.ibm.edms.od
Class ODFolder

java.lang.Object
  extended by com.ibm.edms.od.ODCallback
      extended by com.ibm.edms.od.ODFolder
All Implemented Interfaces:
java.io.Serializable

public class ODFolder
extends ODCallback
implements java.io.Serializable

A class representing an OnDemand folder. This object is returned from a successful call to ODServer.openFolder(). It contains folder criteria information. These criteria objects are what need to be modified in order to narrow the query on the server.
WARNING: It is required that access to all ODWEK objects only be done in a single threaded environment.

(c) Copyright IBM Corp. 1993, 2003. All Rights Reserved

See Also:
Serialized Form

Method Summary
 void CFSODAddHits(java.util.Vector hits)
          Add documents to the OnDemand CFSOD Definition.
 void close()
          This method will close the folder.
 void deleteDocs(java.util.Vector hits)
          Delete document row(s) from the OnDemand Database.
 void deleteNamedQuery(java.lang.String NQName)
          Delete a Named Query from the OnDemand Server.
 void duplicateHit(ODHit odHit, java.lang.String[] values)
          This method will create a new hit for an existing document in the OnDemand repository, using the specified DB Field Values.
 ODHit duplicateHit(ODHit odHit, java.lang.String[] values, java.lang.Object reserved)
          This method will create a new hit for an existing document in the OnDemand repository, using the specified DB Field Values.
 java.lang.String[] getApplGroupNames()
          Get the application groups for this folder.
 java.lang.Object[] getApplNames(java.lang.String applGroup)
          Get the applications for the specified application group for this folder
 java.util.Enumeration getCriteria()
          Get the search criteria for this folder.
 ODCriteria getCriteria(java.lang.String name)
          Get criteria object for the specified criteria name.
 java.util.ArrayList getCriteriaDisplayOrder()
          Get the criteria display order for the folder This order is set by the OnDemand administrator and via the user.
 java.util.ArrayList getCriteriaQueryOrder()
          Get the criteria query order for the folder This order is set by the OnDemand administrator and via the user.
 java.util.ArrayList getCriteriaSortOrder()
          Get the criteria sort order for the folder This order is set by the OnDemand administrator and via the user.
 java.lang.String getDescription()
          The description of the folder.
 java.lang.String[] getDisplayOrder()
          Get the display order for the folder's criteria.
 java.util.ArrayList getFolderSortOrder()
          Deprecated. Use ODFolder.getCriteriaSortOrder()
 java.util.Vector getHits()
          Return the hits obtained from the last search method call.
 int getMaxHits()
          Get the maximum number of hits that will be returned from a search.
 java.lang.String getName()
          The name of the folder.
 ODNamedQuery getNamedQuery(java.lang.String name)
          Get a ODNamedQuery object.
 java.util.Enumeration getNamedQueryNames()
          Get the names of all NamedQueries specified in this folder.
 int getNumApplGroups()
          Get the number of application groups for this folder.
 int getNumAppls(java.lang.String applGroup)
          Get the number of applications in the specified application group for this folder.
 int getNumCriteria()
          Get the number of criteria defined for this folder.
 short getPermissions()
          Use this mask value to determine the current user's folder permissions.
 java.lang.String[] getQueryOrder()
          Get the query order for the folder's criteria.
 java.lang.String getSearchMessage()
          Message returned from server during search operation.
 char getSortLocation()
          Get the Sort Location.
 java.lang.Object[][] getStoreDocFields(java.lang.String applGroup, java.lang.String appl)
          Get the valid folder fields for a storedoc operation.
 void HoldAddHits(java.util.Vector hits, ODHold hold)
          Add documents to a specific OnDemand Hold for Enhanced Retention management.
 void HoldReleaseHits(java.util.Vector hits, ODHold hold)
          Release documents from a specific OnDemand Hold.
 void ImpliedHoldReleaseHits(java.util.Vector hits)
          Release Documents from an Implied Hold status.
 boolean isApplicationGroupRMEnabled(long agid)
          Deprecated.  
 boolean isApplicationGroupRMEnabled(java.lang.String name)
          Deprecated.  
 boolean isOrSearchCriteria()
          Determines whether the search criteria are being ORed or ANDed during a search with criteria.
 void open()
          This method will open the folder.
 void printDocuments(java.util.Vector hits, java.lang.String printer, int copies)
          Print the specified hits from this folder.
 ODHit recreateHit(java.lang.String doc_id)
          This method will create an ODHit object for the document identified by a document id.
 void retrieve(ODCallback odCallback)
          This method will retrieve the current hits, i.e., those returned from the last successful search method call.
 void retrieve(java.lang.String[] ids, ODCallback odCallback)
          This method will retrieve the specified documents from this folder.
 void retrieve(java.util.Vector hits, ODCallback odCallback)
          This method will retrieve the specified hits from this folder.
 void saveNamedQuery(java.lang.String name, boolean pub, java.util.Enumeration odCrit)
          Deprecated. Use #saveNamedQuery(String,boolean,Enumeration,boolean)
 ODNamedQuery saveNamedQuery(java.lang.String name, boolean pub, java.util.Enumeration odCrit, boolean reserved)
          Save a Named Query.
 java.util.Vector search()
          This method will search the folder.
 java.util.Vector search(ODCallback odCallback)
          This method will search the folder.
 java.util.Vector search(ODCallback odCallback, boolean use_docloc_hit_callback)
          This method will search the folder.
 java.util.Vector search(ODCallback odCallback, ODNamedQuery namedQ)
          This method will search the folder with the specified Named Query Criteria.
 java.util.Vector search(ODNamedQuery namedQ)
          This method will search the folder with the specified NamedQuery Criteria.
 java.util.Vector search(java.lang.String sql)
          This method will search the folder.
 java.util.Vector search(java.lang.String sql, ODCallback cb)
          If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs.
 java.util.Vector search(java.lang.String sql, java.lang.String segStartDate, java.lang.String segStopDate)
          This method will search the folder.
 java.util.Vector search(java.lang.String sql, java.lang.String segStartDate, java.lang.String segStopDate, ODCallback cb)
          If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs.
 java.util.Vector search(java.lang.String sql, java.lang.String segStartDate, java.lang.String segStopDate, java.lang.String dateFmt)
          This method will search the folder.
 java.util.Vector search(java.lang.String sql, java.lang.String segStartDate, java.lang.String segStopDate, java.lang.String dateFmt, ODCallback odCallback)
          If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs.
 long searchCountHits()
          Get the total count of hits that will be returned from a search based on the criteria specified.
 long searchCountHits(java.lang.String sql, java.lang.String segStartDate, java.lang.String segStopDate, java.lang.String dateFmt)
          Get the total count of hits that will be returned from a search based on the specified SQL.
 void searchWithCallback(ODCallback odCallback)
          This method will search the folder.
 void searchWithCallback(java.lang.String sql, ODCallback cb)
          This method will search the folder asynchronously.
 void searchWithCallback(java.lang.String sql, java.lang.String segStartDate, java.lang.String segStopDate, ODCallback odCallback)
          This method will search the folder asynchronously.
 void setApplGroupForSearchWithSQL(java.lang.String appl_group_name)
          This method will set the name of an application group to be used during a search with SQL.
 void setMaxHits(int max)
          Set the Maximum Hits allowed to be returned during a search.
 void setOrSearchCriteria(boolean or_search_criteria)
          Sets whether the search criteria are to be ORed or ANDed during a search with criteria.
 void setServerPrinterData(int index, java.lang.String data)
          Set server printer data.
 void setSortLocation(char sortLoc)
          Set the Sort Location.
 boolean showHoldStatus()
          Determine whether the current OnDemand Hold status should be shown in the hitlist.
 void storeDocument(java.lang.String path, java.lang.String appl_grp_name, java.lang.String appl_name, java.lang.String[] values)
          This method will store a document in the OnDemand database.
 ODHit storeDocument(java.lang.String path, java.lang.String appl_grp_name, java.lang.String appl_name, java.lang.String[] values, java.lang.Object reserved)
          This method will store a document in the OnDemand database and return the new ODHit that is created from this new document.
 void updateValuesForHits(java.util.Vector hits, java.util.Hashtable newValues)
          Update an array of ODHits with specified criteria values.
 
Methods inherited from class com.ibm.edms.od.ODCallback
DataCallback, HitCallback, HitCallback, HitHandleCallback, xmlProcessBegin, xmlProcessEnd, xmlProcessMsg
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

open

public void open()
          throws java.lang.Exception
This method will open the folder. This retrieves from the server the criteria information for the folder.

Throws:
java.lang.Exception

close

public void close()
This method will close the folder.


search

public java.util.Vector search()
                        throws java.lang.Exception
This method will search the folder. Before searching the folder the criteria should be set.

Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODHit, ODServer.cancel()

search

public java.util.Vector search(ODNamedQuery namedQ)
                        throws java.lang.Exception
This method will search the folder with the specified NamedQuery Criteria.

Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODHit, ODServer.cancel()

searchWithCallback

public void searchWithCallback(ODCallback odCallback)
                        throws java.lang.Exception
This method will search the folder. Before searching the folder the criteria should be set. This method is asynchronous.


NOTE:
To obtain the hit results call ODFolder.getHits() after the search is complete.

Parameters:
odCallback - An instance of the ODCallback object. This object will allow the calling application to cancel/wait for the search to complete.
Throws:
java.lang.Exception
See Also:
ODFolder.search(ODCallback), ODFolder.getHits(), ODCallback, ODServer.cancel()

search

public java.util.Vector search(ODCallback odCallback)
                        throws java.lang.Exception
This method will search the folder. Before searching the folder the criteria should be set.

Parameters:
odCallback - An instance of the ODCallback object. This object will allow the calling application to cancel the search.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODCallback, ODServer.cancel()

search

public java.util.Vector search(ODCallback odCallback,
                               ODNamedQuery namedQ)
                        throws java.lang.Exception
This method will search the folder with the specified Named Query Criteria. Before searching the folder the criteria should be set.

Parameters:
odCallback - An instance of the ODCallback object. This object will allow the calling application to cancel the search.
namedQ - An instance of the ODNamedQuery object. This NamedQuery object contains pre-set search criteria.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODCallback, ODNamedQuery, ODServer.cancel()

search

public java.util.Vector search(ODCallback odCallback,
                               boolean use_docloc_hit_callback)
                        throws java.lang.Exception
This method will search the folder. Before searching the folder the criteria should be set.

Parameters:
odCallback - An instance of the ODCallback object. This object will allow the calling application to cancel the search.
use_docloc_hit_callback - Indicates whether (true) or not (false) to return a parameter specifying the document location to the HitCallback method.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODCallback, ODServer.cancel()

search

public java.util.Vector search(java.lang.String sql)
                        throws java.lang.Exception
This method will search the folder. If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.

Parameters:
sql - An sql string containing the search directive.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODHit, ODServer.cancel()

searchWithCallback

public void searchWithCallback(java.lang.String sql,
                               ODCallback cb)
                        throws java.lang.Exception
This method will search the folder asynchronously. If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.



NOTE:
To obtain the hit results call ODFolder.getHits() after the search is complete.

Parameters:
sql - An sql string containing the search directive.
cb - An instance of an ODCallback object.
Throws:
java.lang.Exception
See Also:
ODFolder.search(String, ODCallback), ODFolder.getHits(), ODCallback, ODServer.cancel()

search

public java.util.Vector search(java.lang.String sql,
                               ODCallback cb)
                        throws java.lang.Exception
If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.

Parameters:
sql - An sql string containing the search directive.
cb - An instance of an ODCallback object.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODServer.cancel(), ODCallback

search

public java.util.Vector search(java.lang.String sql,
                               java.lang.String segStartDate,
                               java.lang.String segStopDate)
                        throws java.lang.Exception
This method will search the folder. If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.

Parameters:
sql - An sql string containing the search directive.
segStartDate - Use to specify the segment start date. Combined with the Stop date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format of the folder field.
segStopDate - Use to specify the segment stop date. Combined with the Start date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format of the folder field.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODHit, ODServer.cancel()

search

public java.util.Vector search(java.lang.String sql,
                               java.lang.String segStartDate,
                               java.lang.String segStopDate,
                               java.lang.String dateFmt)
                        throws java.lang.Exception
This method will search the folder. If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.

Parameters:
sql - An sql string containing the search directive.
segStartDate - Use to specify the segment start date. Combined with the Stop date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format specified in param dateFmt.
segStopDate - Use to specify the segment stop date. Combined with the Start date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format specified in param dateFmt.
dateFmt - Used to specify the format of the dates.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODHit, ODServer.cancel()

searchWithCallback

public void searchWithCallback(java.lang.String sql,
                               java.lang.String segStartDate,
                               java.lang.String segStopDate,
                               ODCallback odCallback)
                        throws java.lang.Exception
This method will search the folder asynchronously. If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.



NOTE:
To obtain the hit results call ODFolder.getHits() after the search is complete.

Parameters:
sql - An sql string containing the search directive.
segStartDate - Use to specify the segment start date. Combined with the Stop date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format of the folder field.
segStopDate - Use to specify the segment stop date. Combined with the Start date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format of the folder field.
odCallback - ODCallback object.
Throws:
java.lang.Exception
See Also:
ODFolder.search(String, String, String, ODCallback), ODFolder.getHits(), ODCallback, ODServer.cancel()

search

public java.util.Vector search(java.lang.String sql,
                               java.lang.String segStartDate,
                               java.lang.String segStopDate,
                               ODCallback cb)
                        throws java.lang.Exception
If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.

Parameters:
sql - An sql string containing the search directive.
segStartDate - Use to specify the segment start date. Combined with the Stop date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format of the folder field.
segStopDate - Use to specify the segment stop date. Combined with the Start date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format of the folder field.
cb - An instance of an ODCallback object.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODCallback, ODServer.cancel()

search

public java.util.Vector search(java.lang.String sql,
                               java.lang.String segStartDate,
                               java.lang.String segStopDate,
                               java.lang.String dateFmt,
                               ODCallback odCallback)
                        throws java.lang.Exception
If you use this method the SQL query is used to search the folder rather than any folder field name/value pairs. OnDemand does not validate the sql string.

Parameters:
sql - An sql string containing the search directive.
segStartDate - Use to specify the segment start date. Combined with the Stop date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must the date format specified in dateFmt.
segStopDate - Use to specify the segment stop date. Combined with the Start date, this will limit the search to segment tables that include this date range. The format of the date string that you specify must match the display format specifed in dateFmt.
dateFmt - Used to specify the format of the dates.
odCallback - ODCallback object.
Returns:
A vector containing ODHit objects.
Throws:
java.lang.Exception
See Also:
ODCallback, ODServer.cancel()

searchCountHits

public long searchCountHits()
                     throws java.lang.Exception
Get the total count of hits that will be returned from a search based on the criteria specified. NOTE: The OnDemand Server must be at ptf7.1.2.8 or higher to support this functionality.

Throws:
java.lang.Exception

searchCountHits

public long searchCountHits(java.lang.String sql,
                            java.lang.String segStartDate,
                            java.lang.String segStopDate,
                            java.lang.String dateFmt)
                     throws java.lang.Exception
Get the total count of hits that will be returned from a search based on the specified SQL. NOTE: The OnDemand Server must be at ptf7.1.2.8 or higher to support this functionality.

Throws:
java.lang.Exception

setApplGroupForSearchWithSQL

public void setApplGroupForSearchWithSQL(java.lang.String appl_group_name)
This method will set the name of an application group to be used during a search with SQL. If an application group is specified, only that application group will be searched. If a null value is specified, all application groups within the folder will be searched.

Parameters:
appl_group_name - The name of an application group.

setOrSearchCriteria

public void setOrSearchCriteria(boolean or_search_criteria)
Sets whether the search criteria are to be ORed or ANDed during a search with criteria.

NOTE: Due to Server side search requirements, even when you choose the OR logical operator, the date segment field is always ANDed with the rest of the search fields.

Parameters:
or_search_criteria - true if search criteria are to be ORed; false if search criteria are to be ANDed.

isOrSearchCriteria

public boolean isOrSearchCriteria()
Determines whether the search criteria are being ORed or ANDed during a search with criteria.

Returns:
true if search criteria are being ORed; false if search criteria are being ANDed.

retrieve

public void retrieve(ODCallback odCallback)
              throws java.lang.Exception
This method will retrieve the current hits, i.e., those returned from the last successful search method call. This method uses document bulk retrieval to return the data to the caller.

Parameters:
odCallback - ODCallback object.
Throws:
java.lang.Exception
See Also:
ODCallback

retrieve

public void retrieve(java.util.Vector hits,
                     ODCallback odCallback)
              throws java.lang.Exception
This method will retrieve the specified hits from this folder. This method uses document bulk retrieval to return the data to the caller. See @ODCallback.

Parameters:
hits - A vector of ODHit objects to retrieve.
odCallback - ODCallback object.
Throws:
java.lang.Exception
See Also:
ODCallback

retrieve

public void retrieve(java.lang.String[] ids,
                     ODCallback odCallback)
              throws java.lang.Exception
This method will retrieve the specified documents from this folder. This method uses document bulk retrieval to return the data to the caller.

Parameters:
ids - An array of document ids.
odCallback - ODCallback object.
Throws:
java.lang.Exception
See Also:
ODCallback

storeDocument

public ODHit storeDocument(java.lang.String path,
                           java.lang.String appl_grp_name,
                           java.lang.String appl_name,
                           java.lang.String[] values,
                           java.lang.Object reserved)
                    throws java.lang.Exception
This method will store a document in the OnDemand database and return the new ODHit that is created from this new document. The path variable must contain a valid representation of the file that is to be stored and that file must contain data i.e. greater than than 0 bytes. Alternately, if you need to store only index details without an actual document, specify an empty String for the path variable. This will create a row in the Application Group's data table but will not send a document to the storage manager.
NOTE: The following server requirements must addressed before you will be able to store documents to the server using this API.
1.The Application Group's database organization must have the attribute Multiple Loads per Table. This attribute is set in the General/Advanced tab in the Properties window of the Application Group.
2.The Application Group's Expiration Type in Storage Management must be set to Expiration Type: Segment. This attribute is set in the Storage Management tab in the Properties window of the Application Group.

Parameters:
path - The fully qualified path of a file containing the data to be stored.
appl_grp_name - The name of an application group within the folder.
appl_name - The name of an application within the application.
values - An array of values. See ODFolder.getStoreDocFields(java.lang.String, java.lang.String) for the ordering of this array. The values in this array must be specified in the same order as those returned from the ODFolder.getStoreDocFields(java.lang.String, java.lang.String) method.
Returns:
the newly created ODHit object.
Throws:
java.lang.Exception
See Also:
ODFolder.getStoreDocFields(java.lang.String, java.lang.String), ODHit.hasRetrievableDoc()

storeDocument

public void storeDocument(java.lang.String path,
                          java.lang.String appl_grp_name,
                          java.lang.String appl_name,
                          java.lang.String[] values)
                   throws java.lang.Exception
This method will store a document in the OnDemand database. The path variable must contain a valid representation of the file that is to be stored and that file must contain data i.e. greater than than 0 bytes. Alternately, if you need to store only index details without an actual document, specify an empty String for the path variable. This will create a row in the Application Group's data table but will not send a document to the storage manager.
NOTE: The following server requirements must addressed before you will be able to store documents to the server using this API.
1.The Application Group's database organization must have the attribute Multiple Loads per Table. This attribute is set in the General/Advanced tab in the Properties window of the Application Group.
2.The Application Group's Expiration Type in Storage Management must be set to Expiration Type: Segment. This attribute is set in the Storage Management tab in the Properties window of the Application Group.

Parameters:
path - The fully qualified path of a file containing the data to be stored.
appl_grp_name - The name of an application group within the folder.
appl_name - The name of an application within the application.
values - An array of values. See ODFolder.getStoreDocFields(java.lang.String, java.lang.String) for the ordering of this array. The values in this array must be specified in the same order as those returned from the ODFolder.getStoreDocFields(java.lang.String, java.lang.String) method.
Throws:
java.lang.Exception
See Also:
ODFolder.getStoreDocFields(java.lang.String, java.lang.String), ODHit.hasRetrievableDoc()

duplicateHit

public void duplicateHit(ODHit odHit,
                         java.lang.String[] values)
                  throws java.lang.Exception
This method will create a new hit for an existing document in the OnDemand repository, using the specified DB Field Values. You must do a new search to get the new ODHit object after this function is called..

Parameters:
ODHit. - An existing ODHit that contains the document data to be referenced by the index this API will create.
values - An array of values. These values will be used for the new index values stored to the OD Database. See ODFolder.getStoreDocFields(java.lang.String, java.lang.String) for the ordering of this array. The values in this array must be specified in the same order as those returned from the ODFolder.getStoreDocFields(java.lang.String, java.lang.String) method, and all values must be specified.
Throws:
java.lang.Exception
See Also:
ODFolder.getStoreDocFields(java.lang.String, java.lang.String)

duplicateHit

public ODHit duplicateHit(ODHit odHit,
                          java.lang.String[] values,
                          java.lang.Object reserved)
                   throws java.lang.Exception
This method will create a new hit for an existing document in the OnDemand repository, using the specified DB Field Values.

Parameters:
ODHit. - An existing ODHit that contains the document data to be referenced by the index this API will create.
values - An array of values. These values will be used for the new index values stored to the OD Database. See ODFolder.getStoreDocFields(java.lang.String, java.lang.String) for the ordering of this array. The values in this array must be specified in the same order as those returned from the ODFolder.getStoreDocFields(java.lang.String, java.lang.String) method, and all values must be specified.
Reserved - for future use.
Throws:
java.lang.Exception
See Also:
ODFolder.getStoreDocFields(java.lang.String, java.lang.String)

setServerPrinterData

public void setServerPrinterData(int index,
                                 java.lang.String data)
                          throws java.lang.Exception
Set server printer data.

Parameters:
index - ODConstant for SERVER_PRINTER_DATA
data - String data to set for the specified index.
Throws:
java.lang.Exception
See Also:
ODConstant.SERVER_PRINTER_DATA_FAX_RECEIVER_NAME, ODConstant.SERVER_PRINTER_DATA_FAX_RECEIVER_COMPANY, ODConstant.SERVER_PRINTER_DATA_FAX_RECEIVER_FAX_NUMBER, ODConstant.SERVER_PRINTER_DATA_FAX_SENDER_NAME, ODConstant.SERVER_PRINTER_DATA_FAX_SENDER_COMPANY, ODConstant.SERVER_PRINTER_DATA_FAX_SENDER_TEL_NUMBER, ODConstant.SERVER_PRINTER_DATA_FAX_SENDER_FAX_NUMBER, ODConstant.SERVER_PRINTER_DATA_FAX_SENDER_COVER_PAGE, ODConstant.SERVER_PRINTER_DATA_FAX_SUBJECT, ODConstant.SERVER_PRINTER_DATA_FAX_NOTES, ODConstant.SERVER_PRINTER_DATA_INFO_FROM, ODConstant.SERVER_PRINTER_DATA_INFO_TO

printDocuments

public void printDocuments(java.util.Vector hits,
                           java.lang.String printer,
                           int copies)
                    throws java.lang.Exception
Print the specified hits from this folder.

NOTE: All hits must be from the same server to be printed correctly.

Parameters:
hits - Vector of hits returned from search
printer - The name of a server printer defined within OnDemand.
copies - Number of copies each document is to be printed
Throws:
java.lang.Exception

getHits

public java.util.Vector getHits()
Return the hits obtained from the last search method call.

Returns:
A vector containing ODHit objects obtained from the last search method.
See Also:
ODHit

getSearchMessage

public java.lang.String getSearchMessage()
Message returned from server during search operation. This does not indicate failure, it is simply an informative message. An example would be:
Only 200 hits were returned by the server.

Returns:
The text of the message.

getName

public java.lang.String getName()
The name of the folder.

Returns:
String The name of the folder.

getDescription

public java.lang.String getDescription()
The description of the folder.

Returns:
The description of the folder.

getFolderSortOrder

public java.util.ArrayList getFolderSortOrder()
Deprecated. Use ODFolder.getCriteriaSortOrder()

Get the sort order for the folder's criteria. This order is set by the OnDemand administrator and via the user.

Returns:
Java ArrayList containing the ODCriteria objects which contain the sort order information for the current open folder.

getCriteriaSortOrder

public java.util.ArrayList getCriteriaSortOrder()
Get the criteria sort order for the folder This order is set by the OnDemand administrator and via the user.

Returns:
Java ArrayList containing the ODCriteria objects which contain the sort order information for the current open folder.

getCriteriaDisplayOrder

public java.util.ArrayList getCriteriaDisplayOrder()
Get the criteria display order for the folder This order is set by the OnDemand administrator and via the user.

Returns:
Java ArrayList containing the ODCriteria objects which contain the display order information for the current open folder.

getCriteriaQueryOrder

public java.util.ArrayList getCriteriaQueryOrder()
Get the criteria query order for the folder This order is set by the OnDemand administrator and via the user.

Returns:
Java ArrayList containing the ODCriteria objects which contain the query order information for the current open folder.

getDisplayOrder

public java.lang.String[] getDisplayOrder()
Get the display order for the folder's criteria. This order is set by the OnDemand administrator.

Returns:
A string array containing the folder criteria names in their display order.

getQueryOrder

public java.lang.String[] getQueryOrder()
Get the query order for the folder's criteria. This order is set by the OnDemand administrator.

Returns:
A string array containing the folder criteria names in their query order.

getNumCriteria

public int getNumCriteria()
Get the number of criteria defined for this folder.

Returns:
Number of criteria.

getNumApplGroups

public int getNumApplGroups()
Get the number of application groups for this folder.

Returns:
Number of application groups.

getApplGroupNames

public java.lang.String[] getApplGroupNames()
Get the application groups for this folder.

Returns:
Object array containing the application groups. Each element in the object array is a String containing the application group name.

getNumAppls

public int getNumAppls(java.lang.String applGroup)
Get the number of applications in the specified application group for this folder.

Returns:
Number of applications. If the applGroup name is not in the selected list for this folder, -1 is returned.

getApplNames

public java.lang.Object[] getApplNames(java.lang.String applGroup)
Get the applications for the specified application group for this folder

Returns:
Object array containing the applications. Each element in the object array is a String containing the application name. If the applGroup name is not in the selected list for this folder, the return Object[] is null.

getStoreDocFields

public java.lang.Object[][] getStoreDocFields(java.lang.String applGroup,
                                              java.lang.String appl)
                                       throws java.lang.Exception
Get the valid folder fields for a storedoc operation.

Returns:
Object array containing the application group fields that must be specified during a storeDocument operation. Only values for application group fields which contain a mapping to a folder field will be used during the ODFolder.storeDocument(java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.Object) api. If no mapping exists for a given application group field, a value of null must still be specified for it during the ODFolder.storeDocument(java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.Object) api. The following demonstrates the access to this two dimensional array:
            arr[0][0] - The first application group field.
            arr[0][1] - Folder field name for application group field
                        if mapping exists.
            arr[1][0] - The second application group field.
            arr[1][1] - Folder field name for application group field
                        if mapping exists.
                        ...
                        ...
            arr[n][0] - The Nth application group field.
            arr[n][1] - Folder field name for application group field
                        if mapping exists.
 
Throws:
java.lang.Exception
See Also:
ODFolder.storeDocument(java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.Object)

getCriteria

public java.util.Enumeration getCriteria()
Get the search criteria for this folder.

Returns:
Enumeration of ODCriteria objects.
See Also:
ODCriteria

getCriteria

public ODCriteria getCriteria(java.lang.String name)
Get criteria object for the specified criteria name.

Returns:
ODCriteria object
See Also:
ODCriteria

isApplicationGroupRMEnabled

public boolean isApplicationGroupRMEnabled(long agid)
                                    throws java.lang.Exception
Deprecated. 

Return whether the specified application group identifier is Records Manager enabled.

Parameters:
agid - The application group identifier.
Returns:
boolean True if RM enabled.
Throws:
java.lang.Exception

isApplicationGroupRMEnabled

public boolean isApplicationGroupRMEnabled(java.lang.String name)
                                    throws java.lang.Exception
Deprecated. 

Return whether the specified application group identifier is Records Manager enabled.

Parameters:
name - The application group name.
Returns:
boolean True if RM enabled.
Throws:
java.lang.Exception

recreateHit

public ODHit recreateHit(java.lang.String doc_id)
                  throws java.lang.Exception
This method will create an ODHit object for the document identified by a document id.

NOTE:The doc_id that is passed in to this method must be identical to the doc_id that is returned from the ODHit.getDocId() call or unexpected results may occur.

Parameters:
doc_id - A document id. This value would typically have been saved after a call to the ODHit.getDocId method.
Returns:
An ODHit object.
Throws:
java.lang.Exception

updateValuesForHits

public void updateValuesForHits(java.util.Vector hits,
                                java.util.Hashtable newValues)
                         throws java.lang.Exception
Update an array of ODHits with specified criteria values. This will update the database row details for the specified hits.


NOTE: This requires the proper permissions to be set within the OnDemand administrator.
NOTE: Use ODCriteria#getDBFixedValuesMapping(String agName) to get the valid update values for a Fixed Choice field. (ODCriteria.getType() == ODConstant.InputTypeChoice) If the fixed choice field is mapped to an Application ID field, then this criteria field cannot be updated.
WARNING:
If you are caching DocIDs in your application, you will need to update them, as the DocIDs will change during the update.

Parameters:
hits - An array of ODHit objects to be updated.
newValues - - This hashtable contains the criteria names to update along with the new values.
Throws:
java.lang.Exception
See Also:
ODHit.getDocId(), ODCriteria.getDBFixedValuesMapping(String agName), ODCriteria.isUpdateable(java.lang.String, java.lang.String)

CFSODAddHits

public void CFSODAddHits(java.util.Vector hits)
                  throws java.lang.Exception
Add documents to the OnDemand CFSOD Definition.
NOTE: The DocID will be updated as a result of this call, so if your application is caching docIDs, then you will need to update that cache with the new DocID after this call has sucessfully returned.

Parameters:
Vector - hits Hits to be added to the CFSOD Definitions
Throws:
java.lang.Exception

HoldAddHits

public void HoldAddHits(java.util.Vector hits,
                        ODHold hold)
                 throws java.lang.Exception
Add documents to a specific OnDemand Hold for Enhanced Retention management.
NOTE: The DocID(s) will be updated as a result of this call, so if your application is caching docIDs, then you will need to update that cache with the new DocID after this call has sucessfully returned.

Parameters:
Vector - hits Hits to be added to the OnDemand Enhanced Retention Management system.
ODHold - hold A OnDemand object representing and OnDemand Hold definition.
Throws:
java.lang.Exception
See Also:
ODHold

HoldReleaseHits

public void HoldReleaseHits(java.util.Vector hits,
                            ODHold hold)
                     throws java.lang.Exception
Release documents from a specific OnDemand Hold.
NOTE: The DocID(s) will be updated as a result of this call, so if your application is caching docIDs, then you will need to update that cache with the new DocID after this call has sucessfully returned.

Parameters:
Vector - hits Hits to be removed from the OnDemand Enhanced Retention Management system.
ODHold - hold A OnDemand object representing and OnDemand Hold definition.
Throws:
java.lang.Exception
See Also:
ODHold

ImpliedHoldReleaseHits

public void ImpliedHoldReleaseHits(java.util.Vector hits)
                            throws java.lang.Exception
Release Documents from an Implied Hold status.
NOTE: The DocID(s) will be updated as a result of this call, so if your application is caching docIDs, then you will need to update that cache with the new DocID after this call has sucessfully returned.

Parameters:
Vector - hits Hits to be released from the OnDemand Enhanced Retention Management system.
Throws:
java.lang.Exception

deleteDocs

public void deleteDocs(java.util.Vector hits)
                throws java.lang.Exception
Delete document row(s) from the OnDemand Database. This will remove the specified document row(s) from the OnDemand Server database. The document data itself will not be deleted from archive storage.

NOTE: This requires the proper permissions to be set within the OnDemand administrator.

Parameters:
hits - Vector of ODHit objects that will be deleted from the database.
Throws:
java.lang.Exception
See Also:
ODApplicationGroup.getDocPerms(), ODHit

getNamedQueryNames

public java.util.Enumeration getNamedQueryNames()
                                         throws java.lang.Exception
Get the names of all NamedQueries specified in this folder. This will include only Public NamedQueries, and/or private named queries for the current user.

Returns:
Enumeration of String objects containing the NamedQuery Names.
Throws:
java.lang.Exception

getNamedQuery

public ODNamedQuery getNamedQuery(java.lang.String name)
                           throws java.lang.Exception
Get a ODNamedQuery object.

Parameters:
name - The name of the Named Query to retrieve. This must be the fully composed Display Name as returned from #saveNamedQuery(). For example: "NQName(Public)"
Returns:
ODCriteria object
Throws:
java.lang.Exception
See Also:
ODNamedQuery

saveNamedQuery

public void saveNamedQuery(java.lang.String name,
                           boolean pub,
                           java.util.Enumeration odCrit)
                    throws java.lang.Exception
Deprecated. Use #saveNamedQuery(String,boolean,Enumeration,boolean)

Save a Named Query.
This method will save specified search criteria as a Named Query to the OnDemand Server. Only queryable criteria will be added to the NamedQuery. After this NamedQuery is saved, a new listing should be generated via #getNamedQueryNames(), so that you get the proper display format for the Named Query name which will include the (Public)/(Private) designation. Optionally, you can use #saveNamedQuery(String, boolean, Enumeration,boolean) which will return the ODNamedQuery with the correct naming.

NOTE: If the NamedQuery specified already exists, it will be updated with the specified values.

Parameters:
name - Criteria Name
pub - if all users will have access specify true
odCrit - of ODCriteria Objects.
Throws:
java.lang.Exception
See Also:
ODFolder.saveNamedQuery(String,boolean,Enumeration,boolean), ODCriteria, ODCriteria.isQueryable()

saveNamedQuery

public ODNamedQuery saveNamedQuery(java.lang.String name,
                                   boolean pub,
                                   java.util.Enumeration odCrit,
                                   boolean reserved)
                            throws java.lang.Exception
Save a Named Query.
This method will save specified search criteria as a Named Query to the OnDemand Server. Only queryable criteria will be added to the NamedQuery.
NOTE:After this NamedQuery is saved, the name of the query will be updated to include an Public/Private identifier.(ie: "NQName(Public)") This display name must be retrieved from the ODNamedQuery object that is returned from this call, and used for all subsequent calls to handle NamedQueries.

NOTE: If the NamedQuery specified already exists, it will be updated with the specified values.

Parameters:
name - Criteria Name
pub - if all users will have access specify true
odCrit - of ODCriteria Objects.
reserved. - This parameter is reserved for internal use only.
Returns:
ODNamedQuery.
Throws:
java.lang.Exception
See Also:
ODCriteria, ODCriteria.isQueryable()

deleteNamedQuery

public void deleteNamedQuery(java.lang.String NQName)
                      throws java.lang.Exception
Delete a Named Query from the OnDemand Server.

Parameters:
NQName - the Display Name of the Named Query you want removed from the OnDemand Server. This name should include the "(Public)" or "(Private)" identifier as returned from ODFolder.saveNamedQuery(java.lang.String, boolean, java.util.Enumeration).
Throws:
java.lang.Exception
See Also:
ODNamedQuery

getPermissions

public short getPermissions()
Use this mask value to determine the current user's folder permissions.
For Example:
      System.out.println("Has Perms to add Public Named Queries" +
      ((odFolder.getPermissions() & ODConstant.OD_FOLDER_ID_NAMEDQ_PUB)!= 0 ? true : false));
 

See Also:
ODConstant.OD_FOLDER_ID_ACCESS, ODConstant.OD_FOLDER_ID_ADMIN, ODConstant.OD_FOLDER_ID_DEFINE, ODConstant.OD_FOLDER_ID_FOLFLD, ODConstant.OD_FOLDER_ID_NAMEDQ_PUB, ODConstant.OD_FOLDER_ID_NAMEDQ_PRI, ODConstant.OD_FOLDER_ID_NAMEDQ_VIEW, ODConstant.OD_FOLDER_ID_SECONDARY, ODConstant.OD_FOLDER_ID_ALLOW_FULL_RPT_BRWSE

setMaxHits

public void setMaxHits(int max)
Set the Maximum Hits allowed to be returned during a search. The search call will be stopped if MaxHits is encountered, and depending on ODFolder.getSortLocation(),the sort order of the hitlist returned may be affected.
The default ODWEK setting for MaxHits is 200, or the OnDemand Folder definitions as set by the OnDemand Administrator, whichever is less.
MaxHits can be reset between searches as necessary.

Parameters:
max - Any positive integer that specifies the max number of hits that can be returned from a search.
See Also:
ODFolder.getMaxHits(), ODFolder.setSortLocation(char), ODFolder.getSortLocation()

getMaxHits

public int getMaxHits()
Get the maximum number of hits that will be returned from a search. Immediately after ODServer.openFolder() is called, this will return either the MaxHits specified in the ODConfig, or the OnDemand Server Folder definition of MaxHits, which ever is less.


setSortLocation

public void setSortLocation(char sortLoc)
Set the Sort Location. Depending on how you have MaxHits set, the hitlist results returned from ODFolder.search() can vary, based on which sort location you specify.

   Search with OD_SORT_LOCATION_NONE:    MaxHits results will be returned in DB order (not sorted).
   Search with OD_SORT_LOCATION_MIDTIER: MaxHits results are returned in DB Order (not sorted) then
                                         sorted by ODWEK on the midtier.
   Search with OD_SORT_LOCATION_SERVER:  Search results are sorted at the OnDemand Server, then MaxHits
                                         are returned. This option is only supported with a version 7.1.2.8
                                         server or greater.
 

Parameters:
sortLoc - Constant for SORT_LOCATION
See Also:
ODFolder.getMaxHits(), ODFolder.setMaxHits(int), ODFolder.search(), ODConstant.OD_SORT_LOCATION_NONE, ODConstant.OD_SORT_LOCATION_MIDTIER, ODConstant.OD_SORT_LOCATION_SERVER

getSortLocation

public char getSortLocation()
Get the Sort Location. This determines where sorting of the search results will be done.
Default is OD_SORT_LOCATION_NONE unless the OnDemand Admin has specified OD_SORT_LOCATION_SERVER in the Folder definition.

Returns:
String SortLocation
See Also:
ODFolder.setSortLocation(char), ODConstant.OD_SORT_LOCATION_NONE, ODConstant.OD_SORT_LOCATION_MIDTIER, ODConstant.OD_SORT_LOCATION_SERVER

showHoldStatus

public boolean showHoldStatus()
Determine whether the current OnDemand Hold status should be shown in the hitlist. This will be determined by the OnDemand Administrator and set via Admin Client.

Returns:
boolean

CM OnDemand V8.5 WEK Java APIs

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