nbi.xmlsec.xacml.builder
Class TargetMatchBuilderFactory

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.TargetMatchBuilderFactory
Direct Known Subclasses:
AssignmentTargetMatchBuilderFactory, PermissionTargetMatchBuilderFactory, RolePolicySetTargetMatchBuilderFactory

public class TargetMatchBuilderFactory
extends Object

Implements a factory for TargetMatchBuilders. TargetMatchBuilders have to be registered under the key of the related object class. The getInstance(int, Object)method returns the matching TargetMatchBuilderinstance, initialised with the given object as attribute.

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

Field Summary
(package private)  HashMap actionMatchBuilder
          Registry for action match builders
(package private) static Logger logger
           
(package private)  HashMap resourceMatchBuilder
          Registry for resource match builders
(package private)  HashMap subjectMatchBuilder
          Registry for subject match builders
 
Constructor Summary
TargetMatchBuilderFactory()
           
 
Method Summary
 TargetMatchBuilder getInstance(int type, Object obj)
          Creates an instance of a matching TargetMatchBuilderof the given object.
 void registerActionMatchBuilder(Class objClass, TargetMatchBuilder builder)
          Registers a ActionMatchBuilderfor a given object class.
 void registerResourceMatchBuilder(Class objClass, TargetMatchBuilder builder)
          Registers a SubjectMatchBuilderfor a given object class.
 void registerSubjectMatchBuilder(Class objClass, TargetMatchBuilder builder)
          Registers a SubjectMatchBuilderfor a given object class.
protected  void registerTargetMatchBuilder(int type, Class objClass, TargetMatchBuilder builder)
          Registers a TargetMatchBuilderfor a given object class.
 void unregisterActionMatchBuilder(Class objClass)
          Unregisters a ActionMatchBuilderfor a given object class.
 void unregisterResourceMatchBuilder(Class objClass)
          Unregisters a SubjectMatchBuilderfor a given object class.
 void unregisterSubjectMatchBuilder(Class objClass)
          Unregisters a SubjectMatchBuilderfor a given object class.
protected  void unregisterTargetMatchBuilder(int type, Class objClass)
          Unregisters a TargetMatchBuilderof an object class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static Logger logger

subjectMatchBuilder

HashMap subjectMatchBuilder
Registry for subject match builders


resourceMatchBuilder

HashMap resourceMatchBuilder
Registry for resource match builders


actionMatchBuilder

HashMap actionMatchBuilder
Registry for action match builders

Constructor Detail

TargetMatchBuilderFactory

public TargetMatchBuilderFactory()
Method Detail

getInstance

public TargetMatchBuilder getInstance(int type,
                                      Object obj)
Creates an instance of a matching TargetMatchBuilderof the given object.

Parameters:
type - TargetMatchBuildertype ( SUBJECT, RESOURCEor ACTION).
obj - Object to create a matching TargetMatchBuilderfor.
Returns:
TargetMatchBuilderinstance or null.

registerSubjectMatchBuilder

public void registerSubjectMatchBuilder(Class objClass,
                                        TargetMatchBuilder builder)
Registers a SubjectMatchBuilderfor a given object class.

Parameters:
objClass - Object class to register.
builder - SubjectMatchBuilderrelated to the object class.

registerResourceMatchBuilder

public void registerResourceMatchBuilder(Class objClass,
                                         TargetMatchBuilder builder)
Registers a SubjectMatchBuilderfor a given object class.

Parameters:
objClass - Object class to register.
builder - ResourceMatchBuilderrelated to the object class.

registerActionMatchBuilder

public void registerActionMatchBuilder(Class objClass,
                                       TargetMatchBuilder builder)
Registers a ActionMatchBuilderfor a given object class.

Parameters:
objClass - Object class to register.
builder - ActionMatchBuilderrelated to the object class.

registerTargetMatchBuilder

protected void registerTargetMatchBuilder(int type,
                                          Class objClass,
                                          TargetMatchBuilder builder)
Registers a TargetMatchBuilderfor a given object class.

Parameters:
type - TargetMatchBuildertype ( SUBJECT, RESOURCEor ACTION).
objClass - Object class to register.
builder - TargetMatchBuilderrelated to the object class.

unregisterSubjectMatchBuilder

public void unregisterSubjectMatchBuilder(Class objClass)
Unregisters a SubjectMatchBuilderfor a given object class.

Parameters:
objClass - Object class to unregister.

unregisterResourceMatchBuilder

public void unregisterResourceMatchBuilder(Class objClass)
Unregisters a SubjectMatchBuilderfor a given object class.

Parameters:
objClass - Object class to register.

unregisterActionMatchBuilder

public void unregisterActionMatchBuilder(Class objClass)
Unregisters a ActionMatchBuilderfor a given object class.

Parameters:
objClass - Object class to register.

unregisterTargetMatchBuilder

protected void unregisterTargetMatchBuilder(int type,
                                            Class objClass)
Unregisters a TargetMatchBuilderof an object class.

Parameters:
type - TargetMatchBuildertype ( SUBJECT, RESOURCEor ACTION).
objClass - Object class to unregister.


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