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 Summary
Property Summary
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 Summary
Method Summary
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.
Methods inherited from class SearchModel
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
Methods inherited from class Object
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
Constant Details
CONTENTID_PARAMETER
CONTENTID_PARAMETER: String = "cid"
URL Parameter for the content ID
FOLDERID_PARAMETER
FOLDERID_PARAMETER: String = "fdid"
URL Parameter for the folder ID
Property Details
content
content: Iterator (read-only)
Returns an Iterator containing all Content Assets that are the result of the
search.
contentID
contentID: String
Returns the content ID against which the search results apply.
deepestCommonFolder
deepestCommonFolder: Folder (read-only)
Returns the deepest common folder of all content assets in the search result.
filteredByFolder
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: Folder (read-only)
Returns the folder against which the search results apply.
folderID
folderID: String
Returns the folder ID against which the search results apply.
folderSearch
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
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
recursiveFolderSearch: Boolean
Get the flag that determines if the folder search will
be recursive.
refinedByFolder
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
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
refinements: ContentSearchRefinements (read-only)
Returns the set of search refinements used in this search.
Constructor Details
ContentSearchModel()
ContentSearchModel()
Constructs a new ContentSearchModel.
Method Details
getContent()
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()
getContentID(): String
Returns the content ID against which the search results apply.
Returns:
the content ID against which the search results apply.
getDeepestCommonFolder()
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()
getFolder(): Folder
Returns the folder against which the search results apply.
Returns:
the folder against which the search results apply.
getFolderID()
getFolderID(): String
Returns the folder ID against which the search results apply.
Returns:
the folder ID against which the search results apply.
getPageMetaTag(String)
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()
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()
getRefinements(): ContentSearchRefinements
Returns the set of search refinements used in this search.
Returns:
the set of search refinements used in this search.
isFilteredByFolder()
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()
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()
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()
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()
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()
search(): SearchStatus
Execute the search.
Returns:
the searchStatus object with search status code and description of search result.
setContentID(String)
setContentID(contentID: String ): void
Sets the contentID used in this search.
Parameters:
contentID - the contentID used in this search.
setFilteredByFolder(Boolean)
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(String)
setFolderID(folderID: String ): void
Sets the folderID used in this search.
Parameters:
folderID - the folderID used in this search.
setRecursiveFolderSearch(Boolean)
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
urlForContent(URL, String)
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.
urlForContent(String, String)
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.
urlForFolder(URL, String)
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.
urlForFolder(String, String)
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.
urlForRefine(URL, String, String)
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.
urlForRefine(String, String, String)
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, String)
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(String, String)
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)
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(String)
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.