|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.woden.wsdl20.extensions.ExtensionRegistry
public class ExtensionRegistry
This class is used to associate serializers, deserializers, and Java implementation types with extension elements. It also associates Java implementation types only with extension attributes, but not serializers and deserializers.
This class has been copied from WSDL4J and modified for Woden. TODO update method javadocs.
Field Summary | |
---|---|
protected java.util.Map |
assertionReg
|
protected java.util.Map |
compExtReg
|
protected ExtensionDeserializer |
defaultDeser
|
protected ExtensionSerializer |
defaultSer
|
protected java.util.Map |
deserializerReg
|
protected java.util.Map |
extAttributeReg
|
protected java.util.Map |
extElementReg
|
static java.lang.String |
REGISTRAR_PROPERTY
The property containing the comma-separated listed of ExtensionRegistrars. |
protected java.util.Map |
serializerReg
|
Constructor Summary | |
---|---|
ExtensionRegistry(ErrorReporter errorReporter)
Creates the extension registry, and sets the defaultSerializer and defaultDeserializer properties to instances of an UnknownExtensionSerializer, and an UnknownExtensionDeserializer, respectively. |
Method Summary | |
---|---|
ComponentExtensionContext |
createComponentExtension(java.lang.Class parentClass,
WSDLComponent parentComp,
java.net.URI extNamespace)
Return a ComponentExtensionContext object from the Java class registered for the specified extension namespace against the specified WSDL component class. |
XMLAttr |
createExtAttribute(java.lang.Class ownerClass,
QName attrQName,
XMLElement ownerElement,
java.lang.String attrValue)
|
ExtensionElement |
createExtElement(java.lang.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. |
java.util.Set |
getAllowableExtensions(java.lang.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(java.lang.String assertionId)
|
AssertionInfo[] |
queryAssertions()
|
java.lang.Class |
queryComponentExtension(java.lang.Class parentClass,
java.net.URI extNamespace)
Return the Java class that represents the extensions from the specified namespace that extend the specified WSDL component class. |
java.net.URI[] |
queryComponentExtensionNamespaces(java.lang.Class parentClass)
Return the extension namespaces registered for the specified WSDL Component class. |
ExtensionDeserializer |
queryDeserializer(java.lang.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. |
java.lang.Class |
queryExtAttributeType(java.lang.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. |
java.lang.Class |
queryExtElementType(java.lang.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. |
java.lang.String[] |
queryResourceBundleNames()
|
ExtensionSerializer |
querySerializer(java.lang.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,
java.lang.Class targetClass)
Register an Assertion along with the target Class that the assertion applies to. |
void |
registerComponentExtension(java.lang.Class parentClass,
java.net.URI extNamespace,
java.lang.Class compExtCtxClass)
Register the Java class which will represent extensions from a specified namespace that will extend the specified WSDL component class. |
void |
registerDeserializer(java.lang.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(java.lang.Class ownerClass,
QName attrQName,
java.lang.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(java.lang.Class parentType,
QName elementType,
java.lang.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(java.lang.String resourceBundleName)
|
void |
registerSerializer(java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String REGISTRAR_PROPERTY
org.apache.woden.extensionregistrars
.
protected java.util.Map serializerReg
protected java.util.Map deserializerReg
protected java.util.Map extElementReg
protected ExtensionSerializer defaultSer
protected ExtensionDeserializer defaultDeser
protected java.util.Map extAttributeReg
protected java.util.Map compExtReg
protected java.util.Map assertionReg
Constructor Detail |
---|
public ExtensionRegistry(ErrorReporter errorReporter)
Method Detail |
---|
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(java.lang.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(java.lang.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(java.lang.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 element
WSDLException
registerSerializer(Class, QName, ExtensionSerializer)
,
setDefaultSerializer(ExtensionSerializer)
public ExtensionDeserializer queryDeserializer(java.lang.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 element
WSDLException
registerDeserializer(Class, QName, ExtensionDeserializer)
,
setDefaultDeserializer(ExtensionDeserializer)
public java.lang.Class queryExtElementType(java.lang.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 attribute
registerExtAttributeType(Class, QName, Class)
,
AttributeExtensible
public java.util.Set getAllowableExtensions(java.lang.Class parentType)
public void registerExtElementType(java.lang.Class parentType, QName elementType, java.lang.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(java.lang.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 element
WSDLException
registerExtElementType(Class, QName, Class)
public void registerExtAttributeType(java.lang.Class ownerClass, QName attrQName, java.lang.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 java.lang.Class queryExtAttributeType(java.lang.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 attribute
registerExtAttributeType(Class, QName, Class)
,
AttributeExtensible
public XMLAttr createExtAttribute(java.lang.Class ownerClass, QName attrQName, XMLElement ownerElement, java.lang.String attrValue) throws WSDLException
WSDLException
public void registerComponentExtension(java.lang.Class parentClass, java.net.URI extNamespace, java.lang.Class compExtCtxClass)
ComponentExtensionContext
.
parentClass
- the WSDL component classextNamespace
- the extension namespacecompExtCtxClass
- the Java class representing these extensionspublic java.lang.Class queryComponentExtension(java.lang.Class parentClass, java.net.URI extNamespace)
ComponentExtensionContext
.
parentClass
- the WSDL componentextNamespace
- the extension namespace
public java.net.URI[] queryComponentExtensionNamespaces(java.lang.Class parentClass)
parentClass
- the class of WSDL component extended by these namespaces
public ComponentExtensionContext createComponentExtension(java.lang.Class parentClass, WSDLComponent parentComp, java.net.URI extNamespace) throws WSDLException
parentClass
- the WSDL component class.extNamespace
- the extension namespace.
ComponentExtensionContext
object
WSDLException
- if no Java class is registered for this namespace and WSDL component.public void registerResourceBundle(java.lang.String resourceBundleName)
public java.lang.String[] queryResourceBundleNames()
public void registerAssertion(Assertion assertion, java.lang.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(java.lang.String assertionId)
public AssertionInfo[] queryAssertions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |