JBoss port of sunxacml 2.0.5-redhat-1

org.jboss.security.xacml.sunxacml
Class TargetSection

java.lang.Object
  extended by org.jboss.security.xacml.sunxacml.TargetSection

public class TargetSection
extends Object

This is a container class for instances of TargetMatchGroup and represents the Subjects, Resources, Actions, and Environments sections of an XACML Target. This section may apply to any request.

Since:
2.0
Author:
Seth Proctor

Constructor Summary
TargetSection(List matchGroups, int matchType, int xacmlVersion)
          Constructor that takes a group and a version.
 
Method Summary
 void encode(OutputStream output)
          Encodes this TargetSection into its XML representation and writes this encoding to the given OutputStream with no indentation.
 void encode(OutputStream output, Indenter indenter)
          Encodes this TargetSection into its XML representation and writes this encoding to the given OutputStream with indentation.
static TargetSection getInstance(Node root, int matchType, PolicyMetaData metaData)
          Creates a Target by parsing a node.
 List getMatchGroups()
          Returns the TargetMatchGroups contained in this group.
 MatchResult match(EvaluationCtx context)
          Determines whether this TargetSection matches the input request (whether it is applicable).
 boolean matchesAny()
          Returns whether this section matches any request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetSection

public TargetSection(List matchGroups,
                     int matchType,
                     int xacmlVersion)
Constructor that takes a group and a version. The if the group is null or empty, then this represents a section that matches any request.

Parameters:
matchGroups - a possibly null List of TargetMatchGroups
xacmlVersion - the version XACML being used
matchType -
Method Detail

getInstance

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

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

getMatchGroups

public List getMatchGroups()
Returns the TargetMatchGroups contained in this group.

Returns:
a List of TargetMatchGroups

matchesAny

public boolean matchesAny()
Returns whether this section matches any request.

Returns:
true if this section matches any request, false otherwise

match

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

Parameters:
context - the representation of the request
Returns:
the result of trying to match the target and the request

encode

public void encode(OutputStream output)
Encodes this TargetSection into its XML representation and writes this encoding to the given OutputStream with no indentation.

Parameters:
output - a stream into which the XML-encoded data is written

encode

public void encode(OutputStream output,
                   Indenter indenter)
Encodes this TargetSection into its XML representation and writes this encoding to the given OutputStream with indentation.

Parameters:
output - a stream into which the XML-encoded data is written
indenter - an object that creates indentation strings

JBoss port of sunxacml 2.0.5-redhat-1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.