org.apache.woden.wsdl20.extensions
Class BaseComponentExtensionContext

java.lang.Object
  extended by org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext
All Implemented Interfaces:
ComponentExtensionContext
Direct Known Subclasses:
HTTPBindingExtensionsImpl, HTTPBindingFaultExtensionsImpl, HTTPBindingMessageReferenceExtensionsImpl, HTTPBindingOperationExtensionsImpl, HTTPEndpointExtensionsImpl, InterfaceOperationExtensionsImpl, RPCInterfaceOperationExtensionsImpl, SOAPBindingExtensionsImpl, SOAPBindingFaultExtensionsImpl, SOAPBindingFaultReferenceExtensionsImpl, SOAPBindingMessageReferenceExtensionsImpl, SOAPBindingOperationExtensionsImpl, SOAPEndpointExtensionsImpl

public abstract class BaseComponentExtensionContext
extends java.lang.Object
implements ComponentExtensionContext

This abstract class partially implements the ComponentExtensionContext interface. It implements common behaviour, leaving the extension-specific methods abstract. That is, it leaves the getProperties and getProperty methods abstract, for subclasses to implement.

Implementors of WSDL 2.0 extensions may extend this class to reuse common behaviour for accessing the parent component and the extension namespace. It provides a constructor which subclasses should call that stores the parent component and extension namespace.

Author:
John Kaputin (jkaputin@apache.org)

Field Summary
protected  ErrorReporter errorReporter
           
 
Constructor Summary
protected BaseComponentExtensionContext(WSDLComponent parent, java.net.URI extNamespace, ErrorReporter errorReporter)
          Constructor accepts the parent component, the extension namespace and an error reporter.
 
Method Summary
 java.net.URI getNamespace()
           
 WSDLComponent getParent()
           
abstract  ExtensionProperty[] getProperties()
           
abstract  ExtensionProperty getProperty(java.lang.String propertyName)
           
protected  ExtensionProperty newExtensionProperty(java.lang.String name, java.lang.Object content)
          A factory-type method for instantiating and initialising ExtensionProperty objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorReporter

protected ErrorReporter errorReporter
Constructor Detail

BaseComponentExtensionContext

protected BaseComponentExtensionContext(WSDLComponent parent,
                                        java.net.URI extNamespace,
                                        ErrorReporter errorReporter)
Constructor accepts the parent component, the extension namespace and an error reporter. These parameters cannot be null.

Normal behaviour is for these 3 parameters to be provided by the ExtensionRegistry when it calls this constructor. Woden client code should not need to call this constructor directly. However, this assumes that extension properties from the required namespace have been registered in the ExtensionRegistry. This is done automatically by Woden for the extensions defined by the WSDL 2.0 Recommendation (SOAP, HTTP, RPC, WSDLX), but implementors of other WSDL 2.0 extensions must ensure they register their extension properties so that this constructor gets called by the ExtensionRegistry.

Parameters:
parent - WSDLComponent containing these extension properties
extNamespace - extension namespace URI
errorReporter - ErrorReporter available to subclasses for reporting errors
Throws:
java.lang.NullPointerException - if any of the parameters are null
Method Detail

getParent

public WSDLComponent getParent()
Specified by:
getParent in interface ComponentExtensionContext
See Also:
ComponentExtensionContext.getParent()

getNamespace

public java.net.URI getNamespace()
Specified by:
getNamespace in interface ComponentExtensionContext
See Also:
ComponentExtensionContext.getNamespace()

getProperties

public abstract ExtensionProperty[] getProperties()
Specified by:
getProperties in interface ComponentExtensionContext
See Also:
ComponentExtensionContext.getProperties()

getProperty

public abstract ExtensionProperty getProperty(java.lang.String propertyName)
Specified by:
getProperty in interface ComponentExtensionContext
See Also:
ComponentExtensionContext.getProperty(java.lang.String)

newExtensionProperty

protected ExtensionProperty newExtensionProperty(java.lang.String name,
                                                 java.lang.Object content)
A factory-type method for instantiating and initialising ExtensionProperty objects. This is a helper method for subclasses, as it automatically provides the extension namespace. The only additional information the caller must provide is the property name and its content. The property name parameter must not be null.

Throws:
java.lang.NullPointerException - if the name parameter is null.


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.