Class AttributeChooserForm

  • All Implemented Interfaces:
    java.io.Serializable

    public class AttributeChooserForm
    extends java.lang.Object
    implements java.io.Serializable
    Pojo which is used to choose attributes. It has 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()
    See Also:
    Serialized Form
    • Constructor Detail

      • AttributeChooserForm

        public AttributeChooserForm()
      • AttributeChooserForm

        public AttributeChooserForm​(java.util.Set<Attribute> availableAttributes,
                                    java.util.Set<Attribute> chosenAttributes)
    • Method Detail

      • hasSelectedAttributes

        public boolean hasSelectedAttributes()
        Tells getSelectedAttributes() is not empty.
        Returns:
        true if attributes are selected.
      • mergeAttributes

        protected java.util.Set<Attribute> mergeAttributes​(java.util.Set<Attribute> available,
                                                           java.util.Set<Attribute> choosen)
      • getAvailableAttributes

        public java.util.Set<Attribute> getAvailableAttributes()
        Returns:
        list of available to choose attributes.
      • setAvailableAttributes

        public void setAvailableAttributes​(java.util.Set<Attribute> availableAttributes)
        Sets list of available attributes.
        Parameters:
        availableAttributes - list of chosen attributes.
      • getChosenAttributes

        public java.util.Set<Attribute> getChosenAttributes()
        Returns:
        list of chosen attributes.
      • setChosenAttributes

        public void setChosenAttributes​(java.util.Set<Attribute> chosenAttributes)
        Sets list of chosen attributes.
        Parameters:
        chosenAttributes - list of chosen attributes.
      • isIncludeAll

        public boolean isIncludeAll()
        Tells if form should return all attributes both from available and chosen as selected ones.
        Returns:
        true if all should be included in getSelectedAttributes().
      • setIncludeAll

        public void setIncludeAll​(boolean includeAll)
        Defines if form should return all attributes both from available and chosen as selected ones.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object