nbi.xmlsec.xacml.builder
Class RequestCtxBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.RequestCtxBuilder
Direct Known Subclasses:
RBACRequestCtxBuilder

public class RequestCtxBuilder
extends Object

Class to create a RequestCtx.

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

Field Summary
private  Set actions
          Set of action attribute
protected  int AT_ACTION
          Attribute type action
protected  int AT_ENV
          Attribute type environment
protected  int AT_RESOURCE
          Attribute type resource
private  Set environment
          Set of environment attributes
(package private) static Logger logger
           
private  Set resources
          Set of resource attributes
private  Set subjects
          Set of subject attributes
 
Constructor Summary
RequestCtxBuilder()
           
 
Method Summary
protected  boolean add(int type, Attribute attr)
          Adds an attribute of the given type to the related RequestCtx's attribute set.
 boolean add(Subject subject)
          Adds a subject to the RequestCtx's subjects.
 boolean addAction(Attribute attr)
          Adds an action attribute to the RequestCtx's resources.
 boolean addEnvironment(Attribute attr)
          Adds an environemnt attribute to the RequestCtx's resources.
 boolean addResource(Attribute attr)
          Adds a resource attribute to the RequestCtx's resources.
 RequestCtx getInstance()
          Creates a new RequestCtx.
protected  boolean remove(int type, Attribute attr)
          Removes an attribute of the given type from the related RequestCtx's attribute set.
 boolean remove(Subject subject)
          Removes a subject from the RequestCtx's subjects.
 boolean removeAction(Attribute attr)
          Removes an action attribute from the RequestCtx's resources.
 boolean removeEnvironment(Attribute attr)
          Removes an environment attribute from the RequestCtx 's resources.
 boolean removeResource(Attribute attr)
          Removes a resource attribute from the RequestCtx's resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Logger logger

AT_RESOURCE

protected final int AT_RESOURCE
Attribute type resource

See Also:
Constant Field Values

AT_ACTION

protected final int AT_ACTION
Attribute type action

See Also:
Constant Field Values

AT_ENV

protected final int AT_ENV
Attribute type environment

See Also:
Constant Field Values

subjects

private Set subjects
Set of subject attributes


resources

private Set resources
Set of resource attributes


actions

private Set actions
Set of action attribute


environment

private Set environment
Set of environment attributes

Constructor Detail

RequestCtxBuilder

public RequestCtxBuilder()
Method Detail

add

public boolean add(Subject subject)
Adds a subject to the RequestCtx's subjects.

Parameters:
subject - The subject to add.
Returns:
true if the subject has been added succesfully.

remove

public boolean remove(Subject subject)
Removes a subject from the RequestCtx's subjects.

Parameters:
subject - The RequestCtx's subject to remove.
Returns:
true if the subject has been removed succesfully.

add

protected boolean add(int type,
                      Attribute attr)
Adds an attribute of the given type to the related RequestCtx's attribute set. The supported attribute types are:
  • AT_ACTION
  • AT_RESOURCE
  • AT_ENV
  • Parameters:
    type - Type of attribute set.
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    remove

    protected boolean remove(int type,
                             Attribute attr)
    Removes an attribute of the given type from the related RequestCtx's attribute set. The supported attribute types are:
  • AT_ACTION
  • AT_RESOURCE
  • AT_ENV
  • Parameters:
    type - Type of attribute set.
    attr - The RequestCtx's attr to remove.
    Returns:
    true if the attribute has been removed succesfully.

    addResource

    public boolean addResource(Attribute attr)
    Adds a resource attribute to the RequestCtx's resources.

    Parameters:
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    removeResource

    public boolean removeResource(Attribute attr)
    Removes a resource attribute from the RequestCtx's resources.

    Parameters:
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    addAction

    public boolean addAction(Attribute attr)
    Adds an action attribute to the RequestCtx's resources.

    Parameters:
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    removeAction

    public boolean removeAction(Attribute attr)
    Removes an action attribute from the RequestCtx's resources.

    Parameters:
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    addEnvironment

    public boolean addEnvironment(Attribute attr)
    Adds an environemnt attribute to the RequestCtx's resources.

    Parameters:
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    removeEnvironment

    public boolean removeEnvironment(Attribute attr)
    Removes an environment attribute from the RequestCtx 's resources.

    Parameters:
    attr - The attribute to add.
    Returns:
    true if the attribute has been added succesfully.

    getInstance

    public RequestCtx getInstance()
    Creates a new RequestCtx.

    Returns:
    The new RequestCtx or null <


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