Class Attribute

java.lang.Object
com.tremolosecurity.saml.Attribute
All Implemented Interfaces:
Serializable

public class Attribute extends Object implements Serializable
Primary class for representing an attribute with a name and one or more values
See Also:
  • Constructor Details

    • Attribute

      public Attribute()
      Creates an attribute with an empty name and no values
    • Attribute

      public Attribute(String name)
      Creates an attribute with a given name and no values
      Parameters:
      name - Name for the attribute
    • Attribute

      public Attribute(String name, String value)
      Creates an attribute with a name and single value
      Parameters:
      name - Name of the attribute
      value - First value
    • Attribute

      public Attribute(String name, String[] values)
      Creates an attribute with values from an array of strings
      Parameters:
      name - Name of the attribute
      values - List of values
  • Method Details

    • getValues

      public List<String> getValues()
      Attribute values
      Returns:
      Attribute's values
    • setValues

      public void setValues(List<String> values)
      Replaces the attribute's values
      Parameters:
      values - Values to replace the current values with
    • getName

      public String getName()
      Retrieve the attribute's name
      Returns:
      Attribute's name
    • toString

      public String toString()
      String representation of the attribute, prints all values
      Overrides:
      toString in class Object
    • getDataType

      public Attribute.DataType getDataType()
    • setDataType

      public void setDataType(Attribute.DataType dataType)