public class ExtensionRegistry extends Object
This class has been copied from WSDL4J and modified for Woden. TODO update method javadocs.
Modifier and Type | Field and Description |
---|---|
protected Map |
assertionReg |
protected Map |
compExtReg |
protected ExtensionDeserializer |
defaultDeser |
protected ExtensionSerializer |
defaultSer |
protected Map |
deserializerReg |
protected Map |
extAttributeReg |
protected Map |
extElementReg |
static String |
REGISTRAR_PROPERTY
The property containing the comma-separated listed of ExtensionRegistrars.
|
protected Map |
serializerReg |
Constructor and Description |
---|
ExtensionRegistry(ErrorReporter errorReporter)
Creates the extension registry, and sets the defaultSerializer
and defaultDeserializer properties to instances of an
UnknownExtensionSerializer, and an UnknownExtensionDeserializer,
respectively.
|
Modifier and Type | Method and Description |
---|---|
ComponentExtensionContext |
createComponentExtension(Class parentClass,
WSDLComponent parentComp,
URI extNamespace)
Return a ComponentExtensionContext object from the Java class registered for
the specified extension namespace against the specified WSDL component class.
|
XMLAttr |
createExtAttribute(Class ownerClass,
QName attrQName,
XMLElement ownerElement,
String attrValue) |
ExtensionElement |
createExtElement(Class parentType,
QName elementType)
Create an instance of the type which was declared to be used to
represent extensibility elements with qnames matching elementQN,
when intended to exist as children of the specified parentType.
|
Set |
getAllowableExtensions(Class parentType)
TODO make the return val typesafe, and create similar method for ext attrs.
|
ExtensionDeserializer |
getDefaultDeserializer()
Get the deserializer to be used when none is found for an encountered
element.
|
ExtensionSerializer |
getDefaultSerializer()
Get the serializer to be used when none is found for an extensibility
element.
|
ErrorReporter |
getErrorReporter() |
AssertionInfo |
queryAssertion(String assertionId) |
AssertionInfo[] |
queryAssertions() |
Class |
queryComponentExtension(Class parentClass,
URI extNamespace)
Return the Java class that represents the extensions from the specified
namespace that extend the specified WSDL component class.
|
URI[] |
queryComponentExtensionNamespaces(Class parentClass)
Return the extension namespaces registered for the specified WSDL Component class.
|
ExtensionDeserializer |
queryDeserializer(Class parentType,
QName elementType)
Look up the deserializer for the extensibility element with the
qname elementQN, which was encountered as an immediate child
of the element represented by the specified parentType.
|
Class |
queryExtAttributeType(Class parentClass,
QName attrQN)
Look up the type of the extensibility attribute with the specified qname,
which was defined on an element represented by the specified parent class.
|
Class |
queryExtElementType(Class parentClass,
QName elemQN)
Look up the type of the extensibility element with the specified qname, which
was defined as a child of the element represented by the specified parent class.
|
String[] |
queryResourceBundleNames() |
ExtensionSerializer |
querySerializer(Class parentType,
QName elementType)
Look up the serializer to use for the extensibility element with
the qname elementQN, which was encountered as a child of the
specified parentType.
|
void |
registerAssertion(Assertion assertion,
Class targetClass)
Register an Assertion along with the target Class that the assertion applies to.
|
void |
registerComponentExtension(Class parentClass,
URI extNamespace,
Class compExtCtxClass)
Register the Java class which will represent extensions from a specified
namespace that will extend the specified WSDL component class.
|
void |
registerDeserializer(Class parentType,
QName elementType,
ExtensionDeserializer ed)
Declare that the specified deserializer should be used to deserialize
all extensibility elements with a qname matching elementQN, when
encountered as immediate children of the element represented by the
specified parentType.
|
void |
registerExtAttributeType(Class ownerClass,
QName attrQName,
Class attrClass)
Declare that the type of the specified extension attribute, when it occurs
as an attribute of the specified parent type, should be assumed to be
attrType.
|
void |
registerExtElementType(Class parentType,
QName elementType,
Class extensionType)
Declare that the specified extensionType is the concrete
class which should be used to represent extensibility elements
with qnames matching elementQN, that are intended to exist as
children of the specified parentType.
|
void |
registerResourceBundle(String resourceBundleName) |
void |
registerSerializer(Class parentType,
QName elementType,
ExtensionSerializer es)
Declare that the specified serializer should be used to serialize
all extensibility elements with a qname matching elementQN, when
encountered as children of the specified parentType.
|
void |
setDefaultDeserializer(ExtensionDeserializer defaultDeser)
Set the deserializer to be used when none is found for an encountered
element.
|
void |
setDefaultSerializer(ExtensionSerializer defaultSer)
Set the serializer to be used when none is found for an extensibility
element.
|
public static final String REGISTRAR_PROPERTY
org.apache.woden.extensionregistrars
.protected Map serializerReg
protected Map deserializerReg
protected Map extElementReg
protected ExtensionSerializer defaultSer
protected ExtensionDeserializer defaultDeser
protected Map extAttributeReg
protected Map compExtReg
protected Map assertionReg
public ExtensionRegistry(ErrorReporter errorReporter)
public ErrorReporter getErrorReporter()
public void setDefaultSerializer(ExtensionSerializer defaultSer)
UnknownExtensionSerializer
public ExtensionSerializer getDefaultSerializer()
UnknownExtensionSerializer
public void setDefaultDeserializer(ExtensionDeserializer defaultDeser)
UnknownExtensionDeserializer
public ExtensionDeserializer getDefaultDeserializer()
UnknownExtensionDeserializer
public void registerSerializer(Class parentType, QName elementType, ExtensionSerializer es)
parentType
- a class object indicating where in the WSDL
definition this extension was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this extensibility element was found in the list of
extensibility elements belonging to a org.apache.woden.Binding.elementType
- the qname of the extensibility elementes
- the extension serializer to usequerySerializer(Class, QName)
public void registerDeserializer(Class parentType, QName elementType, ExtensionDeserializer ed)
parentType
- a class object indicating where in the WSDL
document this extensibility element was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this element was encountered as an immediate child of
a <wsdl:binding> element.elementType
- the qname of the extensibility elemented
- the extension deserializer to usequeryDeserializer(Class, QName)
public ExtensionSerializer querySerializer(Class parentType, QName elementType) throws WSDLException
parentType
- a class object indicating where in the WSDL
definition this extension was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this extensibility element was found in the list of
extensibility elements belonging to a org.apache.woden.Binding.elementType
- the qname of the extensibility elementWSDLException
registerSerializer(Class, QName, ExtensionSerializer)
,
setDefaultSerializer(ExtensionSerializer)
public ExtensionDeserializer queryDeserializer(Class parentType, QName elementType) throws WSDLException
parentType
- a class object indicating where in the WSDL
document this extensibility element was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this element was encountered as an immediate child of
a <wsdl:binding> element.elementType
- the qname of the extensibility elementWSDLException
registerDeserializer(Class, QName, ExtensionDeserializer)
,
setDefaultDeserializer(ExtensionDeserializer)
public Class queryExtElementType(Class parentClass, QName elemQN)
parentClass
- a class object indicating where in the WSDL
document this extensibility attribute was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this attribute was defined on a <wsdl:binding> element.elemQN
- the qname of the extensibility attributeregisterExtAttributeType(Class, QName, Class)
,
AttributeExtensible
public Set getAllowableExtensions(Class parentType)
public void registerExtElementType(Class parentType, QName elementType, Class extensionType)
parentType
- a class object indicating where in the WSDL
definition this extension would exist. For example,
org.apache.woden.Binding.class would be used to indicate
this extensibility element would be added to the list of
extensibility elements belonging to a org.apache.woden.Binding,
after being instantiated.elementType
- the qname of the extensibility elementextensionType
- the concrete class which should be instantiatedcreateExtElement(Class, QName)
public ExtensionElement createExtElement(Class parentType, QName elementType) throws WSDLException
parentType
- a class object indicating where in the WSDL
definition this extension will exist. For example,
org.apache.woden.Binding.class would be used to indicate
this extensibility element is going to be added to the list of
extensibility elements belonging to a org.apache.woden.Binding,
after being instantiated.elementType
- the qname of the extensibility elementWSDLException
registerExtElementType(Class, QName, Class)
public void registerExtAttributeType(Class ownerClass, QName attrQName, Class attrClass)
ownerClass
- a class object indicating where in the WSDL
document this extensibility attribute was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this attribute was defined on a <wsdl:binding> element.attrQName
- the qname of the extensibility attributeattrClass
- one of the constants defined on the AttributeExtensible
classqueryExtAttributeType(Class, QName)
,
AttributeExtensible
public Class queryExtAttributeType(Class parentClass, QName attrQN)
parentClass
- a class object indicating where in the WSDL
document this extensibility attribute was encountered. For
example, org.apache.woden.Binding.class would be used to indicate
this attribute was defined on a <wsdl:binding> element.attrQN
- the qname of the extensibility attributeregisterExtAttributeType(Class, QName, Class)
,
AttributeExtensible
public XMLAttr createExtAttribute(Class ownerClass, QName attrQName, XMLElement ownerElement, String attrValue) throws WSDLException
WSDLException
public void registerComponentExtension(Class parentClass, URI extNamespace, Class compExtCtxClass)
ComponentExtensionContext
.parentClass
- the WSDL component classextNamespace
- the extension namespacecompExtCtxClass
- the Java class representing these extensionspublic Class queryComponentExtension(Class parentClass, URI extNamespace)
ComponentExtensionContext
.parentClass
- the WSDL componentextNamespace
- the extension namespacepublic URI[] queryComponentExtensionNamespaces(Class parentClass)
parentClass
- the class of WSDL component extended by these namespacespublic ComponentExtensionContext createComponentExtension(Class parentClass, WSDLComponent parentComp, URI extNamespace) throws WSDLException
parentClass
- the WSDL component class.extNamespace
- the extension namespace.ComponentExtensionContext
objectWSDLException
- if no Java class is registered for this namespace and WSDL component.public void registerResourceBundle(String resourceBundleName)
public String[] queryResourceBundleNames()
public void registerAssertion(Assertion assertion, Class targetClass)
assertion
- an Assertion object representing the assertion to be registered.targetClass
- the Class representing the component in the WSDL that the assertion applies to.public AssertionInfo queryAssertion(String assertionId)
public AssertionInfo[] queryAssertions()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.