nbi.xmlsec.xacml.builder
Class TargetMatchBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.TargetMatchBuilder
Direct Known Subclasses:
ActionMatchBuilder, PermissionMatchBuilder, ResourceMatchBuilder, SubjectMatchBuilder

public abstract class TargetMatchBuilder
extends Object

Base Class to create target matches.

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

Field Summary
protected  Object attribute
          The attribute to compare against
protected  Evaluatable eval
          The AttributeDesignator or AttributeSelector to be used to select attributes from the request context
protected  Function function
          The Function that represents the MatchId
protected  int type
          Indicating whether this class represents a SubjectMatch, ResourceMatch, or ActionMatch.
 
Constructor Summary
protected TargetMatchBuilder(int type)
          Creates an TargetMatchBuilder based on the type target match (SubjectMatch, ResourceMatch, or ActionMatch) to build.
protected TargetMatchBuilder(int type, Object attribute)
          Creates an TargetMatchBuilder based on the type target match (SubjectMatch, ResourceMatch, or ActionMatch) to build.
 
Method Summary
abstract  AttributeValue createMatchValue()
          Creates the attribute match value from the attribute.
 TargetMatch getInstance()
          Creates a TargetMatch instance.
protected  void setAttribute(Object attribute)
          Sets the attribute.
 void setMatchEvaluatable(AttributeDesignator eval)
          Sets the AttributeDesignator to be used to select attributes from the request context.
 void setMatchEvaluatable(AttributeSelector eval)
          Sets the AttributeSelector to be used to select attributes from the request context.
 void setMatchFunction(String functionId)
          Sets the Function used to do the matching.
 void setMatchFunction(URI functionId)
          Sets the Function used to do the matching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected int type
Indicating whether this class represents a SubjectMatch, ResourceMatch, or ActionMatch.


function

protected Function function
The Function that represents the MatchId


eval

protected Evaluatable eval
The AttributeDesignator or AttributeSelector to be used to select attributes from the request context


attribute

protected Object attribute
The attribute to compare against

Constructor Detail

TargetMatchBuilder

protected TargetMatchBuilder(int type)
Creates an TargetMatchBuilder based on the type target match (SubjectMatch, ResourceMatch, or ActionMatch) to build.

Parameters:
type - type of the target match.

TargetMatchBuilder

protected TargetMatchBuilder(int type,
                             Object attribute)
Creates an TargetMatchBuilder based on the type target match (SubjectMatch, ResourceMatch, or ActionMatch) to build.

Parameters:
type - type of the target match.
attribute - attribute of the target match.
Method Detail

getInstance

public TargetMatch getInstance()
Creates a TargetMatch instance.

Returns:
TargetMatch instance.

setMatchFunction

public void setMatchFunction(String functionId)
                      throws UnknownIdentifierException,
                             FunctionTypeException
Sets the Function used to do the matching.

Parameters:
functionId - The name of the function.
Throws:
UnknownIdentifierException
FunctionTypeException
See Also:
FunctionFactory.createFunction(java.lang.String), FunctionFactory.createFunction(java.lang.String)

setMatchFunction

public void setMatchFunction(URI functionId)
                      throws UnknownIdentifierException,
                             FunctionTypeException
Sets the Function used to do the matching.

Parameters:
functionId - The name of the function.
Throws:
UnknownIdentifierException
FunctionTypeException
See Also:
FunctionFactory.createFunction(java.lang.String), FunctionFactory.createFunction(java.lang.String)

setMatchEvaluatable

public void setMatchEvaluatable(AttributeDesignator eval)
Sets the AttributeDesignator to be used to select attributes from the request context.

Parameters:
eval - The AttributeDesignator to be used

setMatchEvaluatable

public void setMatchEvaluatable(AttributeSelector eval)
Sets the AttributeSelector to be used to select attributes from the request context.

Parameters:
eval - The AttributeSelector to be used

createMatchValue

public abstract AttributeValue createMatchValue()
Creates the attribute match value from the attribute.

Returns:
The created attribute value.

setAttribute

protected void setAttribute(Object attribute)
Sets the attribute.

Parameters:
attribute - The attribute to set.


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