Class ecm.model._SearchTemplateBase
Extends
ecm.model._ContentItem.
Base class for search templates, for example, ecm.model.SearchTemplate and
ecm.model.UnifiedSearchTemplate
Defined in: <ecm\model\_SearchTemplateBase.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Indicates whether this search is configured to match all of the search criteria.
|
|
Indicates whether invalid references were automatically resolved during search criteria retrieval.
|
|
Indicates whether this search is configured to run automatically when opened.
|
|
A boolean value indicating whether to cache search results.
|
|
The description of this search.
|
|
A boolean value indicating whether the search from class is invalid.
|
|
A boolean value indicating whether the search folder is invalid.
|
|
A boolean value indicating whether a referenced property is invalid.
|
|
A boolean value indicating whether the search repository is invalid.
|
|
The ID of the folder in which to file the search when saved.
|
|
A ecm.model.SearchConfiguration object.
|
|
An array of ecm.model.SearchCriterion objects.
|
|
Indicates whether this search is configured to be shown in the folder structure of the repository it is filed
in.
|
|
A universally unique ID that is used to distinguish cloned instances of the same search in the model.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
clone()
Returns a clone of this search.
|
|
containsEqualCriteria(searchTemplate)
Returns true if the criteria of the specified search is equal to this ones.
|
|
equals(object)
Returns true if the other object represents the same item as this one.
|
|
Returns an UUID for this search.
|
|
isAttributeHidden(attributeId)
Return true if the given attribute is hidden.
|
|
Returns true if this search is configured to run automatically when opened.
|
|
isLoaded()
Return true if this search has been loaded from the repository.
|
|
Returns true if this search was built in Content Navigator.
|
|
isNew()
Returns true if this search has not been saved.
|
|
Returns true if this search is configured to be shown in the folder structure of the repository it is filed
in.
|
|
onSearchCompleted(results)
Overrides
ecm.model._SearchMixin.onSearchCompleted to cache the results. |
|
onSearchCriteriaRetrieved(searchTemplate)
Event fired when the search criteria has been retrieved.
|
|
onUnsupportedSearchCriteriaRetrieved(searchTemplate)
Event fired when unsupported search criteria is retrieved.
|
|
refresh()
Overrides
ecm.model.Contentitem.refresh to clear cached results. |
|
retrieveSearchCriteria(callback, editMode, teamspaceId, refresh, autoResolve, synchronous, version, errorCallback)
Retrieve the search criteria for this search template
|
|
save(callback)
Saves this search in the repository.
|
|
search(callback, sortProperty, descending, teamspace, errorCallback, useCache)
Runs the search.
|
|
toJson()
Returns the JSON representation of this search.
|
Field Detail
andSearch
Indicates whether this search is configured to match all of the search criteria.
autoResolved
Indicates whether invalid references were automatically resolved during search criteria retrieval.
autoRun
Indicates whether this search is configured to run automatically when opened.
cacheResults
A boolean value indicating whether to cache search results. Cached results, if available, are used
when the
search
method is invoked with the useCache
argument set to true.
- Since:
- 3.0.10
description
The description of this search.
invalidClass
A boolean value indicating whether the search from class is invalid.
invalidFolder
A boolean value indicating whether the search folder is invalid.
invalidProperty
A boolean value indicating whether a referenced property is invalid.
invalidRepository
A boolean value indicating whether the search repository is invalid.
parentFolderId
The ID of the folder in which to file the search when saved.
searchConfig
A ecm.model.SearchConfiguration object.
searchCriteria
An array of ecm.model.SearchCriterion objects.
showInTree
Indicates whether this search is configured to be shown in the folder structure of the repository it is filed
in.
UUID
A universally unique ID that is used to distinguish cloned instances of the same search in the model.
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
- An instance of ecm.model._SearchTemplateBase
equals(object)
Returns true if the other object represents the same item as this one.
- Parameters:
- object
- An object
generateUUID()
Returns an UUID for this search.
isAttributeHidden(attributeId)
Return true if the given attribute is hidden.
- Parameters:
- attributeId
- The ID of the attribute
isAutoRun()
Returns true if this search is configured to run automatically when opened.
isLoaded()
Return true if this search has been loaded from the repository.
- Since:
- 2.0.2
isNavigatorSavedSearch()
Returns true if this search was built in Content Navigator.
isNew()
Returns true if this search has not been saved.
isShowInTree()
Returns true if this search is configured to be shown in the folder structure of the repository it is filed
in.
onSearchCompleted(results)
Overrides
ecm.model._SearchMixin.onSearchCompleted
to cache the results.
- Parameters:
- results
onSearchCriteriaRetrieved(searchTemplate)
Event fired when the search criteria has been retrieved.
- Parameters:
- searchTemplate
- An instance of ecm.model._SearchTemplateBase
onUnsupportedSearchCriteriaRetrieved(searchTemplate)
Event fired when unsupported search criteria is retrieved.
- Parameters:
- searchTemplate
- An instance of ecm.model._SearchTemplateBase
refresh()
Overrides
ecm.model.Contentitem.refresh
to clear cached results.
retrieveSearchCriteria(callback, editMode, teamspaceId, refresh, autoResolve, synchronous, version, errorCallback)
Retrieve the search criteria for this search template
- Parameters:
- callback
- A callback function to be called after the search criteria has been retrieved
- editMode
- A string value indicating the edit mode of the criteria (ie. "edit" or "search")
- teamspaceId
- A string value hold the teamspace id if search is scoped to a teamspace (maybe null).
- refresh
- A boolean value indicating whether the search should use cached criteria (if it exists)
- autoResolve
- A flag indicating whether the criteria supports automatic resolution
- synchronous
- Indicates whether the criteria is retrieved synchronously
- version
- The version to be retrieved, i.e., "current", "released", or "specific" (optional). If not
specified or
editMode
is "edit", the released version is retrieved. - errorCallback
- A callback function to be invoked when an error occurs
save(callback)
Saves this search in the repository.
- Parameters:
- callback
- A callback function to be invoked with the updated search
search(callback, sortProperty, descending, teamspace, errorCallback, useCache)
Runs the search.
- Parameters:
- callback
- A function called with a {@ecm.model.ResultSet} object when the search has completed running
- sortProperty
- The ID of the attribute to sort by
- descending
- Specifies whether to sort the results in descending order
- teamspace
- An optional ecm.model.Teamspace object
- errorCallback
- A function called with the response object when the search fails
- useCache
- A boolean value indicating whether to use cached results if they are available and the criteria has not changed since the last search
- Returns:
- A ecm.model.Request object or null if the results are retrieved from cache
toJson()
Returns the JSON representation of this search.