FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface StoredSearch

All Superinterfaces:
BaseObject, ContainableObject, CreatableObject, Document, GettableObject, LockableObject, ReadableMetadataObject, ReadableSecurityObject, java.io.Serializable, ValueObject, VersionableObject, WorkflowTarget, WriteableMetadataObject, WriteableSecurityObject

public interface StoredSearch
extends Document

Not Implemented in CS Java Connector v3.0.

Using the StoredSearch interface, you can retrieve documents, custom objects, or folders from one or more object stores based on search criteria.

When you need to execute the same search multiple times, you can define some or all of the search criteria in a StoredSearch object which you can persist to the object store. A StoredSearch object can be identified as either a stored search or a search template through the setting of its SearchType property value. A stored search or search template can query for one of three object types: Document, CustomObject, or Folder. The SearchingObjectType property on the StoredSearch object identifies the object type.

The StoredSearch object is a subclass of the Document object; its content (the search criteria) is in the form of an XML string. Because a StoredSearch object is persisted to the object store as a Document object, you can use a StoredSearch to retrieve other stored searches.

To create a new StoredSearch object and persist it to an object store, call either the createObject method or the createAndFileObject method on the ObjectStore interface. (Note, however, that although the createAndFileObject method creates the object and files it into a folder in one roundtrip to the Content Services server, it does not support setting content. To have a viable StoredSearch object, you would need to check out the object after you create it, set its content, and check it back in.)

You can instantiate a previously persisted StoredSearch object in the following ways:

You can also instantiate a StoredSearch object by retrieving an individual StoredSearch object from a StoredSearches collection.


Field Summary
static int TYPE_SEARCH
          Identifies the StoredSearch object as a stored search.
static int TYPE_TEMPLATE
          Identifies the StoredSearch object as a search template.
 
Fields inherited from interface com.filenet.wcm.api.Document
LIFECYCLE_CLEAR_EXCEPTION, LIFECYCLE_DEMOTE, LIFECYCLE_NO_CHANGE, LIFECYCLE_PROMOTE, LIFECYCLE_RESET, LIFECYCLE_SET_EXCEPTION, UNKNOWN_CONTENT_LENGTH
 
Fields inherited from interface com.filenet.wcm.api.BaseObject
EXPORT_DEFAULT, EXPORT_ENCODED_CONTENT, EXPORT_FULL, EXPORT_OBJECT_ID, EXPORT_OBJECT_SECURITY, IMPORT_DEFAULT, IMPORT_OBJECT_ID, IMPORT_OWNER, IMPORT_PERMISSIONS, TYPE_ACTIVE_MARKING, TYPE_ANNOTATION, TYPE_ANY, TYPE_CBR_ENGINE_TYPE, TYPE_CHOICE, TYPE_CHOICELIST, TYPE_CLASS_SUBSCRIPTION, TYPE_CLASSDEFINITION, TYPE_CLASSDESCRIPTION, TYPE_COLUMN_DEFINITION, TYPE_COMPUTER, TYPE_CONTENT_CACHE_SERVICE, TYPE_CONTENT_MGR_SERVICE, TYPE_CONTENT_REFERENCE, TYPE_CONTENT_TRANSFER, TYPE_CUSTOMOBJECT, TYPE_DOCUMENT, TYPE_DOCUMENT_CLASSIFICATION_ACTION, TYPE_DOCUMENT_LIFECYCLE_ACTION, TYPE_DOCUMENT_LIFECYCLE_POLICY, TYPE_DOCUMENTSTATE, TYPE_DOMAIN, TYPE_DYNAMIC_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_ENTIRENETWORK, TYPE_EVENT, TYPE_EVENT_ACTION, TYPE_FEATURE_ADD_ON, TYPE_FILESTORE, TYPE_FOLDER, TYPE_GROUP, TYPE_INSTANCE_SUBSCRIPTION, TYPE_LINK, TYPE_LOCALIZED_STRING, TYPE_MARKING_SET, TYPE_MULTIPLEVALUES, TYPE_OBJECT_STORE, TYPE_OBJECTSET, TYPE_OBJSTORE_SERVICE, TYPE_PERMISSION, TYPE_PROPERTY_DEFINITION, TYPE_PROPERTYDESCRIPTION, TYPE_PROPERTYDESCRIPTIONS, TYPE_PUBLISH_REQUEST, TYPE_PUBLISH_TEMPLATE, TYPE_READONLY_OBJECT_SET, TYPE_REALM, TYPE_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_SECURITY_POLICY, TYPE_SECURITY_TEMPLATE, TYPE_STORAGE_POLICY, TYPE_STORED_SEARCH, TYPE_STYLE_TEMPLATE, TYPE_SUBSCRIPTION, TYPE_TABLE_DEFINITION, TYPE_TRANSIENT, TYPE_USER, TYPE_VERSIONSERIES, TYPE_WORKFLOW_CLASS_SUBSCRIPTION, TYPE_WORKFLOW_INSTANCE_SUBSCRIPTION, TYPE_WORKFLOWDEFINITION, TYPE_XML_PROPERTY_MAPPING_SCRIPT
 
Fields inherited from interface com.filenet.wcm.api.ContainableObject
INVALID_CONTAINMENT_NAME_CHARACTERS
 
Fields inherited from interface com.filenet.wcm.api.VersionableObject
APPLY_STATE_ID_IN_PROCESS, APPLY_STATE_ID_RELEASED, APPLY_STATE_ID_RESERVATION, APPLY_STATE_ID_SUPERSEDED, RESERVATION_TYPE_COLLABORATIVE, RESERVATION_TYPE_DEFAULT, RESERVATION_TYPE_EXCLUSIVE, VERSION_STATUS_IN_PROCESS, VERSION_STATUS_RELEASED, VERSION_STATUS_RESERVATION, VERSION_STATUS_SUPERSEDED
 
Method Summary
 BaseObjects execute(java.lang.String executeDataXML)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String executeXML(java.lang.String executeDataXML)
          

Not Implemented in CS Java Connector v3.0.

 ChoiceLists getChoiceLists(SearchPropInfo[] propInfo)
          

Not Implemented in CS Java Connector v3.0.

 ChoiceLists getChoiceLists(java.lang.String[] propNames)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getChoiceListsXML(SearchPropInfo[] propInfo)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getChoiceListsXML(java.lang.String[] propNames)
          

Not Implemented in CS Java Connector v3.0.

 SearchPropertyDescriptions getContentPropertyDescriptions(SearchPropInfo[] propInfo)
          

Not Implemented in CS Java Connector v3.0.

 SearchPropertyDescriptions getContentPropertyDescriptions(java.lang.String[] propNames)
          

Not Implemented in CS Java Connector v3.0.

 TransportInputStream getUIContent()
          

Not Implemented in CS Java Connector v3.0.

 
Methods inherited from interface com.filenet.wcm.api.Document
applySecurityTemplate, applySecurityTemplate, canDemoteLifeCycleState, changeClass, changeLifeCycleState, delete, delete, getAccessMask, getContent, getContentElement, getContentElementObjectTypes, getContentReferenceLocation, getContentReferenceLocation, getContentReferenceMimeType, getContentReferenceMimeType, getFilename, getFilename, getHeadLinks, getHeadLinksXML, getLifeCycleStates, getPermissionsXML, getPublications, getPublicationsXML, getPublishTemplates, getPublishTemplatesXML, getSecurityPolicyXML, getSubscriptions, getTailLinks, getTailLinksXML, getUserAccess, getUserAccess, getUserAccess, getUserAccess, getUserAccessXML, getVersionSeries, getVersionsXML, isDependent, isPublication, publish, raiseEvent, republish, setContent, setContentReference
 
Methods inherited from interface com.filenet.wcm.api.BaseObject
equals, exportObject, getClassId, getId, getName, getObjectStoreId, getObjectType, getSession, hashCode, thisBaseObject
 
Methods inherited from interface com.filenet.wcm.api.ContainableObject
file, file, getContainers, getContainersXML, getContainmentNames, getContainmentPaths, getSecurityParent, setContainmentName, setContainmentName, setSecurityParent, unfile, unfile
 
Methods inherited from interface com.filenet.wcm.api.VersionableObject
cancelCheckout, checkin, checkin, checkout, checkout, demoteVersion, freeze, getReservation, getVersions, getVersions, promoteVersion
 
Methods inherited from interface com.filenet.wcm.api.WorkflowTarget
getWorkflowSubscriptions, getWorkflowSubscriptionsXML, getWorkflowSubscriptionsXML
 
Methods inherited from interface com.filenet.wcm.api.WriteableSecurityObject
setPermissions, setPermissions
 
Methods inherited from interface com.filenet.wcm.api.WriteableMetadataObject
setProperties
 
Methods inherited from interface com.filenet.wcm.api.ReadableMetadataObject
getProperties, getProperties, getPropertiesXML, getPropertyBinaryValue, getPropertyBooleanValue, getPropertyDateValue, getPropertyDoubleValue, getPropertyIntValue, getPropertyStringValue, getPropertyValue, getPropertyValuesValue, refresh, refresh
 
Methods inherited from interface com.filenet.wcm.api.ReadableSecurityObject
getPermissions, getPermissions
 
Methods inherited from interface com.filenet.wcm.api.LockableObject
extendLock, extendLock, isLocked, lock, unlock, unlock
 

Field Detail

TYPE_SEARCH

public static final int TYPE_SEARCH
Identifies the StoredSearch object as a stored search.

See Also:
Constant Field Values

TYPE_TEMPLATE

public static final int TYPE_TEMPLATE
Identifies the StoredSearch object as a search template.

See Also:
Constant Field Values
Method Detail

getUIContent

public TransportInputStream getUIContent()

Not Implemented in CS Java Connector v3.0.

Returns a TransportInputStream object that represents the content of the search template (SearchType property value of TYPE_TEMPLATE). Note that if the search type of this StoredSearch object is TYPE_SEARCH, the method reports an error.

The content returned in the TransportInputStream object contains only the data that would be shown in a user interface. You can use this representation of the content for displaying the template at runtime. The TransportInputStream object also contains the filename of the content's underlying document, as well as the size (in bytes) and MIME type of the content being returned. Hidden fields in the content are not included in the returned TransportInputStream object. Designated when the search template is created, hidden fields are those subclass entries and properties that are not intended to be displayed to a user when mapping content to a user interface. In the XML sample below, the lines in bold text represent the hidden subclass and fields that are not displayed:

 <?xml version="1.0"?>
 <storedsearch xmlns="http://filenet.com/namespaces/wcm/apps/1.0">
 <version dtd="2.0" searchobject="2"/>
    <product name="Search Designer" version="2.0"/>
        <searchspec searchallversions="false">
           <searchtype>
                <template showandorconditions="true" showmaxrecords="true" showoperators="true"/>
            </searchtype>
            <objectstores mergeoption="union">
                <objectstore id="{0E844ED1-0185-4C76-AEA1-E61CC457D756}" name="ObjStoreA"/>
             </objectstores>
             <searchclauses>
                  <select>
                     <selectprops>
                        <selectprop alignment="left" itemid="9" name="Creator" sortlevel="0" sortorder="none" symname="Creator"/>
                        <selectprop alignment="left" itemid="10" name="Search Type" sortlevel="0" sortorder="none" symname="SearchType"/>
                     </selectprops>
                  </select>
                      <from>
                         <class symname="Document"/>
                      </from>
                      <subclasses>
                          <subclass editproperty="hidden" itemid="100" symname="StoredSearch" name="Stored Search"/>
                          <subclass editproperty="editable" itemid="101" symname="PublishTemplate" name="Publish Template"/>
                      </subclasses>

                      <where>
  		         <and>
                            <eq>
                               <whereprop editproperty="editable" itemid="1" name="Creator" symname="Creator">
                                   <propdesc datatype="typestring" haschoices="false" symname="Creator"/>
                               </whereprop>
                               <literal/>
                            </eq>
                            <eq>
                               <whereprop editproperty="hidden" itemid="2" name="Search Type" symname="SearchType">
                                   <propdesc datatype="typelong" haschoices="false" symname="SearchType"/>
                               </whereprop>
                               <literal>1</literal>
                             </eq>
                         </and>
                      </where>
                      <folders/>
                </searchclauses>
                <options maxrecords="100"/>
         </searchspec>
      </storedsearch>

Returns:
A TransportInputStream object representing the content (without hidden fields) of the stored search template.

executeXML

public java.lang.String executeXML(java.lang.String executeDataXML)

Not Implemented in CS Java Connector v3.0.

Executes a stored search and returns an XML String. The returned String represents a collection of BaseObject objects that meet the search criteria. Currently, you can search for only one of three object types: Document, CustomObject, or Folder. The returned objects are of the specified object type. If subclasses are specified in the content, this method returns objects that belong to the specified subclasses.

The executeXML method is typically called in response to an event, such as the end user executing the search from a user interface. The search criteria are values provided by the user at runtime and passed to the method in the executeDataXML parameter. For a template, the caller can provide template data, extra select properties, and a value for maximum results. For a stored search, the caller can provide extra select properties and a value for maximum results. Prior to executing the search, the information passed in the executeDataXML parameter is merged with the stored search's content to complete a template or to provide additional selection criteria. If the caller does not provide extra runtime data, executeDataXML can be empty or null.

Parameters:
executeDataXML - An XML String representation of the values that a user provides at runtime prior to executing the search. Can be empty or null. For documentation that describes the XML schema used to generate the string, refer to Schemas in the FileNet P8 Developer's Roadmap.

Returns:
An XML String representation of the list of Document, CustomObject, or Folder objects that meet the search criteria. The returned XML String is formatted according to the Stored Search XML Schema. For documentation that describes the XML schema used to generate the string, refer to Schemas in the FileNet P8 Developer's Roadmap.

execute

public BaseObjects execute(java.lang.String executeDataXML)

Not Implemented in CS Java Connector v3.0.

Executes a stored search. This method returns a collection of BaseObject objects that meet the search criteria. Currently, you can search for only one of three object types: Document, CustomObject, or Folder. The elements of the returned collection are objects that are of the specified object type. If subclasses are specified in the content, this method returns objects that belong to the specified subclasses.

The execute method is typically called in response to an event, such as the end user executing the search from a user interface. The search criteria are values provided by the user at runtime and passed to the method in the executeDataXML parameter. For a template, the caller can provide template data, extra select properties, and a value for maximum results. For a stored search, the caller can provide extra select properties and a value for maximum results. Prior to executing the search, the information passed in the executeDataXML parameter is merged with the stored search's content to complete a template or to provide additional selection criteria. If the caller does not provide extra runtime data, executeDataXML can be empty or null.

The following is an example of a String that might be passed in the executeDataXML parameter for a search template (remove the highlighted section for a stored search):

 <?xml version="1.0" ?>
  <executedata
    xmlns="http://filenet.com/namespaces/wcm/apps/1.0">
    <templatedata>
    <templateitem itemid="1">tester</templateitem>
    </templatedata>
    <exeselect>
      <exeselectprops>
        <exeselectprop symname="Creator"/>
        <exeselectprop symname="DateCreated"/>
        <exeselectprop symname="IsCurrentVersion" />
        <exeselectprop symname="IsReserved" />
      </exeselectprops>
    </exeselect>
  </executedata> 

The <exeselect> section is optional for both stored searches and templates. If the template does not specify any properties with required values, the executeDataXML parameter can be empty or null.

Parameters:
executeDataXML - An XML String representation of the values that a user provides at runtime prior to executing the search. Can be null or empty. For documentation that describes the XML schema used to generate the string, refer to Schemas in the FileNet P8 Developer's Roadmap.

Returns:
A BaseObjects collection whose elements can represent Document, Folder, and CustomObject objects that meet the search criteria.

getContentPropertyDescriptions

public SearchPropertyDescriptions getContentPropertyDescriptions(java.lang.String[] propNames)

Not Implemented in CS Java Connector v3.0.

Retrieves a collection of SearchPropertyDescription objects based on the content of the stored search. This method is similar in behavior to Search.getPropertyDescriptions, but instead of passing in all of the object stores and a merge option, this method uses the content of the stored search to determine which object stores and merge option to use.

Parameters:
propNames - A String array whose elements specify the symbolic names of the properties whose property descriptions you want to retrieve. If null or the array is empty, this method returns all SearchPropertyDescription objects of properties contained in the where clause. (If you pass in a null, you must first explicitly cast it to a String[] to avoid a compilation error.)

Returns:
A SearchPropertyDescriptions collection. Note that the property descriptions may be from a single object store or from multiple object stores, as specified in the content of the stored search.

getChoiceLists

public ChoiceLists getChoiceLists(java.lang.String[] propNames)

Not Implemented in CS Java Connector v3.0.

Returns a collection of choice list values for a specified set of properties. Because this method can return combined values from more than one object store, the values returned from this method might be different than values returned from the same call on other objects.

Each ChoiceList object in the returned collection corresponds to one of the properties specified in the propNames argument. This method returns hierarchical lists as a flattened list. That is, multi-level choice lists are reduced to a single-dimension list of valid choices. Use your preferred mechanism to retrieve the choice list values from the returned collection of ChoiceList objects.

Parameters:
propNames - A String array whose elements specify the symbolic names of properties whose choice list you want to retrieve. If null or the array is empty, this method returns all ChoiceLists of properties contained in the where clause. (If you pass in a null, you must first explicitly cast it to a String[] to avoid a compilation error.)

Returns:
A ChoiceLists collection.

getChoiceListsXML

public java.lang.String getChoiceListsXML(java.lang.String[] propNames)

Not Implemented in CS Java Connector v3.0.

Returns a String in XML that represents a collection of choice list values corresponding to a specified set of properties. Because this method can return combined values from more than one object store, the values returned from this method may be different than values returned from the same call on other objects.

Each choice list in the returned String corresponds to one of the properties specified in the propNames parameter. This method returns hierarchical lists as a flattened list. That is, multi-level choice lists are reduced to a single-dimension list of valid choices.

Parameters:
propNames - A String array whose elements represent properties whose choice lists you want to retrieve. If null or the array is empty, this method returns all ChoiceLists of properties contained in the where clause. (If you pass in a null, you must first explicitly cast it to a String[] to avoid a compilation error.)

Returns:
A String in XML that represents a list of values for the specified properties. For documentation that describes the XML schema used to generate the string, refer to Schemas in the FileNet P8 Developer's Roadmap.

getChoiceLists

public ChoiceLists getChoiceLists(SearchPropInfo[] propInfo)

Not Implemented in CS Java Connector v3.0.

Returns a collection of choice lists for a set of properties specified as elements of a SearchPropInfo array. This method supports a multiple object types search; valid object types are Document, CustomObject, and Folder.

Because this method can return combined values from more than one object store, the values returned from this method might be different than values returned from the same call on other objects.

The elements of the returned collection represent ChoiceList objects for the classes and properties specified in the propInfo parameter. This parameter is an array of SearchPropInfo elements, each of which specifies the symbolic name of a class and a property. Note, however, that either or both can be specified as empty strings. If the class name is not empty but the property name is empty, this method returns all choice lists of the properties contained in the WHERE clause of the class in the stored search. If the class name is empty, but the property name is not empty, this method returns choice lists for the specified property name belonging to the object type classes in the stored search. If an array element's class name and property name are both empty, the element is ignored.

This method returns hierarchical lists as a flattened list. That is, multi-level choice lists are reduced to a single-dimension list of valid choices. Use your preferred mechanism to retrieve the choice list values from the returned collection of ChoiceList objects.

Parameters:
propInfo - A SearchPropInfo array. A ChoiceList object is returned for each class and property in the input array for which the property has an associated choice list. If null or the array is empty, this method returns ChoiceList objects for the properties contained in the WHERE clause in the stored search object type classes. (If you pass in a null, you must first explicitly cast it to a SearchPropInfo[] to avoid a compilation error.)

Returns:
A collection of ChoiceList objects whose elements correspond to the specified set of properties.

getChoiceListsXML

public java.lang.String getChoiceListsXML(SearchPropInfo[] propInfo)

Not Implemented in CS Java Connector v3.0.

Returns an XML representation of ChoiceList objects that correspond to a set of properties you specify as elements of a SearchPropInfo array. This method supports a multiple object types search; valid object types are Document, CustomObject, and Folder.

Because this method can return combined values from more than one object store, the values returned from this method might be different than values returned from the same call on other objects.

Each choice list in the returned String corresponds to one of the properties specified in the propInfo parameter. This method returns hierarchical lists as a flattened list. That is, multi-level choice lists are reduced to a single-dimension list of valid choices.

Parameters:
propInfo - A SearchPropInfo array whose elements represent the properties whose choice lists you want to retrieve. If null or an empty array, this method returns all ChoiceList objects for the specified object stores. (If you pass in a null, you must first explicitly cast it to a SearchPropInfo[] to avoid a compilation error.)

Returns:
A String containing an XML representation of ChoiceList objects that correspond to the specified set of properties.

getContentPropertyDescriptions

public SearchPropertyDescriptions getContentPropertyDescriptions(SearchPropInfo[] propInfo)

Not Implemented in CS Java Connector v3.0.

Returns a collection of SearchPropertyDescription objects based on the content of the stored search. This method supports a multiple object types search; valid object types are Document, CustomObject, and Folder.

This method is similar in behavior to the getPropertyDescriptions methods on the Search interface, but instead of passing in all of the object stores and a merge option, it uses the content of the stored search to determine which object stores and merge option to use.

The elements of the returned collection represent property descriptions for the classes and properties specified in the propInfo parameter. This parameter is an array of SearchPropInfo elements. Each element of the array specifies the symbolic names of a class and a property. Note, however, that either or both can be specified as an empty string. If the class name is not empty but the property name is empty, property descriptions contained in the where clause of the class in the stored search will be returned. If the class name is empty but the property name is not empty, property descriptions with the specified property name belong to the object type classes in the stored search will be returned. If an array element's class name and property name are both empty, the element will be ignored.

Do not call refresh() SearchPropertyDescriptions objects returned in the collection.

Parameters:
propInfo - A SearchPropInfo array whose elements represent the properties whose property descriptions you want to retrieve. If null or the array is empty, this method returns all SearchPropertyDescription objects of properties contained in the WHERE clause in the stored search object type classes. (If you pass in a null, you must first explicitly cast it to a SearchPropInfo[] to avoid a compilation error.)

Returns:
A SearchPropertyDescriptions collection. Note that the property descriptions may be from a single object store or from multiple object stores, as specified in the content of the stored search.

FileNet Content Services
Java Connector v3.0