org.wso2.balana.xacml3
Class Target

java.lang.Object
  extended by org.wso2.balana.AbstractTarget
      extended by org.wso2.balana.xacml3.Target

public class Target
extends AbstractTarget

Represents the TargetType XML type in XACML 3.0. This extends the AbstractTarget. This also stores several other XML type: AnyOf


Constructor Summary
Target()
          Constructor that creates an XACML 3.0 Target
Target(List<AnyOfSelection> anyOfSelections)
          Constructor that creates an XACML 3.0 Target from components.
 
Method Summary
 String encode()
          Encodes this AbstractTarget into its XML form
 void encode(StringBuilder builder)
          Encodes this AbstractTarget into its XML form and writes this out to the provided StringBuilder
 List<AnyOfSelection> getAnyOfSelections()
           
static Target getInstance(Node root, PolicyMetaData metaData)
          Creates a Target by parsing a node.
 MatchResult match(EvaluationCtx context)
          Determines whether this Target matches the input request (whether it is applicable).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Target

public Target()
Constructor that creates an XACML 3.0 Target


Target

public Target(List<AnyOfSelection> anyOfSelections)
Constructor that creates an XACML 3.0 Target from components.

Parameters:
anyOfSelections - List of AnyOfSelection objects that representing the AnyOf sections of this target
Method Detail

getInstance

public static Target getInstance(Node root,
                                 PolicyMetaData metaData)
                          throws ParsingException
Creates a Target by parsing a node.

Parameters:
root - the node to parse for the Target
metaData - the meta-data associated with the policy
Returns:
new Target constructed by parsing
Throws:
ParsingException - if the DOM node is invalid

match

public MatchResult match(EvaluationCtx context)
Determines whether this Target matches the input request (whether it is applicable).

Specified by:
match in class AbstractTarget
Parameters:
context - the representation of the request
Returns:
the result of trying to match the target and the request

getAnyOfSelections

public List<AnyOfSelection> getAnyOfSelections()

encode

public String encode()
Description copied from class: AbstractTarget
Encodes this AbstractTarget into its XML form

Specified by:
encode in class AbstractTarget
Returns:
String

encode

public void encode(StringBuilder builder)
Description copied from class: AbstractTarget
Encodes this AbstractTarget into its XML form and writes this out to the provided StringBuilder

Specified by:
encode in class AbstractTarget
Parameters:
builder - string stream into which the XML-encoded data is written


Copyright © 2015 WSO2. All rights reserved.