|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Not Implemented in CS Java Connector v3.0.
Using theStoredSearch
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:
getObject
method on an
ObjectStore
object, which returns a
StoredSearch
object.
getContainees(typesReturned)
method on a
Folder
object, specifying
TYPE_STORED_SEARCH
in the typesReturned
parameter,
which returns the StoredSearch
objects filed in the folder.
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.ContainableObject |
INVALID_CONTAINMENT_NAME_CHARACTERS |
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.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 |
public static final int TYPE_SEARCH
StoredSearch
object as a stored search.
public static final int TYPE_TEMPLATE
StoredSearch
object as a search template.
Method Detail |
public TransportInputStream getUIContent()
Not Implemented in CS Java Connector v3.0.
Returns aTransportInputStream
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>
TransportInputStream
object representing the content
(without hidden fields) of the stored search template.public java.lang.String executeXML(java.lang.String executeDataXML)
Not Implemented in CS Java Connector v3.0.
Executes a stored search and returns an XMLString
. 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
.
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.
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.public BaseObjects execute(java.lang.String executeDataXML)
Not Implemented in CS Java Connector v3.0.
Executes a stored search. This method returns a collection ofBaseObject
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
.
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.
BaseObjects
collection whose elements can represent
Document
, Folder
, and CustomObject
objects that meet the search criteria.public SearchPropertyDescriptions getContentPropertyDescriptions(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Retrieves a collection ofSearchPropertyDescription
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.
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.)
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.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.
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.)
ChoiceLists
collection.public java.lang.String getChoiceListsXML(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Returns aString
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.
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.)
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.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 aSearchPropInfo
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.
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.)
ChoiceList
objects whose elements
correspond to the specified set of properties.public java.lang.String getChoiceListsXML(SearchPropInfo[] propInfo)
Not Implemented in CS Java Connector v3.0.
Returns an XML representation ofChoiceList
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.
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.)
String
containing an XML representation of ChoiceList
objects that correspond to the specified set of properties.public SearchPropertyDescriptions getContentPropertyDescriptions(SearchPropInfo[] propInfo)
Not Implemented in CS Java Connector v3.0.
Returns a collection ofSearchPropertyDescription
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.
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.)
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 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |