Class ContentSearchModel
The class is the central interface to a content search result and a content search refinement. It also provides utility methods to generate a search URL.
| Constant | Description |
|---|---|
| CONTENTID_PARAMETER: String = "cid" | URL Parameter for the content ID |
| FOLDERID_PARAMETER: String = "fdid" | URL Parameter for the folder ID |
| Property | Description |
|---|---|
content: Iterator (read-only) | Returns an Iterator containing all Content Assets that are the result of the search. |
| contentID: String | Returns the content ID against which the search results apply. |
deepestCommonFolder: Folder (read-only) | Returns the deepest common folder of all content assets in the search result. |
| filteredByFolder: Boolean | The method returns true, if the content search result is filtered by the folder and it is not subsequently possible to search for content assets that belong to no folder (e.g. |
folder: Folder (read-only) | Returns the folder against which the search results apply. |
| folderID: String | Returns the folder ID against which the search results apply. |
folderSearch: Boolean (read-only) | The method returns true, if this is a pure search for a folder. |
pageMetaTags: Array (read-only) | Returns all page meta tags, defined for this instance for which content can be generated. |
| recursiveFolderSearch: Boolean | Get the flag that determines if the folder search will be recursive. |
refinedByFolder: Boolean (read-only) | The method returns true, if the search is refined by a folder. |
refinedFolderSearch: Boolean (read-only) | Identifies if this is a folder search and is refined with further criteria, like a name refinement or an attribute refinement. |
refinements: ContentSearchRefinements (read-only) | Returns the set of search refinements used in this search. |
| Constructor | Description |
|---|---|
| ContentSearchModel() | Constructs a new ContentSearchModel. |
| Method | Description |
|---|---|
| getContent() | Returns an Iterator containing all Content Assets that are the result of the search. |
| getContentID() | Returns the content ID against which the search results apply. |
| getDeepestCommonFolder() | Returns the deepest common folder of all content assets in the search result. |
| getFolder() | Returns the folder against which the search results apply. |
| getFolderID() | Returns the folder ID against which the search results apply. |
| getPageMetaTag(String) | Returns the page meta tag for the specified id. |
| getPageMetaTags() | Returns all page meta tags, defined for this instance for which content can be generated. |
| getRefinements() | Returns the set of search refinements used in this search. |
| isFilteredByFolder() | The method returns true, if the content search result is filtered by the folder and it is not subsequently possible to search for content assets that belong to no folder (e.g. |
| isFolderSearch() | The method returns true, if this is a pure search for a folder. |
| isRecursiveFolderSearch() | Get the flag that determines if the folder search will be recursive. |
| isRefinedByFolder() | The method returns true, if the search is refined by a folder. |
| isRefinedFolderSearch() | Identifies if this is a folder search and is refined with further criteria, like a name refinement or an attribute refinement. |
| search() | Execute the search. |
| setContentID(String) | Sets the contentID used in this search. |
| setFilteredByFolder(Boolean) | Set a flag to indicate if the search is filtered by the folder. |
| setFolderID(String) | Sets the folderID used in this search. |
| setRecursiveFolderSearch(Boolean) | Set a flag to indicate if the search in folder should be recursive. |
| static urlForContent(URL, String) | Returns an URL that you can use to execute a query for a specific Content. |
| static urlForContent(String, String) | Returns an URL that you can use to execute a query for a specific Content. |
| static urlForFolder(URL, String) | Returns an URL that you can use to execute a query for a specific Folder. |
| static urlForFolder(String, String) | Returns an URL that you can use to execute a query for a specific Folder. |
| static urlForRefine(URL, String, String) | Returns an URL that you can use to execute a query for a specific attribute name-value pair. |
| static urlForRefine(String, String, String) | Returns an URL that you can use to execute a query for a specific attribute name-value pair. |
| urlRefineFolder(URL, String) | Returns an URL that you can use to re-execute the query using the specified URL and folder refinement. |
| urlRefineFolder(String, String) | Returns an URL that you can use to re-execute the query using the specified pipeline action and folder refinement. |
| urlRelaxFolder(URL) | Returns an URL that you can use to re-execute the query with no folder refinement. |
| urlRelaxFolder(String) | Returns an URL that you can use to re-execute the query with no folder refinement. |
addRefinementValues, canRelax, getCount, getRefinementMaxValue, getRefinementMinValue, getRefinementValue, getRefinementValues, getSearchPhrase, getSearchRedirect, getSortingCondition, isEmptyQuery, isRefinedByAttribute, isRefinedByAttribute, isRefinedByAttributeValue, isRefinedSearch, isRefinementByValueRange, isRefinementByValueRange, removeRefinementValues, search, setRefinementValueRange, setRefinementValues, setSearchPhrase, setSortingCondition, url, url, urlDefaultSort, urlDefaultSort, urlRefineAttribute, urlRefineAttribute, urlRefineAttributeValue, urlRefineAttributeValue, urlRefineAttributeValueRange, urlRelaxAttribute, urlRelaxAttribute, urlRelaxAttributeValue, urlRelaxAttributeValue, urlSort, urlSort
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- CONTENTID_PARAMETER: String = "cid"
URL Parameter for the content ID
- FOLDERID_PARAMETER: String = "fdid"
URL Parameter for the folder ID
- content: Iterator
(read-only) Returns an Iterator containing all Content Assets that are the result of the search.
- contentID: String
Returns the content ID against which the search results apply.
- deepestCommonFolder: Folder
(read-only) Returns the deepest common folder of all content assets in the search result.
- filteredByFolder: Boolean
The method returns true, if the content search result is filtered by the folder and it is not subsequently possible to search for content assets that belong to no folder (e.g. those for Page Designer).
- folder: Folder
(read-only) Returns the folder against which the search results apply.
- folderID: String
Returns the folder ID against which the search results apply.
- folderSearch: Boolean
(read-only) The method returns true, if this is a pure search for a folder. The method checks, that a folder ID is specified and no search phrase is specified.
- pageMetaTags: Array
(read-only) Returns all page meta tags, defined for this instance for which content can be generated.
The meta tag content is generated based on the content listing page meta tag context and rules. The rules are obtained from the current folder context or inherited from the parent folder, up to the root folder.
- recursiveFolderSearch: Boolean
Get the flag that determines if the folder search will be recursive.
- refinedByFolder: Boolean
(read-only) The method returns true, if the search is refined by a folder. The method checks, that a folder ID is specified.
- refinedFolderSearch: Boolean
(read-only) Identifies if this is a folder search and is refined with further criteria, like a name refinement or an attribute refinement.
- refinements: ContentSearchRefinements
(read-only) Returns the set of search refinements used in this search.
- ContentSearchModel()
Constructs a new ContentSearchModel.
- getContent(): Iterator
Returns an Iterator containing all Content Assets that are the result of the search.
Returns:
- an Iterator containing all Content Assets that are the result of the search.
- getContentID(): String
Returns the content ID against which the search results apply.
Returns:
- the content ID against which the search results apply.
- getDeepestCommonFolder(): Folder
Returns the deepest common folder of all content assets in the search result.
Returns:
- the deepest common folder of all content assets in the search result of this search model.
- getFolder(): Folder
Returns the folder against which the search results apply.
Returns:
- the folder against which the search results apply.
- getFolderID(): String
Returns the folder ID against which the search results apply.
Returns:
- the folder ID against which the search results apply.
- getPageMetaTag(id: String): PageMetaTag
Returns the page meta tag for the specified id.
The meta tag content is generated based on the content listing page meta tag context and rule. The rule is obtained from the current folder context or inherited from the parent folder, up to the root folder.
Null will be returned if the meta tag is undefined on the current instance, or if no rule can be found for the current context, or if the rule resolves to an empty string.
Parameters:
- id - the ID to get the page meta tag for
Returns:
- page meta tag containing content generated based on rules
- getPageMetaTags(): Array
Returns all page meta tags, defined for this instance for which content can be generated.
The meta tag content is generated based on the content listing page meta tag context and rules. The rules are obtained from the current folder context or inherited from the parent folder, up to the root folder.
Returns:
- page meta tags defined for this instance, containing content generated based on rules
- getRefinements(): ContentSearchRefinements
Returns the set of search refinements used in this search.
Returns:
- the set of search refinements used in this search.
- isFilteredByFolder(): Boolean
The method returns true, if the content search result is filtered by the folder and it is not subsequently possible to search for content assets that belong to no folder (e.g. those for Page Designer).
Returns:
- True if this is filtered by the folder of the content asset.
- isFolderSearch(): Boolean
The method returns true, if this is a pure search for a folder. The method checks, that a folder ID is specified and no search phrase is specified.
Returns:
- True if this is a folder search.
- isRecursiveFolderSearch(): Boolean
Get the flag that determines if the folder search will be recursive.
Returns:
- true if the folder search will be recursive, false otherwise
- isRefinedByFolder(): Boolean
The method returns true, if the search is refined by a folder. The method checks, that a folder ID is specified.
Returns:
- true, if the search is refined by a folder, false otherwise.
- isRefinedFolderSearch(): Boolean
Identifies if this is a folder search and is refined with further criteria, like a name refinement or an attribute refinement.
Returns:
- true if this is a folder search and is refined with further criteria, false otherwise.
- search(): SearchStatus
Execute the search.
Returns:
- the searchStatus object with search status code and description of search result.
- setContentID(contentID: String): void
Sets the contentID used in this search.
Parameters:
- contentID - the contentID used in this search.
- setFilteredByFolder(filteredByFolder: Boolean): void
Set a flag to indicate if the search is filtered by the folder. Must be set to false to return content assets that do not belong to any folder.
Parameters:
- filteredByFolder - filter the search result by folder
- setFolderID(folderID: String): void
Sets the folderID used in this search.
Parameters:
- folderID - the folderID used in this search.
- setRecursiveFolderSearch(recurse: Boolean): void
Set a flag to indicate if the search in folder should be recursive.
Parameters:
- recurse - recurse the folder in the search
- static urlForContent(url: URL, cid: String): URL
Returns an URL that you can use to execute a query for a specific Content. The passed url can be either a full url or just the name for a pipeline. In the later case a relative URL is created.
Parameters:
- url - the URL to use when constructing the new URL.
- cid - the content id.
Returns:
- an URL that you can use to execute a query for a specific Content. The passed url can be either a full url or just the name for a pipeline. In the later case a relative URL is created.
- static urlForContent(action: String, cid: String): URL
Returns an URL that you can use to execute a query for a specific Content. The passed action is used to build an initial url. All search specific attributes are appended.
Parameters:
- action - the pipeline action to use.
- cid - the content id.
Returns:
- an URL that you can use to execute a query for a specific Content. The passed action is used to build an initial url. All search specific attributes are appended.
- static urlForFolder(url: URL, fid: String): URL
Returns an URL that you can use to execute a query for a specific Folder.
Parameters:
- url - the URL to use in constructing the new URL.
- fid - the id of the Folder to use.
Returns:
- an URL that you can use to execute a query for a specific Folder.
- static urlForFolder(action: String, fid: String): URL
Returns an URL that you can use to execute a query for a specific Folder.
Parameters:
- action - the pipeline action to use.
- fid - the id of the Folder to use.
Returns:
- an URL that you can use to execute a query for a specific Folder.
- static urlForRefine(url: URL, name: String, value: String): URL
Returns an URL that you can use to execute a query for a specific attribute name-value pair.
Parameters:
- url - the URL to use when constructing the new URL.
- name - the name of the attribute.
- value - the value for the attribute.
Returns:
- an URL that you can use to execute a query for a specific attribute name-value pair.
- static urlForRefine(action: String, name: String, value: String): URL
Returns an URL that you can use to execute a query for a specific attribute name-value pair.
Parameters:
- action - the pipeline action to use.
- name - the name of the attribute.
- value - the value for the attribute.
Returns:
- an URL that you can use to execute a query for a specific attribute name-value pair.
- urlRefineFolder(url: URL, refineFolderID: String): URL
Returns an URL that you can use to re-execute the query using the specified URL and folder refinement.
Parameters:
- url - the existing URL to use when constructing the new URL.
- refineFolderID - the ID of the folder refinement to use.
Returns:
- an URL that you can use to re-execute the query using the specified URL and folder refinement.
- urlRefineFolder(action: String, refineFolderID: String): URL
Returns an URL that you can use to re-execute the query using the specified pipeline action and folder refinement.
Parameters:
- action - the action to use.
- refineFolderID - the folder ID to use as a refinement.
Returns:
- an URL that you can use to re-execute the exact same query using the specified pipeline action and folder refinement.
- urlRelaxFolder(url: URL): URL
Returns an URL that you can use to re-execute the query with no folder refinement.
Parameters:
- url - the existing URL to use when constructing the new URL.
Returns:
- an URL that you can use to re-execute the query with no folder refinement.
- urlRelaxFolder(action: String): URL
Returns an URL that you can use to re-execute the query with no folder refinement.
Parameters:
- action - the pipeline action to use in the URL.
Returns:
- an URL that you can use to re-execute the query with no folder refinement.