Class PredicateSuggestion
- java.lang.Object
-
- com.adobe.granite.omnisearch.api.suggestion.PredicateSuggestion
-
@ProviderType public final class PredicateSuggestion extends java.lang.Object
TODO Need to confirm from UI what else information they require to show a predicate as SuggestionPredicateSuggestion
class have all the properties of a predicate that is require to show predicate as a suggestion on UI.
-
-
Constructor Summary
Constructors Constructor Description PredicateSuggestion(java.lang.String type, java.lang.String optionTitle)
Creates a new instance ofPredicateSuggestion
i.e.PredicateSuggestion(java.lang.String type, java.lang.String optionTitle, java.lang.String typePath, java.lang.String optionPath)
Creates a new instance ofPredicateSuggestion
i.e.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getOptionPath()
java.lang.String
getOptionTitle()
java.util.Map<java.lang.String,java.lang.String>
getQueryParameters()
java.lang.String
getType()
java.lang.String
getTypePath()
void
setQueryParameters(java.util.Map<java.lang.String,java.lang.String> queryParameters)
-
-
-
Constructor Detail
-
PredicateSuggestion
public PredicateSuggestion(java.lang.String type, java.lang.String optionTitle)
Creates a new instance ofPredicateSuggestion
i.e. File Type: Image- Parameters:
type
- Type of predicate i.e. "File Type"optionTitle
- Title of predicate option i.e. "Image"
-
PredicateSuggestion
public PredicateSuggestion(java.lang.String type, java.lang.String optionTitle, java.lang.String typePath, java.lang.String optionPath)
Creates a new instance ofPredicateSuggestion
i.e. File Type: Image- Parameters:
type
- Type of predicate i.e. "File Type"optionTitle
- Title of predicate option i.e. "Image"typePath
- Path of the type node in the JCRoptionPath
- Ppath of the node from where option is read in jcr.
-
-
Method Detail
-
getType
public java.lang.String getType()
- Returns:
- This is type of predicate. This is usually read from "text" property of predicate. Please note that title is returned in default lang i.e. en. Should be converted using i18n before rendering
-
getTypePath
public java.lang.String getTypePath()
- Returns:
- Path of the node from where type property has been read i.e. path of the predicate node
-
getOptionTitle
public java.lang.String getOptionTitle()
- Returns:
- title of predicate value/option. This is usually read from "jcr:title" property of option of predicate. Please note that title is returned in default lang i.e. en. Should be converted using i18n before rendering
-
getOptionPath
public java.lang.String getOptionPath()
- Returns:
- Path of the node from where option is read in jcr.
-
getQueryParameters
public java.util.Map<java.lang.String,java.lang.String> getQueryParameters()
- Returns:
- Map of all the queryParameters that are associated with PredicateSuggestions
-
setQueryParameters
public void setQueryParameters(java.util.Map<java.lang.String,java.lang.String> queryParameters)
- Parameters:
queryParameters
-Map
of Parameters that needed to be included inPredicateSuggestion
-
-