org.wso2.balana.xacml3
Class Attributes

java.lang.Object
  extended by org.wso2.balana.xacml3.Attributes

public class Attributes
extends Object

Represents the AttributesType XML type found in the context schema. TODO But here, not supporting the xml:id Identifier. Just use it as String attributes


Constructor Summary
Attributes(URI category, Node content, Set<Attribute> attributes, String id)
          Constructor that creates a new Attributes based on the given elements.
Attributes(URI category, Set<Attribute> attributes)
          Constructor that creates a new Attributes based on the given elements.
 
Method Summary
 String encode()
          Encodes this Attributes into its XML form
 void encode(StringBuilder builder)
          Encodes this Attributes into its XML form and writes this out to the provided StringBuilder
 Set<Attribute> getAttributes()
          Returns list of attribute that contains in the attributes element
 URI getCategory()
          Returns the category of this attributes
 Node getContent()
          Returns the content of this attributes, or null if no content was included
 String getId()
          Returns the id of this attributes, or null if it was not included
static Attributes getInstance(Node root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attributes

public Attributes(URI category,
                  Set<Attribute> attributes)
Constructor that creates a new Attributes based on the given elements.

Parameters:
category - category of the Attributes element whether it is subject, action and etc
attributes - a Set of Attribute that contains in Attributes

Attributes

public Attributes(URI category,
                  Node content,
                  Set<Attribute> attributes,
                  String id)
Constructor that creates a new Attributes based on the given elements.

Parameters:
category - category of the Attributes element whether it is subject, action and etc
content - content of the Attributes element that can be a XML data
attributes - a Set of Attribute that contains in Attributes
id - id of the Attribute element
Method Detail

getInstance

public static Attributes getInstance(Node root)
                              throws ParsingException
Parameters:
root -
Returns:
Throws:
ParsingException

getCategory

public URI getCategory()
Returns the category of this attributes

Returns:
the attribute 's category as URI

getContent

public Node getContent()
Returns the content of this attributes, or null if no content was included

Returns:
the attribute 's content as Node or null

getAttributes

public Set<Attribute> getAttributes()
Returns list of attribute that contains in the attributes element

Returns:
list of Attribute

getId

public String getId()
Returns the id of this attributes, or null if it was not included

Returns:
the attribute 's id as String or null

encode

public String encode()
Encodes this Attributes into its XML form

Returns:
String

encode

public void encode(StringBuilder builder)
Encodes this Attributes into its XML form and writes this out to the provided StringBuilder

Parameters:
builder - string stream into which the XML-encoded data is written


Copyright © 2015 WSO2. All rights reserved.