org.wso2.balana.ctx
Class AttributeAssignment

java.lang.Object
  extended by org.wso2.balana.attr.AttributeValue
      extended by org.wso2.balana.ctx.AttributeAssignment
All Implemented Interfaces:
Evaluatable, Expression

public class AttributeAssignment
extends AttributeValue

Represents AttributeAssignmentType in the XACML 3.0 and 2.0 policy schema This is used for including arguments in obligations and advices


Constructor Summary
AttributeAssignment(URI attributeId, URI dataType, URI category, String content, String issuer)
          Constructor that creates a new AttributeAssignment based on the given elements.
 
Method Summary
 String encode()
          Encodes the value in a form suitable for including in XML data like a request or an obligation.
 void encode(StringBuilder builder)
          Encodes this AttributeAssignment into its XML form and writes this out to the provided StringBuilder
 URI getAttributeId()
           
 URI getCategory()
           
 String getContent()
           
static AttributeAssignment getInstance(Node root)
          TODO remove this method if possible creates a AttributeAssignment based on its DOM node.
 String getIssuer()
           
 
Methods inherited from class org.wso2.balana.attr.AttributeValue
encodeWithTags, evaluate, evaluatesToBag, getChildren, getType, isBag, returnsBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeAssignment

public AttributeAssignment(URI attributeId,
                           URI dataType,
                           URI category,
                           String content,
                           String issuer)
Constructor that creates a new AttributeAssignment based on the given elements.

Parameters:
attributeId - attribute id of the AttributeAssignment element
dataType - attributes datatype
category - category of the AttributeAssignment element whether it is subject, action and etc
content - Content as String
issuer - issuer of the AttributeAssignment
Method Detail

getInstance

public static AttributeAssignment getInstance(Node root)
                                       throws ParsingException
TODO remove this method if possible creates a AttributeAssignment based on its DOM node.

Parameters:
root - root the node to parse for the AttributeAssignment
Returns:
a new AttributeAssignment constructed by parsing
Throws:
ParsingException - if the DOM node is invalid

getAttributeId

public URI getAttributeId()

getCategory

public URI getCategory()

getIssuer

public String getIssuer()

getContent

public String getContent()

encode

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

Specified by:
encode in interface Expression
Overrides:
encode in class AttributeValue
Parameters:
builder - string stream into which the XML-encoded data is written

encode

public String encode()
Description copied from class: AttributeValue
Encodes the value in a form suitable for including in XML data like a request or an obligation. This must return a value that could in turn be used by the factory to create a new instance with the same value.

Specified by:
encode in class AttributeValue
Returns:
a String form of the value


Copyright © 2015 WSO2. All rights reserved.