Class SuggesterGroupDescriptor
java.lang.Object
org.nuxeo.ecm.platform.suggestbox.service.descriptors.SuggesterGroupDescriptor
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanUnless a suggester namednewSuggesterNamealready exists in the#suggesterslist, appends a newSuggesterGroupItemDescriptornamednewSuggesterNamejust before (ifbeforeis true) or after the suggester namedsuggesterNamein the#suggesterslist.protected booleanappendAfter(String suggesterName, String newSuggesterName) Unless a suggester namednewSuggesterNamealready exists in the#suggesterslist, appends a newSuggesterGroupItemDescriptornamednewSuggesterNamejust after the suggester namedsuggesterNamein the#suggesterslist.protected booleanappendBefore(String suggesterName, String newSuggesterName) Unless a suggester namednewSuggesterNamealready exists in the#suggesterslist, appends a newSuggesterGroupItemDescriptornamednewSuggesterNamejust before the suggester namedsuggesterNamein the#suggesterslist.clone()getName()protected intReturns the index of the first occurrence of the element namedsuggesterNamein the#suggesterslist, or -1 ifsuggesterNameis null or if this list does not contain the element.protected voidlogExistingSuggesterName(String newSuggesterName) Logs that the suggester namednewSuggesterNamealready exists in the#suggesterslist and therefore won't be appended to it.voidmergeFrom(SuggesterGroupDescriptor newDescriptor) protected booleanRemoves the suggester namedsuggesterNamefrom the#suggesterslist.
-
Field Details
-
name
-
-
Constructor Details
-
SuggesterGroupDescriptor
public SuggesterGroupDescriptor()
-
-
Method Details
-
getName
-
getSuggesters
-
mergeFrom
public void mergeFrom(SuggesterGroupDescriptor newDescriptor) throws ComponentInitializationException - Throws:
ComponentInitializationException
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
remove
Removes the suggester namedsuggesterNamefrom the#suggesterslist.- Parameters:
suggesterName- the suggester name- Returns:
- true, if a suggester was removed
-
indexOf
Returns the index of the first occurrence of the element namedsuggesterNamein the#suggesterslist, or -1 ifsuggesterNameis null or if this list does not contain the element.- Parameters:
suggesterName- the suggester name- Returns:
- the index of the first occurrence of the element named
suggesterNamein the#suggesterslist, or -1 ifsuggesterNameis null or if this list does not contain the element
-
appendBefore
Unless a suggester namednewSuggesterNamealready exists in the#suggesterslist, appends a newSuggesterGroupItemDescriptornamednewSuggesterNamejust before the suggester namedsuggesterNamein the#suggesterslist. If the suggester namedsuggesterNamedoes not exist, appends the new suggester at the beginning of the list.- Parameters:
suggesterName- the suggester namenewSuggesterName- the name of the suggester to append- Returns:
- true, if the suggester named
newSuggesterNamewas appended to the#suggesterslist
-
appendAfter
Unless a suggester namednewSuggesterNamealready exists in the#suggesterslist, appends a newSuggesterGroupItemDescriptornamednewSuggesterNamejust after the suggester namedsuggesterNamein the#suggesterslist. If the suggester namedsuggesterNamedoes not exist, appends the new suggester at the end of the list.- Parameters:
suggesterName- the suggester namenewSuggesterName- the name of the suggester to append- Returns:
- true, if the suggester named
newSuggesterNamewas appended to the#suggesterslist
-
append
Unless a suggester namednewSuggesterNamealready exists in the#suggesterslist, appends a newSuggesterGroupItemDescriptornamednewSuggesterNamejust before (ifbeforeis true) or after the suggester namedsuggesterNamein the#suggesterslist. If the suggester namedsuggesterNamedoes not exist, appends the new suggester at the beginning or the end of the list, depending onbefore.- Parameters:
suggesterName- the suggester namenewSuggesterName- the name of the suggester to append- Returns:
- true, if the suggester named
newSuggesterNamewas appended to the#suggesterslist
-
logExistingSuggesterName
Logs that the suggester namednewSuggesterNamealready exists in the#suggesterslist and therefore won't be appended to it.- Parameters:
newSuggesterName- the new suggester name
-