org.apache.neethi
Interface AssertionBuilderFactory

All Known Implementing Classes:
AssertionBuilderFactoryImpl

public interface AssertionBuilderFactory

AssertionFactory is used to create an Assertion from an Element. It uses an appropriate AssertionBuilder instance to create an Assertion based on the QName of the given element. Domain Policy authors could right custom AssertionBuilders to build Assertions for domain specific assertions.


Method Summary
 Assertion build(Object element)
          Returns an assertion that is built using the specified element.
 AssertionBuilder<?> getBuilder(QName qname)
          Returns an AssertionBuilder that build an Assertion from an element of qname type.
 ConverterRegistry getConverterRegistry()
          Returns the ConverterRegistry that the builder uses for converting the object to the types needed for the AssertionBuilders
 PolicyBuilder getPolicyEngine()
          Returns the PolicyEngine associated with this factory
 void registerBuilder(AssertionBuilder<?> builder)
          Registers an AssertionBuilder with all the builder's known elements.
 void registerBuilder(QName key, AssertionBuilder<?> builder)
          Registers an AssertionBuilder with a specified QName.
 

Method Detail

getPolicyEngine

PolicyBuilder getPolicyEngine()
Returns the PolicyEngine associated with this factory

Returns:

getConverterRegistry

ConverterRegistry getConverterRegistry()
Returns the ConverterRegistry that the builder uses for converting the object to the types needed for the AssertionBuilders

Returns:

registerBuilder

void registerBuilder(QName key,
                     AssertionBuilder<?> builder)
Registers an AssertionBuilder with a specified QName.

Parameters:
key - the QName that the AssertionBuilder understand
builder - the AssertionBuilder that can build an Assertion from an element of specified type

registerBuilder

void registerBuilder(AssertionBuilder<?> builder)
Registers an AssertionBuilder with all the builder's known elements.

Parameters:
builder - the AssertionBuilder that can build an Assertion from an element of specified type

build

Assertion build(Object element)
Returns an assertion that is built using the specified element.

Parameters:
element - the element that the AssertionBuilder can use to build an Assertion.
Returns:
an Assertion that is built using the specified element.

getBuilder

AssertionBuilder<?> getBuilder(QName qname)
Returns an AssertionBuilder that build an Assertion from an element of qname type.

Parameters:
qname - the type that the AssertionBuilder understands and builds an Assertion from
Returns:
an AssertionBuilder that understands qname type


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.