nbi.xmlsec.xacml.util
Class TargetUtil

java.lang.Object
  extended bynbi.xmlsec.xacml.util.TargetUtil

public class TargetUtil
extends Object

Class to support parsing of Targetinstances.

Since:
Version:
$Revision: 1.4 $
Author:
Lutz Suhrbier

Constructor Summary
TargetUtil()
           
 
Method Summary
static TargetMatch getTargetMatch(Target target, int type, int index)
          Returns the TargetMatch from the given target.
static Evaluatable getTargetMatchEvaluatable(Target target, int type, int index)
          Returns the Evaluatable if the TargetMatch from the given target.
static Function getTargetMatchFunction(Target target, int type, int index)
          Returns the match function if the TargetMatch from the given target.
static List getTargetMatchList(Target target, int type)
          Returns the list of target matches of the given type from the given target.
static int getTargetMatchSize(Target target, int type)
          Returns the number of target matches of the given type in the given target.
static AttributeValue getTargetMatchValue(Target target, int type, int index)
          Returns the attribute value if the TargetMatch from the given target.
static boolean isEmpty(Target target)
          Verifies if the target is empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetUtil

public TargetUtil()
Method Detail

getTargetMatch

public static TargetMatch getTargetMatch(Target target,
                                         int type,
                                         int index)
Returns the TargetMatch from the given target. If the retrieved target match does not match the given type, null is returned.

Parameters:
target - The target to be searches.
type - The type of the target match ( SUBJECT, RESOURCEor ACTION).
index - The index of the target match in the list.
Returns:
The target match requested, or null.

getTargetMatchList

public static List getTargetMatchList(Target target,
                                      int type)
Returns the list of target matches of the given type from the given target.

Parameters:
target - The target..
type - The type of the target match ( SUBJECT, RESOURCEor ACTION).
Returns:
The list of target matches requested, or null.

getTargetMatchSize

public static int getTargetMatchSize(Target target,
                                     int type)
Returns the number of target matches of the given type in the given target.

Parameters:
target - The target.
type - The type of the target match ( SUBJECT, RESOURCEor ACTION).
Returns:
The number of target matches.

getTargetMatchValue

public static AttributeValue getTargetMatchValue(Target target,
                                                 int type,
                                                 int index)
Returns the attribute value if the TargetMatch from the given target.

Parameters:
target - The target to be searched.
type - The type of the target match ( SUBJECT, RESOURCEor ACTION).
index - The index of the target match in the list.
Returns:
The attribute value requested, or null.

getTargetMatchEvaluatable

public static Evaluatable getTargetMatchEvaluatable(Target target,
                                                    int type,
                                                    int index)
Returns the Evaluatable if the TargetMatch from the given target.

Parameters:
target - The target to be searched.
type - The type of the target match ( SUBJECT, RESOURCEor ACTION).
index - The index of the target match in the list.
Returns:
The evaluatable requested, or null.

getTargetMatchFunction

public static Function getTargetMatchFunction(Target target,
                                              int type,
                                              int index)
Returns the match function if the TargetMatch from the given target.

Parameters:
target - The target to be searched.
type - The type of the target match ( SUBJECT, RESOURCEor ACTION).
index - The index of the target match in the list.
Returns:
The evaluatable requested, or null.

isEmpty

public static boolean isEmpty(Target target)
Verifies if the target is empty.

Parameters:
target - The target to verify.
Returns:
true, if the target is empty, false otherwise.


Copyright © 2006 Lutz Suhrbier, Freie Universitšt Berlin. All Rights Reserved.