Interface Attribute

  • All Superinterfaces:
    XmlSerializable
    All Known Implementing Classes:
    AttributeImpl

    @SupportedAll
    public interface Attribute
    extends XmlSerializable
    The Attribute element specifies information about the action/subject/resource requested in the Request context by listing a sequence of Attribute elements associated with the action.

     <xs:element name="Attribute" type="xacml-context:AttributeType"/>
     <xs:complexType name="AttributeType">
        <xs:sequence>
           <xs:element ref="xacml-context:AttributeValue" 
            maxOccurs="unbounded"/>
        <xs:sequence>
        <xs:attribute name="AttributeId" type="xs:anyURI" use="required"/>
        <xs:attribute name="DataType" type="xs:anyURI" use="required"/>
        <xs:attribute name="Issuer" type="xs:string" use="optional"/>
     <xs:complexType>
     
    • Method Detail

      • getAttributeId

        URI getAttributeId()
        Returns the AttributeId of the Attribute which the attribute identifier.
        Returns:
        the URI representing the data type.
      • setAttributeId

        void setAttributeId​(URI attributeID)
                     throws XACMLException
        Sets the attributeId of the Attribute.
        Parameters:
        attributeID - URI representing the attribite id.
        Throws:
        XACMLException - if the object is immutable
      • getIssuer

        String getIssuer()
        Returns the issuer of the Attribute.
        Returns:
        String representing the issuer. It MAY be an x500Name that binds to a public key or some other identification exchanged out-of-band by participating entities.
      • setIssuer

        void setIssuer​(String issuer)
                throws XACMLException
        Sets the issuer of the Attribute.
        Parameters:
        issuer - String representing the issuer. It MAY be an x500Name that binds to a public key or some other identification exchanged out-of-band by participating entities. This is optional so return value could be null or an empty String.
        Throws:
        XACMLException - if the object is immutable
      • getDataType

        URI getDataType()
        Returns the datatype of the contents of the AttributeValue elements. This will be either a primitive datatype defined by XACML 2.0 specification or a type ( primitive or structured) defined in a namespace declared in the <xacml-context> element.
        Returns:
        the URI representing the data type.
      • setDataType

        void setDataType​(URI dataType)
                  throws XACMLException
        Sets the data type of the contents of the AttributeValue elements.
        Parameters:
        dataType - URI representing the data type.
        Throws:
        XACMLException - if the object is immutable
      • getAttributeValues

        List getAttributeValues()
        Returns one to many AttributeValue elements for this object each attribite value MAY have empty contents, occur once or occur multiple times.
        Returns:
        the List AttributeValue elements of this object
      • setAttributeValues

        void setAttributeValues​(List attrValues)
                         throws XACMLException
        Sets the AttributeValue elements of this object
        Parameters:
        attrValues - List containing AttributeValue elements of this object.
        Throws:
        XACMLException - if the object is immutable An object is considered immutable if makeImmutable() has been invoked on it. It can be determined by calling isMutable on the object.
      • setAttributeStringValues

        void setAttributeStringValues​(List attrValues)
                               throws XACMLException
        Sets the attribute values for this object
        Parameters:
        attrValues - List containing String values of this object.
        Throws:
        XACMLException - if the object is immutable An object is considered immutable if makeImmutable() has been invoked on it. It can be determined by calling isMutable on the object.
      • toXMLString

        default String toXMLString​(boolean includeNSPrefix,
                                   boolean declareNS)
                            throws XACMLException
        Returns a String representation of this object
        Specified by:
        toXMLString in interface XmlSerializable
        Parameters:
        includeNSPrefix - Determines whether or not the namespace qualifier is prepended to the Element when converted
        declareNS - Determines whether or not the namespace is declared within the Element.
        Returns:
        a string representation of this object
        Throws:
        XACMLException - if conversion fails for any reason
      • makeImmutable

        void makeImmutable()
        Makes the object immutable
      • isMutable

        boolean isMutable()
        Returns true if the object is mutable.
        Returns:
        true if the object is mutable.