Class Attribute


  • public class Attribute
    extends java.lang.Object
    Represents an STS Universal User attribute while providing methods to transform to and from XML. See RTC 85668 for the removal of the trimString call:
    Version:
    • Constructor Summary

      Constructors 
      Constructor Description
      Attribute​(java.lang.String name, java.lang.String type, java.lang.String value)
      Constructs an Attribute object using a name, type and a single value.
      Attribute​(java.lang.String name, java.lang.String type, java.lang.String[] values)
      Constructs an Attribute object using a name, type and an array of String values.
      Attribute​(java.lang.String name, java.lang.String type, java.lang.String nickname, java.lang.String[] values)
      Constructs an Attribute object using a name, type, nickname and an array of String values.
      Attribute​(java.lang.String name, java.lang.String type, java.lang.String nickname, java.lang.String[] values, org.w3c.dom.Node[] nodes)
      Constructs an Attribute object using a name, type, nickname, an array of Nodes and a String array of values.
      Attribute​(java.lang.String name, java.lang.String type, java.lang.String nickname, java.util.List values)
      Constructs an Attribute object using a name, nickname, type and a list of values, typically Strings.
      Attribute​(java.lang.String name, java.lang.String type, java.lang.String nickname, org.w3c.dom.Node[] nodes)
      Constructs an Attribute object using a name, type, nickname and an array of Nodes.
      Attribute​(java.lang.String name, java.lang.String type, java.util.List values)
      Constructs an Attribute object using a name, type and a list of values, typically Strings.
      Attribute​(java.lang.String name, java.lang.String type, org.w3c.dom.Node[] nodes)
      Constructs an Attribute object using a name, type, and an array of Nodes.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAttributeValues​(java.lang.Object[] values)
      Adds additional attribute values to this Attribute object based on the Object[] passed in.
      java.lang.Object clone()
      Clone method to copy an Attribute object.
      static Attribute fromXml​(org.w3c.dom.Element attribute)
      Returns an Attribute object from an org.w3c.dom.Element.
      java.util.List getAttributeValues()
      Returns a list of attribute values for this Attribute.
      java.lang.String getName()
      Returns the name of this Attribute object.
      java.lang.String getNickname()
      Returns the nickname of this Attribute object.
      org.w3c.dom.Node[] getNodeValues()
      Returns the node values of this Attribute as a String[].
      boolean getPreferEncryption()
      Returns whether this Attribute object prefers encryption or not.
      java.lang.String getType()
      Returns the type of this Attribute object.
      java.lang.String[] getValues()
      Returns the values of this Attribute as a String[].
      void setAttributeValues​(java.lang.Object[] values)
      Sets the attribute values for this Attribute object based on the Object[] passed in.
      void setAttributeValues​(java.util.List values)
      Sets the attribute values for this Attribute object based on the list passed in.
      void setName​(java.lang.String name)
      Sets the name of this Attribute object.
      void setNickname​(java.lang.String newname)
      Sets the nickname of this Attribute object.
      void setNodeValues​(org.w3c.dom.Node[] values)
      Sets the attributes for this Attribute object using a Node[] of values.
      void setPreferEncryption​(boolean preferEncryption)
      Sets whether this Attribute prefers encryption or not.
      void setType​(java.lang.String type)
      Sets the type of this Attribute object.
      void setValues​(java.lang.String[] values)
      Sets the attribute values for this Attribute object.
      org.w3c.dom.Element toXml​(org.w3c.dom.Document owner)
      Returns this Attribute as an org.w3c.dom.Element.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Attribute_java_sourceCodeID

        public static final java.lang.String Attribute_java_sourceCodeID
        See Also:
        Constant Field Values
      • Attribute_java_copyright

        public static final java.lang.String Attribute_java_copyright
      • CUSTOM_PARAM_DONOT_TRIM_ATTRIBUTE_LIST

        public static final java.lang.String CUSTOM_PARAM_DONOT_TRIM_ATTRIBUTE_LIST
        See Also:
        Constant Field Values
      • _doNotTrimList

        public static java.util.ArrayList<java.lang.String> _doNotTrimList
    • Constructor Detail

      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.lang.String[] values)
        Constructs an Attribute object using a name, type and an array of String values.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        values - an array of String values
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.lang.String value)
        Constructs an Attribute object using a name, type and a single value.
        Parameters:
        name - the name of the Attribute
        type - the type of the Attribute
        value - a single value for the Attribute
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.util.List values)
        Constructs an Attribute object using a name, type and a list of values, typically Strings.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        values - a List of values, typically Strings
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.lang.String nickname,
                         java.util.List values)
        Constructs an Attribute object using a name, nickname, type and a list of values, typically Strings.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        nickname - the nickname of the Attribute
        values - a List of values, typically Strings
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.lang.String nickname,
                         java.lang.String[] values)
        Constructs an Attribute object using a name, type, nickname and an array of String values.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        nickname - the nickname of the Attribute
        values - an array of String values
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.lang.String nickname,
                         org.w3c.dom.Node[] nodes)
        Constructs an Attribute object using a name, type, nickname and an array of Nodes.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        nickname - the nickname of the Attribute
        nodes - an array of Nodes
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         java.lang.String nickname,
                         java.lang.String[] values,
                         org.w3c.dom.Node[] nodes)
        Constructs an Attribute object using a name, type, nickname, an array of Nodes and a String array of values.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        nickname - the nickname of the Attribute
        values - an array of String values
        nodes - an array of Nodes
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String type,
                         org.w3c.dom.Node[] nodes)
        Constructs an Attribute object using a name, type, and an array of Nodes.
        Parameters:
        name - the name of the Attribute
        type - the type of Attribute
        nodes - an array of Nodes
    • Method Detail

      • fromXml

        public static Attribute fromXml​(org.w3c.dom.Element attribute)
        Returns an Attribute object from an org.w3c.dom.Element.
        Parameters:
        attribute - an org.w3c.dom.Element used to create an Attribute
        Returns:
        an Attribute object created from the supplied org.w3c.dom.Element.
      • toXml

        public org.w3c.dom.Element toXml​(org.w3c.dom.Document owner)
        Returns this Attribute as an org.w3c.dom.Element.
        Parameters:
        owner - an org.w3c.dom.Document object.
        Returns:
        an org.w3c.dom.Element representing this Attribute.
      • getName

        public java.lang.String getName()
        Returns the name of this Attribute object.
        Returns:
        the name of this Attribute object.
      • setName

        public void setName​(java.lang.String name)
        Sets the name of this Attribute object.
        Parameters:
        name - the name to use to set for this Attribute object.
      • getType

        public java.lang.String getType()
        Returns the type of this Attribute object.
        Returns:
        the type of this Attribute object.
      • setType

        public void setType​(java.lang.String type)
        Sets the type of this Attribute object.
        Parameters:
        type - the type to use to set for this Attribute object.
      • getValues

        public java.lang.String[] getValues()
        Returns the values of this Attribute as a String[].
        Returns:
        a String[] of the values of this Attribute.
      • getNodeValues

        public org.w3c.dom.Node[] getNodeValues()
        Returns the node values of this Attribute as a String[].
        Returns:
        a String[] of the node values of this Attribute.
      • getAttributeValues

        public java.util.List getAttributeValues()
        Returns a list of attribute values for this Attribute.
        Returns:
        a list of attribute values for this Attribute.
      • setNodeValues

        public void setNodeValues​(org.w3c.dom.Node[] values)
        Sets the attributes for this Attribute object using a Node[] of values.
        Parameters:
        values - a Node[] of the attributes to be used with this Attribute object.
      • setValues

        public void setValues​(java.lang.String[] values)
        Sets the attribute values for this Attribute object.
        Parameters:
        values - a String[] of the attributes to be used with this Attribute object.
      • setAttributeValues

        public void setAttributeValues​(java.lang.Object[] values)
        Sets the attribute values for this Attribute object based on the Object[] passed in.
        Parameters:
        values - an Object[] of the attributes to be used with this Attribute object.
      • addAttributeValues

        public void addAttributeValues​(java.lang.Object[] values)
        Adds additional attribute values to this Attribute object based on the Object[] passed in.
        Parameters:
        values - an Object[] of the attributes to be added to this Attribute object.
      • setAttributeValues

        public void setAttributeValues​(java.util.List values)
        Sets the attribute values for this Attribute object based on the list passed in.
        Parameters:
        values - a List of the attributes to be used with this Attribute object.
      • getNickname

        public java.lang.String getNickname()
        Returns the nickname of this Attribute object.
        Returns:
        the nickname of this Attribute object.
      • setNickname

        public void setNickname​(java.lang.String newname)
        Sets the nickname of this Attribute object.
        Parameters:
        newname - the new nickname for this Attribute object.
      • getPreferEncryption

        public boolean getPreferEncryption()
        Returns whether this Attribute object prefers encryption or not.
        Returns:
        if this Attribute object prefers encryption or not.
      • setPreferEncryption

        public void setPreferEncryption​(boolean preferEncryption)
        Sets whether this Attribute prefers encryption or not.
        Parameters:
        preferEncryption - whether this Attribute prefers encryption.
      • clone

        public java.lang.Object clone()
        Clone method to copy an Attribute object.