Procedure
1. Create a new delegate, such as CustomQuickSearchQueryDelegate.
2. Add an entry about the delegate in the BaseClient.service.properties.xconf file located at WT_HOME/codebase/com/ptc/windchill/baseclient/xconf.
<!-- Custom ECNQuerySearch delegate-->
<Service context="default" name="com.ptc.windchill.baseclient.server.delegate.QuickSearchQueryDelegate">
<Option cardinality="duplicate" requestor="null" serviceClass="com.ptc.windchill.baseclient.server.delegate.CustomQuickSearchQueryDelegate" selector="custom" />
</Service>
The selector is the internal name of the object type.
3. Override the following methods in CustomQuickSearchQueryDelegate:
public TypeInstance[] executeBasicQuerySearch(FindOperationParams fop, TypeIdentifier[] result_types);
Provides logic to build the query that is used to fetch change objects data.
public TypeInstance[] getTypeInstance(WTSet persistableObjects, List<Entity> searchCriteriaList, String resultType);
Provides logic to get the typeInstance array of the search result.
After performing the above steps, the CustomQuickSearchQueryDelegate class appears as shown:
這是否有幫助?