Class SuggesterGroupDescriptor
java.lang.Object
org.nuxeo.ecm.platform.suggestbox.service.descriptors.SuggesterGroupDescriptor
- All Implemented Interfaces:
Cloneable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Unless a suggester namednewSuggesterName
already exists in the#suggesters
list, appends a newSuggesterGroupItemDescriptor
namednewSuggesterName
just before (ifbefore
is true) or after the suggester namedsuggesterName
in the#suggesters
list.protected boolean
appendAfter
(String suggesterName, String newSuggesterName) Unless a suggester namednewSuggesterName
already exists in the#suggesters
list, appends a newSuggesterGroupItemDescriptor
namednewSuggesterName
just after the suggester namedsuggesterName
in the#suggesters
list.protected boolean
appendBefore
(String suggesterName, String newSuggesterName) Unless a suggester namednewSuggesterName
already exists in the#suggesters
list, appends a newSuggesterGroupItemDescriptor
namednewSuggesterName
just before the suggester namedsuggesterName
in the#suggesters
list.clone()
getName()
protected int
Returns the index of the first occurrence of the element namedsuggesterName
in the#suggesters
list, or -1 ifsuggesterName
is null or if this list does not contain the element.protected void
logExistingSuggesterName
(String newSuggesterName) Logs that the suggester namednewSuggesterName
already exists in the#suggesters
list and therefore won't be appended to it.void
mergeFrom
(SuggesterGroupDescriptor newDescriptor) protected boolean
Removes the suggester namedsuggesterName
from the#suggesters
list.
-
Field Details
-
name
-
-
Constructor Details
-
SuggesterGroupDescriptor
public SuggesterGroupDescriptor()
-
-
Method Details
-
getName
-
getSuggesters
-
mergeFrom
public void mergeFrom(SuggesterGroupDescriptor newDescriptor) throws ComponentInitializationException - Throws:
ComponentInitializationException
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
remove
Removes the suggester namedsuggesterName
from the#suggesters
list.- Parameters:
suggesterName
- the suggester name- Returns:
- true, if a suggester was removed
-
indexOf
Returns the index of the first occurrence of the element namedsuggesterName
in the#suggesters
list, or -1 ifsuggesterName
is 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
suggesterName
in the#suggesters
list, or -1 ifsuggesterName
is null or if this list does not contain the element
-
appendBefore
Unless a suggester namednewSuggesterName
already exists in the#suggesters
list, appends a newSuggesterGroupItemDescriptor
namednewSuggesterName
just before the suggester namedsuggesterName
in the#suggesters
list. If the suggester namedsuggesterName
does 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
newSuggesterName
was appended to the#suggesters
list
-
appendAfter
Unless a suggester namednewSuggesterName
already exists in the#suggesters
list, appends a newSuggesterGroupItemDescriptor
namednewSuggesterName
just after the suggester namedsuggesterName
in the#suggesters
list. If the suggester namedsuggesterName
does 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
newSuggesterName
was appended to the#suggesters
list
-
append
Unless a suggester namednewSuggesterName
already exists in the#suggesters
list, appends a newSuggesterGroupItemDescriptor
namednewSuggesterName
just before (ifbefore
is true) or after the suggester namedsuggesterName
in the#suggesters
list. If the suggester namedsuggesterName
does 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
newSuggesterName
was appended to the#suggesters
list
-
logExistingSuggesterName
Logs that the suggester namednewSuggesterName
already exists in the#suggesters
list and therefore won't be appended to it.- Parameters:
newSuggesterName
- the new suggester name
-