Search-Objects
The Search-Objects webject provides federated search capability for searches against multiple types in a single query based on both modeled and global attribute values. Global, modeled, and derived attributes can be returned in the result set.
Syntax
<ie:webject name="Search-Objects" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="ATTRIBUTE_TYPE_CONTEXT"
data="attributeTypeContext"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="COMPONENT_ID" data="componentId"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="CONTAINER_TYPE" data="containerType"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="ITERATION" data="[ALL | LATEST]"/>
<ie:param name="MEMBER_OF" data="memberOf"/>
<ie:param name="PAGE_COUNT" data="pageCount"/>
<ie:param name="PAGE_OFFSET" data="pageOffset"/>
<ie:param name="PAGING_SESSION_ID" data="pagingSessionId"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SORTBY" data="sortBy"/>
<ie:param name="SORTED" data="sorted"/>
<ie:param name="TYPE" data="type"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="VERSION" data="[ALL | LATEST]"/>
<ie:param name="WHERE" data="where_clause"/>
</ie:webject>
Parameters
Required
Interdependent
Optional
INSTANCE
ATTRIBUTE_TYPE_CONTEXT
ACCEPT_LANGUAGE
WHERE
AUTHORIZATION
ATTRIBUTE
CONTAINER_REF
COMPONENT_ID
DBUSER
CONNECTION_ATTEMPTS
PASSWD
CONNECTION_ATTEMPT_INTERVAL
TYPE
CONTAINER_TYPE
FORMAT
GROUP_OUT
ITERATION
MEMBER_OF
PAGE_COUNT
PAGE_OFFSET
PAGING_SESSION_ID
SORTBY
SORTED
UNFORMATTED
VERSION
* 
If a parameter is listed in the table but is not defined below, then it has a common parameter definition. For descriptions of those parameters, see Common Webject Parameters section in Adapter Webjects Overview.
ATTRIBUTE_TYPE_CONTEXT
Specifies the type of context within which the specified attributes are to be searched.
If only one TYPE parameter value is specified, and this is left blank, then the ATTRIBUTE_TYPE_CONTEXT value defaults to the value of TYPE.
If more than one type is specified, then this parameter is required and an exception is thrown if it is not specified. For most multiple-type searches, this should be set to wt.fc.Persistable.
COMPONENT_ID
The string that specifies which client component is invoking the search. It is used to select the list of classes to query against as defined in com\ptc\windchill\enterprise\search\server\SearchableTypes.properties.
This parameter is optional.
CONTAINER_REF
A Windchill context to apply the webject against. This parameter accepts the following types of input:
The UFID of a Windchill context. Multiple UFIDs can be specified for this parameter.
MEMBERSHIP—The query finds only those contexts of which the user is a member.
When this parameter is specified, the scope of queries executed against the TYPE and WHERE parameters are restricted to the associated context.
CONTAINER_TYPE
A single context type to constrain a query against. This parameter is optional.
GROUP_OUT
The name of the output group containing the results. If this parameter is omitted, then the name of the output group is constructed by appending the string “-Output” to the webject name. This parameter is optional.
ITERATION
Specifies where to return all or latest iterations of any iterated objects in the results. Accepted values are ALL or LATEST. The default for this parameter is LATEST. This parameter is optional.
MEMBER_OF
Specifies whether or not to constrain a query against contexts that the current user is a member of. This parameter is optional.
PAGE_COUNT
The number of objects to return per page in query result. This parameter is optional.
PAGE_OFFSET
The number of objects to offset by for a paged query result. This parameter is optional.
PAGING_SESSION_ID
The unique identifier for the current paging session. This is a system-generated value that is added to the output group for the query result.
If PAGING_SESSION_ID is specified, the next page of results is fetched from it. Otherwise, a new query is performed.
SORTBY
Specifies a set of attributes whose sorting orders are specified by the SORTED parameter to be sorted by and returned by the query.
Multiple values can be specified for this parameter. If multiple values are specified, then the first value is the primary sort attribute, the second value is the secondary sort attribute, and so on.
When multiple values are involved, if the list of SORTED parameters is shorter than the list of SORTBY parameters, then the last SORTED is used for the difference.
For example:
SORTBY=a SORTED=ASC
SORTBY=b SORTED=DESC
SORTBY=c
SORTBY=d
Both c and d would use descending order. If you do not specify SORTED, then all SORTBY values use ascending as it is the default value. This parameter is optional.
SORTED
Specifies whether the current attribute to sort by should be sorted as descending (DESC) or ascending (ASC). Multiple values can be specified for this parameter. The default value is ASC. This parameter is optional.
SORTED only produces sorted output if the SORTBY parameter is specified.
TYPE
The set of Windchill object types to constrain the search against. For example, wt.part.WTPart or wt.doc.WTDocument. If more than one type is specified, ATTRIBUTE_TYPE_CONTEXT must also be specified.
VERSION
Specifies whether to return all, latest, or specific versions of any versioned objects in the results. Accepted values are ALL, LATEST or SPECIFIC. The default for this parameter is ALL. This parameter is optional.
WHERE
Specifies a where clause in terms of (attribute name = 'value') pairs. Attributes should be the valid attributes of the object types specified in the TYPE parameter.
When specifying a where clause, consider the following to ensure that you enter the proper syntax:
Attribute syntax:
When creating a where clause for a single attribute case, the following is the proper syntax:
<ie:param name="WHERE" data="(name='1660043')"/>
When creating a where clause for a multi-attribute case, the following is the proper syntax:
For OR:
<ie:param name="WHERE" data="((name='1660043')|(number="1"))"/>
For AND:
<ie:param name="WHERE" data="((name='1660043')&(number="1"))"/>
Wildcard syntax:
The wildcard designation for this clause is the asterisk (*). The following shows the proper syntax when using a wildcard:
<ie:param name="WHERE" data="(name='*abc*')"/>
Backslashes
When using a backslash (\) in the attribute name field, \ is escaped by three backslashes preceding the first backslash. For example, to find a part named test\part0 using this webject, the proper syntax for the where clause is as follows:
<ie:param name="WHERE" data="(name='test\\\\part0')"/>
When using the wildcard designation to search for objects with a backslash (\) in the attribute name field, use the same procedure of preceding the first backslash with three backslashes. For example, the following syntax finds all objects that contains \ in the attribute name:
<ie:param name="WHERE" data="(name='*\\\\*')"/>
This parameter is required. If there are no attributes to be given in the where clause, then it should be "()".
도움이 되셨나요?