com.filenet.wcm.toolkit.server.dp
Class WcmSearchDataProvider

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.WcmDpContainer
      extended bycom.filenet.wcm.toolkit.server.base.WcmModule
          extended bycom.filenet.wcm.toolkit.server.base.WcmDpModule
              extended bycom.filenet.wcm.toolkit.server.dp.WcmSearchDataProvider
All Implemented Interfaces:
WcmDpModuleInterface, WcmModuleInterface

public class WcmSearchDataProvider
extends WcmDpModule

WcmSearchDataProvider provides XML data to other classes in the project. In most cases data is derived from making calls to the JavaAPI and returned as a XML Document object. Some methods implement internal caching.


Field Summary
static java.lang.String EMPTY_XML
          Empty XML String
static org.w3c.dom.Document EMPTY_XML_DOCUMENT
          Empty XML Document
static java.lang.String TYPE
          Full class name
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmDpModule
cache
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
locale, NAME_DELIMITER
 
Constructor Summary
WcmSearchDataProvider()
           
 
Method Summary
static boolean checkForChoiceLists(org.w3c.dom.Document searchDefinition)
          Deprecated. use getChoiceList() method
static boolean checkForUserListProperties(org.w3c.dom.Document searchDefinition)
          Deprecated. not needed
 org.w3c.dom.Document executeSearch(java.lang.String sSQL)
          Executes SQL statement and returns results as a DOM Document.
 org.w3c.dom.Document getAllObjectStores(boolean refresh)
          Deprecated. use WcmNavigationDataProvider.getObjectStoresDoc() method
 org.w3c.dom.Document getAllSearchTemplates(java.lang.String objectStoreName, java.lang.String nameProperty, int searchingObjectType, boolean refresh)
          Deprecated. Returns a list of all search templates found in the object store. Results are cached by the data provider.
 org.w3c.dom.Document getChoiceList(org.w3c.dom.Document searchUIDefinition)
          Returns a DOM Document object containing choice lists for applicable "where" properties in the specified stored search.
 org.w3c.dom.Document getChoiceList(org.w3c.dom.Document searchUIDefinition, org.w3c.dom.Document searchDefinition, org.w3c.dom.Document searchResponseXML)
          Returns a DOM Document object containing choice lists for applicable "where" properties in the specified stored search.
 org.w3c.dom.Document getChoiceList(java.lang.String objectStoreName, java.lang.String searchID)
          Deprecated. use the other getChoiceList method
 com.filenet.wcm.api.ChoiceList getChoiceList(java.lang.String objectStoreID, java.lang.String cvlValueID, int depth)
          Return a property choice list by CVL value ID.
 com.filenet.wcm.api.ChoiceList getChoiceList(java.lang.String objectStoreName, java.lang.String className, java.lang.String propName)
          Deprecated. Returns a ChoiceList object containing choice list for a class and property.
 org.w3c.dom.Document getFilterDataResults(org.w3c.dom.Document filterDataXML)
          Returns an org.w3c.dom.Document of objects
 org.w3c.dom.Document getFilterDataResults(FilterData filterData)
          Returns an org.w3c.dom.Document of objects
 java.util.List getMarkings(java.lang.String objectStoreName, java.lang.String symName)
          Returns a list of String[] containing 2 values.
 org.w3c.dom.Document getSearchDefinition(java.lang.String objectStoreName, java.lang.String searchID)
           
 org.w3c.dom.Document getSearchDefinition(java.lang.String objectStoreName, java.lang.String searchID, boolean refresh)
          Returns a DOM Document object that contains the search definition.
 org.w3c.dom.Document getSearchDefinition(java.lang.String objectStoreName, java.lang.String searchID, boolean UIContentOnly, boolean refresh)
           
 java.io.InputStream getSearchDefinitionInputStream(java.lang.String sObjectStore, java.lang.String sSearchID)
          This method returns an InputStream object containing the definition of the stored search.
static org.w3c.dom.Document getSearchRequest(java.util.Set selectProperties, java.util.Map propertyItems, java.util.Map verityItems, java.util.Set excludedClasses, int maxRecords)
          Deprecated. use SearchExecuteData class to generate search request XML. This method will return null in this version. It will be removed later.
 org.w3c.dom.Document getSearchResults(java.lang.String sObjectStore, java.lang.String sSearchID, org.w3c.dom.Document oSearchResponseXML)
          Deprecated. Executes a stored search, and returns the results as a DOM Document. No caching is done by this method. Same as getSearchResults(String,String,String), but takes a DOM document instead of String for response XML
 org.w3c.dom.Document getSearchResults(java.lang.String objectStoreName, java.lang.String searchID, java.lang.String searchResponseXML)
          Executes a stored search, and returns the results as a DOM Document.
 java.lang.String getSearchResultsXML(java.lang.String objectStoreName, java.lang.String searchID, org.w3c.dom.Document searchResponseXML)
          Executes a stored search, and returns the results as an XML String.
 void initialize()
          Called by WcmController when the module is registered, and has access to the data store.
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpModule
type
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
addChild, addChild, addChild, cleanup, debugTrace, getClassProperty, getClassProperty, getClassPropertyKeys, getConfiguration, getController, getDataStore, getModuleProperty, getModuleProperty, getModuleProperty, getModuleProperty, getModulePropertyKeys, getName, getParent, getWindowProperty, getWindowProperty, persist, queryDataProvider, setClassProperty, setClassProperty, setController, setModuleProperty, setModuleProperty, setName, setParent, setPortletParent, setWindowProperty
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpContainer
addDataProvider, addDataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
addDataProvider, cleanup, getDataStore, getModuleProperty, getName, getParent, persist, queryDataProvider, setController, setModuleProperty, setName, setParent
 

Field Detail

TYPE

public static final java.lang.String TYPE
Full class name

See Also:
Constant Field Values

EMPTY_XML

public static final java.lang.String EMPTY_XML
Empty XML String

See Also:
Constant Field Values

EMPTY_XML_DOCUMENT

public static org.w3c.dom.Document EMPTY_XML_DOCUMENT
Empty XML Document

Constructor Detail

WcmSearchDataProvider

public WcmSearchDataProvider()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Description copied from interface: WcmModuleInterface
Called by WcmController when the module is registered, and has access to the data store. Do "constructor" types of things here.

Specified by:
initialize in interface WcmModuleInterface
Overrides:
initialize in class WcmModule
Throws:
java.lang.Exception

getSearchDefinition

public org.w3c.dom.Document getSearchDefinition(java.lang.String objectStoreName,
                                                java.lang.String searchID,
                                                boolean refresh)
                                         throws java.lang.Exception
Returns a DOM Document object that contains the search definition.

Parameters:
objectStoreName - Object Store name or ID
searchID - Search ID
Returns:
XML Document with the search definition
Throws:
java.lang.Exception - If there are problems retrieving data

getSearchDefinition

public org.w3c.dom.Document getSearchDefinition(java.lang.String objectStoreName,
                                                java.lang.String searchID)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getSearchDefinition

public org.w3c.dom.Document getSearchDefinition(java.lang.String objectStoreName,
                                                java.lang.String searchID,
                                                boolean UIContentOnly,
                                                boolean refresh)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getMarkings

public java.util.List getMarkings(java.lang.String objectStoreName,
                                  java.lang.String symName)
Returns a list of String[] containing 2 values. first is marking name, second is marking value

Parameters:
objectStoreName -
symName - for a property description
Returns:
List of String[] objects

getChoiceList

public org.w3c.dom.Document getChoiceList(org.w3c.dom.Document searchUIDefinition)
                                   throws java.lang.Exception
Returns a DOM Document object containing choice lists for applicable "where" properties in the specified stored search. If there are no properties with a choice list, this method returns null

Returns:
XML Document with the choice list, or null when no choice lists exist
Throws:
java.lang.Exception - If there are problems retrieving data

getChoiceList

public org.w3c.dom.Document getChoiceList(org.w3c.dom.Document searchUIDefinition,
                                          org.w3c.dom.Document searchDefinition,
                                          org.w3c.dom.Document searchResponseXML)
                                   throws java.lang.Exception
Returns a DOM Document object containing choice lists for applicable "where" properties in the specified stored search. If there are no properties with a choice list, this method returns null

Parameters:
searchUIDefinition - The XML content from the getUIContent retrieval.
searchDefinition - The XML content from the store search getContent retrieval. The merging of choice list item will be pulling the subblasses items from this XML inorder to get all subclasses including hidden items.
searchResponseXML - The search execute data XML.
Returns:
XML Document with the choice list, or null when no choice lists exist
Throws:
java.lang.Exception - If there are problems retrieving data

getChoiceList

public com.filenet.wcm.api.ChoiceList getChoiceList(java.lang.String objectStoreID,
                                                    java.lang.String cvlValueID,
                                                    int depth)
                                             throws java.lang.Exception
Return a property choice list by CVL value ID. Cached data will be stored in module property bag identified by PROP_CHOICE_LIST + objectStoreID + propertyID.

Parameters:
objectStoreID - GUID format of Object Store ID.
cvlValueID - GUID format of CVL value ID.
depth - depth of CVL values. -1 value gets all.
Returns:
ChoiceList Return ChoiceList object
Throws:
java.lang.Exception - If there are problems retrieving data or with an invalid parameter.

getChoiceList

public com.filenet.wcm.api.ChoiceList getChoiceList(java.lang.String objectStoreName,
                                                    java.lang.String className,
                                                    java.lang.String propName)
                                             throws java.lang.Exception
Deprecated. Returns a ChoiceList object containing choice list for a class and property.

Parameters:
objectStoreName - Object Store name or ID
className - class
propName - class
Returns:
ChoiceList object from objectStore name of class className for prop propName
Throws:
java.lang.Exception - If there are problems retrieving data

getSearchDefinitionInputStream

public java.io.InputStream getSearchDefinitionInputStream(java.lang.String sObjectStore,
                                                          java.lang.String sSearchID)
                                                   throws java.lang.Exception
This method returns an InputStream object containing the definition of the stored search. No caching is done in this method.

Parameters:
sObjectStore - Object Store name or ID
sSearchID - Search ID
Returns:
InputStream containing the search definition in Unicode
Throws:
java.lang.Exception - If there are problems retrieving data

getSearchResults

public org.w3c.dom.Document getSearchResults(java.lang.String objectStoreName,
                                             java.lang.String searchID,
                                             java.lang.String searchResponseXML)
                                      throws java.lang.Exception
Executes a stored search, and returns the results as a DOM Document. No caching is done by this method.

Parameters:
objectStoreName - Object Store name or ID
searchID - Search ID
searchResponseXML - Response XML
Returns:
XML Document with the search results
Throws:
java.lang.Exception - If there are problems retrieving data

executeSearch

public org.w3c.dom.Document executeSearch(java.lang.String sSQL)
                                   throws java.lang.Exception
Executes SQL statement and returns results as a DOM Document. No caching is done by tihs method.

Parameters:
sSQL - SQL Statement
Returns:
XML Document with the results in ADO format
Throws:
java.lang.Exception - If there are problems executing the query

getFilterDataResults

public org.w3c.dom.Document getFilterDataResults(org.w3c.dom.Document filterDataXML)
                                          throws java.lang.Exception
Returns an org.w3c.dom.Document of objects

Parameters:
filterDataXML - XML to filter items
Returns:
Document of contents
Throws:
java.lang.Exception - If there are problems.

getFilterDataResults

public org.w3c.dom.Document getFilterDataResults(FilterData filterData)
                                          throws java.lang.Exception
Returns an org.w3c.dom.Document of objects

Parameters:
filterData - XML to filter items
Returns:
Document of contents
Throws:
java.lang.Exception - If there are problems.

getSearchResults

public org.w3c.dom.Document getSearchResults(java.lang.String sObjectStore,
                                             java.lang.String sSearchID,
                                             org.w3c.dom.Document oSearchResponseXML)
                                      throws java.lang.Exception
Deprecated. Executes a stored search, and returns the results as a DOM Document. No caching is done by this method. Same as getSearchResults(String,String,String), but takes a DOM document instead of String for response XML

Parameters:
sObjectStore - Object Store name or ID
sSearchID - Search ID
oSearchResponseXML - Response XML as DOM Document
Returns:
XML Document with the search results
Throws:
java.lang.Exception - If there are problems retrieving data

getSearchResultsXML

public java.lang.String getSearchResultsXML(java.lang.String objectStoreName,
                                            java.lang.String searchID,
                                            org.w3c.dom.Document searchResponseXML)
                                     throws java.lang.Exception
Executes a stored search, and returns the results as an XML String. No caching is done by this method. Same as getSearchResults(String,String,String), but takes a DOM document instead of String for response XML

Parameters:
objectStoreName - Object Store name or ID
searchID - Search ID
searchResponseXML - Response XML as DOM Document
Returns:
XML String with the search results
Throws:
java.lang.Exception - If there are problems retrieving data

getAllSearchTemplates

public org.w3c.dom.Document getAllSearchTemplates(java.lang.String objectStoreName,
                                                  java.lang.String nameProperty,
                                                  int searchingObjectType,
                                                  boolean refresh)
                                           throws java.lang.Exception
Deprecated. Returns a list of all search templates found in the object store. Results are cached by the data provider.

Parameters:
objectStoreName - Object Store name or ID
refresh - A flag to refresh the cache.
nameProperty - name property for documents
searchingObjectType - integer to indicate the objects that will be returned by the search template. Default is 0, which means searches for all objects will be shown. Other values are: BaseObject.TYPE_DOCUMENT, BaseObject.TYPE_FOLDER, BaseObject.TYPE_CUSTOM_OBJECT;
Returns:
XML Document with all search templates in the object store
Throws:
java.lang.Exception - If there are problems retrieving data

getSearchRequest

public static org.w3c.dom.Document getSearchRequest(java.util.Set selectProperties,
                                                    java.util.Map propertyItems,
                                                    java.util.Map verityItems,
                                                    java.util.Set excludedClasses,
                                                    int maxRecords)
                                             throws java.lang.Exception
Deprecated. use SearchExecuteData class to generate search request XML. This method will return null in this version. It will be removed later.

Throws:
java.lang.Exception

checkForChoiceLists

public static boolean checkForChoiceLists(org.w3c.dom.Document searchDefinition)
Deprecated. use getChoiceList() method


checkForUserListProperties

public static boolean checkForUserListProperties(org.w3c.dom.Document searchDefinition)
Deprecated. not needed


getAllObjectStores

public org.w3c.dom.Document getAllObjectStores(boolean refresh)
                                        throws java.lang.Exception
Deprecated. use WcmNavigationDataProvider.getObjectStoresDoc() method

Throws:
java.lang.Exception

getChoiceList

public org.w3c.dom.Document getChoiceList(java.lang.String objectStoreName,
                                          java.lang.String searchID)
                                   throws java.lang.Exception
Deprecated. use the other getChoiceList method

Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.