nbi.xmlsec.xacml.builder
Class ApplyBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.EvaluatableBuilder
      extended bynbi.xmlsec.xacml.builder.ApplyBuilder
Direct Known Subclasses:
ApplyTypeBuilder, ConditionTypeBuilder

public class ApplyBuilder
extends EvaluatableBuilder

Base Class to create ConditionTypeBuilder or ApplyTypeBuilder instances.

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

Field Summary
private  Function bagFunction
          the higher-order bag function to use.
private  Function function
          the Function to use in evaluating the elements in the apply.
protected  boolean isCondition
          true if this Apply is a Condition, false otherwise.
static String XMLSCHEMA_NAMESPACE
           
 
Fields inherited from class nbi.xmlsec.xacml.builder.EvaluatableBuilder
evaluatables, logger
 
Constructor Summary
protected ApplyBuilder()
           
protected ApplyBuilder(SyntaxScheme scheme)
          Creates an ApplyBuilder instance from a SyntaxScheme.
 
Method Summary
 boolean add(Evaluatable eval)
          Adds an Evaluatable to the evaluation list.
 boolean add(EvaluatableBuilder evalBuilder)
          Adds an Evaluatable to the evaluation list.
 Evaluatable getInstance()
          Creates a a new Apply instance.
protected  void parse(SyntaxScheme scheme)
          Parsed an ApplyBuilder instance from a SyntaxScheme.
 boolean remove(Evaluatable eval)
          Removes an Evaluatable to the evaluation list.
 void setBagFunction(Function bagFunction)
          Sets the higher-order bag function to use.
 void setBagFunction(String expression)
          Sets the higher-order bag function to use.
 void setFunction(Function function)
          Sets the Function to use in evaluating the elements in the apply.
 void setFunction(String expression)
          Sets the Function to use in evaluating the elements in the apply.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLSCHEMA_NAMESPACE

public static final String XMLSCHEMA_NAMESPACE
See Also:
Constant Field Values

function

private Function function
the Function to use in evaluating the elements in the apply.


bagFunction

private Function bagFunction
the higher-order bag function to use.


isCondition

protected boolean isCondition
true if this Apply is a Condition, false otherwise.

Constructor Detail

ApplyBuilder

protected ApplyBuilder()

ApplyBuilder

protected ApplyBuilder(SyntaxScheme scheme)
                throws ParsingException,
                       UnknownIdentifierException,
                       FunctionTypeException
Creates an ApplyBuilder instance from a SyntaxScheme.

Parameters:
scheme - SyntaxScheme to be parsed
Throws:
ParsingException
UnknownIdentifierException
FunctionTypeException
Method Detail

parse

protected void parse(SyntaxScheme scheme)
              throws ParsingException,
                     UnknownIdentifierException,
                     FunctionTypeException
Parsed an ApplyBuilder instance from a SyntaxScheme. It recognises the following new functions:
  • sub
  • res
  • act
  • env
  • and creates an one-and-only bag of the corresponding type, and fills it with the related argument value from the syntax scheme.

    Parameters:
    scheme - SyntaxScheme to be parsed
    Throws:
    ParsingException
    UnknownIdentifierException
    FunctionTypeException

    getInstance

    public Evaluatable getInstance()
    Creates a a new Apply instance.

    Specified by:
    getInstance in class EvaluatableBuilder
    See Also:
    EvaluatableBuilder.getInstance()

    setBagFunction

    public void setBagFunction(String expression)
                        throws UnknownIdentifierException,
                               FunctionTypeException
    Sets the higher-order bag function to use. Parses the function from an syntax scheme expression.

    Parameters:
    expression - The syntax scheme of the bagFunction to set.
    Throws:
    FunctionTypeException
    UnknownIdentifierException

    setBagFunction

    public void setBagFunction(Function bagFunction)
    Sets the higher-order bag function to use.

    Parameters:
    bagFunction - The bagFunction to set.

    setFunction

    public void setFunction(String expression)
                     throws UnknownIdentifierException,
                            FunctionTypeException
    Sets the Function to use in evaluating the elements in the apply. Parses the function from an syntax scheme expression.

    Parameters:
    expression - The syntax scheme of the function to set.
    Throws:
    FunctionTypeException
    UnknownIdentifierException

    setFunction

    public void setFunction(Function function)
    Sets the Function to use in evaluating the elements in the apply.

    Parameters:
    function - The function to set.

    add

    public boolean add(Evaluatable eval)
    Adds an Evaluatable to the evaluation list.

    Overrides:
    add in class EvaluatableBuilder
    Parameters:
    eval - Adds an Evaluatable to the evaluation list.
    Returns:
    true if the evaluatable has been added succesfully.
    See Also:
    EvaluatableBuilder.add(com.sun.xacml.cond.Evaluatable)

    add

    public boolean add(EvaluatableBuilder evalBuilder)
    Adds an Evaluatable to the evaluation list.

    Overrides:
    add in class EvaluatableBuilder
    Parameters:
    evalBuilder - The evaluation builder enclosing the evaluatable.
    Returns:
    true if the evaluatable has been added succesfully.
    See Also:
    EvaluatableBuilder.add(nbi.xmlsec.xacml.builder.EvaluatableBuilder)

    remove

    public boolean remove(Evaluatable eval)
    Removes an Evaluatable to the evaluation list.

    Overrides:
    remove in class EvaluatableBuilder
    Parameters:
    eval - The evaluatable to remove.
    Returns:
    true if the evaluatable has been removed succesfully.
    See Also:
    EvaluatableBuilder.remove(com.sun.xacml.cond.Evaluatable)


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