org.jboss.security.xacml.core.ext
Class ExtendedAttributeFactory

java.lang.Object
  extended by org.jboss.security.xacml.sunxacml.attr.AttributeFactory
      extended by org.jboss.security.xacml.sunxacml.attr.BaseAttributeFactory
          extended by org.jboss.security.xacml.core.ext.ExtendedAttributeFactory

public class ExtendedAttributeFactory
extends BaseAttributeFactory

Extendible Attribute factory

Since:
Mar 28, 2008
Version:
$Revision$
Author:
Anil.Saldhana@redhat.com

Method Summary
 void addDatatype(String id, AttributeProxy proxy)
          Adds a proxy to the factory, which in turn will allow new attribute types to be created using the factory.
 AttributeValue createValue(Node root, String type)
          Creates a value based on the given DOM root node and data type.
 AttributeValue createValue(Node root, URI dataType)
          Creates a value based on the given DOM root node and data type.
 AttributeValue createValue(URI dataType, String value)
          Creates a value based on the given data type and text-encoded value.
static ExtendedAttributeFactory getFactory()
           
 
Methods inherited from class org.jboss.security.xacml.sunxacml.attr.BaseAttributeFactory
createValue, getSupportedDatatypes
 
Methods inherited from class org.jboss.security.xacml.sunxacml.attr.AttributeFactory
addAttributeProxy, createAttribute, createAttribute, createAttribute, createAttribute, getInstance, getInstance, registerFactory, setDefaultFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addDatatype

public void addDatatype(String id,
                        AttributeProxy proxy)
Description copied from class: BaseAttributeFactory
Adds a proxy to the factory, which in turn will allow new attribute types to be created using the factory. Typically the proxy is provided as an anonymous class that simply calls the getInstance methods (or something similar) of some AttributeValue class.

Overrides:
addDatatype in class BaseAttributeFactory
Parameters:
id - the name of the attribute type
proxy - the proxy used to create new attributes of the given type

createValue

public AttributeValue createValue(URI dataType,
                                  String value)
                           throws UnknownIdentifierException,
                                  ParsingException
Description copied from class: BaseAttributeFactory
Creates a value based on the given data type and text-encoded value. Used primarily by code that does an XPath query to get an attribute value, and then needs to turn the resulting value into an Attribute class.

Overrides:
createValue in class BaseAttributeFactory
Parameters:
dataType - the type of the attribute
value - the text-encoded representation of an attribute's value
Returns:
a new AttributeValue
Throws:
UnknownIdentifierException - if the data type isn't known to the factory
ParsingException - if the text is invalid or can't be parsed by the appropriate proxy

createValue

public AttributeValue createValue(Node root,
                                  String type)
                           throws UnknownIdentifierException,
                                  ParsingException
Description copied from class: BaseAttributeFactory
Creates a value based on the given DOM root node and data type.

Overrides:
createValue in class BaseAttributeFactory
Parameters:
root - the DOM root of an attribute value
type - the type of the attribute
Returns:
a new AttributeValue
Throws:
UnknownIdentifierException - if the type isn't known to the factory
ParsingException - if the node is invalid or can't be parsed by the appropriate proxy

createValue

public AttributeValue createValue(Node root,
                                  URI dataType)
                           throws UnknownIdentifierException,
                                  ParsingException
Description copied from class: BaseAttributeFactory
Creates a value based on the given DOM root node and data type.

Overrides:
createValue in class BaseAttributeFactory
Parameters:
root - the DOM root of an attribute value
dataType - the type of the attribute
Returns:
a new AttributeValue
Throws:
UnknownIdentifierException - if the data type isn't known to the factory
ParsingException - if the node is invalid or can't be parsed by the appropriate proxy

getFactory

public static ExtendedAttributeFactory getFactory()


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.