SunTM's XACML Implementation for JavaTM

Class StandardAttributeFactory

  extended bycom.sun.xacml.attr.AttributeFactory
      extended bycom.sun.xacml.attr.BaseAttributeFactory
          extended bycom.sun.xacml.attr.StandardAttributeFactory

public class StandardAttributeFactory
extends BaseAttributeFactory

This factory supports the standard set of datatypes specified in XACML 1.0 and 1.1. It is the default factory used by the system, and imposes a singleton pattern insuring that there is only ever one instance of this class.

Note that because this supports only the standard datatypes, this factory does not allow the addition of any other datatypes. If you call addDatatype on an instance of this class, an exception will be thrown. If you need a standard factory that is modifiable, you should create a new BaseAttributeFactory (or some other AttributeFactory) and configure it with the standard datatypes using addStandardDatatypes (or, in the case of BaseAttributeFactory, by providing the datatypes in the constructor).


Method Summary
 void addDatatype(String id, AttributeProxy proxy)
          Throws an UnsupportedOperationException since you are not allowed to modify what a standard factory supports.
static StandardAttributeFactory getFactory()
          Returns an instance of this factory.
 Map getStandardDatatypes()
          Returns the set of datatypes that this standard factory supports.
Methods inherited from class com.sun.xacml.attr.BaseAttributeFactory
createValue, createValue, createValue, createValue, getSupportedDatatypes
Methods inherited from class com.sun.xacml.attr.AttributeFactory
addAttributeProxy, createAttribute, createAttribute, createAttribute, createAttribute, getInstance, setDefaultFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public static StandardAttributeFactory getFactory()
Returns an instance of this factory. This method enforces a singleton model, meaning that this always returns the same instance, creating the factory if it hasn't been requested before. This is the default model used by the AttributeFactory, ensuring quick access to this factory.

the factory instance


public Map getStandardDatatypes()
Returns the set of datatypes that this standard factory supports.

a Map of String to AttributeProxys


public void addDatatype(String id,
                        AttributeProxy proxy)
Throws an UnsupportedOperationException since you are not allowed to modify what a standard factory supports.

addDatatype in class BaseAttributeFactory
id - the name of the attribute type
proxy - the proxy used to create new attributes of the given type
UnsupportedOperationException - always

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.