public class ExtensionRegistry extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected ExtensionDeserializer |
defaultDeser |
protected ExtensionSerializer |
defaultSer |
protected Map |
deserializerReg |
protected Map |
extensionAttributeTypeReg |
protected Map |
extensionTypeReg |
protected Map |
serializerReg |
static long |
serialVersionUID |
Constructor and Description |
---|
ExtensionRegistry()
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 |
---|---|
ExtensibilityElement |
createExtension(Class parentType,
QName elementType)
Create an instance of the type which was declared to be used to
represent extensibility elements with qnames matching elementType,
when intended to exist as children of the specified parentType.
|
Set |
getAllowableExtensions(Class parentType)
Returns a set of QNames representing the extensibility elements
that are allowed as children of the specified parent type.
|
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.
|
void |
mapExtensionTypes(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 elementType, that are intended to exist as
children of the specified parentType.
|
ExtensionDeserializer |
queryDeserializer(Class parentType,
QName elementType)
Look up the deserializer for the extensibility element with the
qname elementType, which was encountered as an immediate child
of the element represented by the specified parentType.
|
int |
queryExtensionAttributeType(Class parentType,
QName attrName)
Look up the type of the extensibility attribute with the qname attrName,
which was defined on an element represented by the specified parentType.
|
ExtensionSerializer |
querySerializer(Class parentType,
QName elementType)
Look up the serializer to use for the extensibility element with
the qname elementType, which was encountered as a child of the
specified parentType.
|
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 elementType, when
encountered as immediate children of the element represented by the
specified parentType.
|
void |
registerExtensionAttributeType(Class parentType,
QName attrName,
int attrType)
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 |
registerSerializer(Class parentType,
QName elementType,
ExtensionSerializer es)
Declare that the specified serializer should be used to serialize
all extensibility elements with a qname matching elementType, 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 long serialVersionUID
protected Map serializerReg
protected Map deserializerReg
protected Map extensionTypeReg
protected ExtensionSerializer defaultSer
protected ExtensionDeserializer defaultDeser
protected Map extensionAttributeTypeReg
public ExtensionRegistry()
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, javax.wsdl.Binding.class would be used to indicate
this extensibility element was found in the list of
extensibility elements belonging to a javax.wsdl.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, javax.wsdl.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, javax.wsdl.Binding.class would be used to indicate
this extensibility element was found in the list of
extensibility elements belonging to a javax.wsdl.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, javax.wsdl.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 Set getAllowableExtensions(Class parentType)
public void mapExtensionTypes(Class parentType, QName elementType, Class extensionType)
parentType
- a class object indicating where in the WSDL
definition this extension would exist. For example,
javax.wsdl.Binding.class would be used to indicate
this extensibility element would be added to the list of
extensibility elements belonging to a javax.wsdl.Binding,
after being instantiated.elementType
- the qname of the extensibility elementextensionType
- the concrete class which should be instantiatedcreateExtension(Class, QName)
public ExtensibilityElement createExtension(Class parentType, QName elementType) throws WSDLException
parentType
- a class object indicating where in the WSDL
definition this extension will exist. For example,
javax.wsdl.Binding.class would be used to indicate
this extensibility element is going to be added to the list of
extensibility elements belonging to a javax.wsdl.Binding,
after being instantiated.elementType
- the qname of the extensibility elementWSDLException
mapExtensionTypes(Class, QName, Class)
public void registerExtensionAttributeType(Class parentType, QName attrName, int attrType)
parentType
- a class object indicating where in the WSDL
document this extensibility attribute was encountered. For
example, javax.wsdl.Binding.class would be used to indicate
this attribute was defined on a <wsdl:binding> element.attrName
- the qname of the extensibility attributeattrType
- one of the constants defined on the AttributeExtensible
classqueryExtensionAttributeType(Class, QName)
,
AttributeExtensible
public int queryExtensionAttributeType(Class parentType, QName attrName)
parentType
- a class object indicating where in the WSDL
document this extensibility attribute was encountered. For
example, javax.wsdl.Binding.class would be used to indicate
this attribute was defined on a <wsdl:binding> element.attrName
- the qname of the extensibility attributeregisterExtensionAttributeType(Class, QName, int)
,
AttributeExtensible
Copyright © 2017 JBoss by Red Hat. All rights reserved.