Class PredicateSuggestion
- java.lang.Object
-
- com.adobe.granite.omnisearch.api.suggestion.PredicateSuggestion
-
@ProviderType public final class PredicateSuggestion extends 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(String type, String optionTitle)
Creates a new instance ofPredicateSuggestion
i.e.PredicateSuggestion(String type, String optionTitle, String typePath, String optionPath)
Creates a new instance ofPredicateSuggestion
i.e.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getOptionPath()
String
getOptionTitle()
Map<String,String>
getQueryParameters()
String
getType()
String
getTypePath()
void
setQueryParameters(Map<String,String> queryParameters)
-
-
-
Constructor Detail
-
PredicateSuggestion
public PredicateSuggestion(String type, 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(String type, String optionTitle, String typePath, 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 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 String getTypePath()
- Returns:
- Path of the node from where type property has been read i.e. path of the predicate node
-
getOptionTitle
public 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 String getOptionPath()
- Returns:
- Path of the node from where option is read in jcr.
-
getQueryParameters
public Map<String,String> getQueryParameters()
- Returns:
- Map of all the queryParameters that are associated with PredicateSuggestions
-
-