public class AttributeChooserForm extends Object implements Serializable
getAvailableAttributes() which contain attributes which can
be chosen and getChosenAttributes() which represents chosen attributes. If isIncludeAll() is true
then all attributes both from available and selected will be returned as selected through
getSelectedAttributes()| Constructor and Description |
|---|
AttributeChooserForm() |
AttributeChooserForm(Set<Attribute> availableAttributes,
Set<Attribute> chosenAttributes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Set<Attribute> |
getAvailableAttributes() |
Set<Attribute> |
getChosenAttributes() |
Set<Attribute> |
getSelectedAttributes()
Returns list of selected attributes.
|
int |
hashCode() |
boolean |
hasPopulatedAttributes()
Tells if form has populated data
getChosenAttributes() or getAvailableAttributes() is not empty. |
boolean |
hasSelectedAttributes()
Tells
getSelectedAttributes() is not empty. |
boolean |
isIncludeAll()
Tells if form should return all attributes both from available and chosen as selected ones.
|
protected Set<Attribute> |
mergeAttributes(Set<Attribute> available,
Set<Attribute> choosen) |
void |
setAvailableAttributes(Set<Attribute> availableAttributes)
Sets list of available attributes.
|
void |
setChosenAttributes(Set<Attribute> chosenAttributes)
Sets list of chosen attributes.
|
void |
setIncludeAll(boolean includeAll)
Defines if form should return all attributes both from available and chosen as selected ones.
|
public boolean hasPopulatedAttributes()
getChosenAttributes() or getAvailableAttributes() is not empty.public boolean hasSelectedAttributes()
getSelectedAttributes() is not empty.public Set<Attribute> getSelectedAttributes()
isIncludeAll() is true the it return merged list of
getChosenAttributes() and getAvailableAttributes(). If include all is not selected it returns just
getChosenAttributes()protected Set<Attribute> mergeAttributes(Set<Attribute> available, Set<Attribute> choosen)
public Set<Attribute> getAvailableAttributes()
public void setAvailableAttributes(Set<Attribute> availableAttributes)
availableAttributes - list of chosen attributes.public void setChosenAttributes(Set<Attribute> chosenAttributes)
chosenAttributes - list of chosen attributes.public boolean isIncludeAll()
getSelectedAttributes().public void setIncludeAll(boolean includeAll)
Copyright © 2018. All rights reserved.