Class ecm.model.UnifiedSearchTemplate


Extends ecm.model._SearchTemplateBase.
Represents a unified search template that can be stored in a repository and be used to search in multiple repositories simultaneously. To improve performance, the search criteria are not loaded initially. Instead, the retrieveSearchCriteria method must be called to initiate an asynchronous request to make them available.
Defined in: <ecm\model\UnifiedSearchTemplate.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Constructs a unified search template.

Field Summary

Field Attributes Field Name and Description
 
An array of ecm.model.AttributeMapping objects.
 
An array of ecm.model.SearchRepository objects.
 
An object holding the text search criteria.
Fields borrowed from class ecm.model._SearchTemplateBase:
andSearch, autoResolved, autoRun, description, invalidClass, invalidFolder, invalidProperty, invalidRepository, parentFolderId, searchConfig, searchCriteria, showInTree, UUID

Method Summary

Method Attributes Method Name and Description
 
Returns a clone of this search.
 
containsEqualCriteria(searchTemplate)
Returns true if the criteria of the specified search is equal to this ones.
 
Returns an array of pseudo ecm.model.AttributeDefinition objects that can be used to represent attribute mappings.
 
search(callback, sortProperty, descending, teamspace, errorCallback)
Runs the search.
 
Returns the JSON representation of this search.
Methods borrowed from class ecm.model._SearchTemplateBase:
equals, generateUUID, isAttributeHidden, isAutoRun, isLoaded, isNavigatorSavedSearch, isNew, isShowInTree, onSearchCriteriaRetrieved, onUnsupportedSearchCriteriaRetrieved, retrieveSearchCriteria, save

Constructor Detail

ecm.model.UnifiedSearchTemplate(properties)

Constructs a unified search template.
Parameters:
properties
The properties of the unified search template. The properties can be any of the public fields as defined bellow, plus those of the ecm.model.ContentItem, ecm.model.Item, and ecm.model._ModelObject.
Since:
2.0.2

Field Detail

attributeMappings

An array of ecm.model.AttributeMapping objects.

searchRepositories

An array of ecm.model.SearchRepository objects.

textSearchCriteria

An object holding the text search criteria.
Since:
2.0.3.6

Method Detail

clone()

Returns a clone of this search.

containsEqualCriteria(searchTemplate)

Returns true if the criteria of the specified search is equal to this ones.
Parameters:
searchTemplate
A ecm.model.UnifiedSearchTemplate object

getAttributeDefinitions()

Returns an array of pseudo ecm.model.AttributeDefinition objects that can be used to represent attribute mappings.

search(callback, sortProperty, descending, teamspace, errorCallback)

Runs the search.
Parameters:
callback
A callback function to be invoked with a ecm.model.ResultSet object when the search has completed running
sortProperty
The ID of an attribute mapping to sort by
descending
Indicates whether the results are sorted in descending order
teamspace
An optional ecm.model.Teamspace object (not applicable to unified searches)
errorCallback
A callback function to be invoked when an error occurs

toJson()

Returns the JSON representation of this search.