SunTM's XACML Implementation for JavaTM

com.sun.xacml.combine
Class CombiningAlgFactory

java.lang.Object
  extended bycom.sun.xacml.combine.CombiningAlgFactory
Direct Known Subclasses:
BaseCombiningAlgFactory

public abstract class CombiningAlgFactory
extends Object

Provides a factory mechanism for installing and retrieving combining algorithms.

Since:
1.0

Constructor Summary
protected CombiningAlgFactory()
          Default constructor.
 
Method Summary
abstract  void addAlgorithm(CombiningAlgorithm alg)
          Adds a combining algorithm to the factory.
static void addCombiningAlg(CombiningAlgorithm alg)
          Deprecated. As of version 1.2, replaced by addAlgorithm(CombiningAlgorithm). The new factory system requires you to get a factory instance and then call the non-static methods on that factory. The static versions of these methods have been left in for now, but are slower and will be removed in a future version.
abstract  CombiningAlgorithm createAlgorithm(URI algId)
          Tries to return the correct combinging algorithm based on the given algorithm ID.
static CombiningAlgorithm createCombiningAlg(URI algId)
          Deprecated. As of version 1.2, replaced by createAlgorithm(URI). The new factory system requires you to get a factory instance and then call the non-static methods on that factory. The static versions of these methods have been left in for now, but are slower and will be removed in a future version.
static CombiningAlgFactory getInstance()
          Returns the default factory.
abstract  Set getSupportedAlgorithms()
          Returns the algorithm identifiers supported by this factory.
static void setDefaultFactory(CombiningAlgFactoryProxy proxy)
          Sets the default factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombiningAlgFactory

protected CombiningAlgFactory()
Default constructor. Used only by subclasses.

Method Detail

getInstance

public static final CombiningAlgFactory getInstance()
Returns the default factory. Depending on the default factory's implementation, this may return a singleton instance or new instances with each invokation.

Returns:
the default CombiningAlgFactory

setDefaultFactory

public static final void setDefaultFactory(CombiningAlgFactoryProxy proxy)
Sets the default factory. Note that this is just a placeholder for now, and will be replaced with a more useful mechanism soon.


addAlgorithm

public abstract void addAlgorithm(CombiningAlgorithm alg)
Adds a combining algorithm to the factory. This single instance will be returned to anyone who asks the factory for an algorithm with the id given here.

Parameters:
alg - the combining algorithm to add
Throws:
IllegalArgumentException - if the algorithm is already registered

addCombiningAlg

public static void addCombiningAlg(CombiningAlgorithm alg)
Deprecated. As of version 1.2, replaced by addAlgorithm(CombiningAlgorithm). The new factory system requires you to get a factory instance and then call the non-static methods on that factory. The static versions of these methods have been left in for now, but are slower and will be removed in a future version.

Adds a combining algorithm to the factory. This single instance will be returned to anyone who asks the factory for an algorithm with the id given here.

Parameters:
alg - the combining algorithm to add
Throws:
IllegalArgumentException - if the algorithm is already registered

getSupportedAlgorithms

public abstract Set getSupportedAlgorithms()
Returns the algorithm identifiers supported by this factory.

Returns:
a Set of Strings

createAlgorithm

public abstract CombiningAlgorithm createAlgorithm(URI algId)
                                            throws UnknownIdentifierException
Tries to return the correct combinging algorithm based on the given algorithm ID.

Parameters:
algId - the identifier by which the algorithm is known
Returns:
a combining algorithm
Throws:
UnknownIdentifierException - algId is unknown

createCombiningAlg

public static CombiningAlgorithm createCombiningAlg(URI algId)
                                             throws UnknownIdentifierException
Deprecated. As of version 1.2, replaced by createAlgorithm(URI). The new factory system requires you to get a factory instance and then call the non-static methods on that factory. The static versions of these methods have been left in for now, but are slower and will be removed in a future version.

Tries to return the correct combinging algorithm based on the given algorithm ID.

Parameters:
algId - the identifier by which the algorithm is known
Returns:
a combining algorithm
Throws:
UnknownIdentifierException - algId is unknown

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.