org.apache.woden.wsdl20.extensions

## Class BaseComponentExtensionContext

- java.lang.Object
- - org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext

- All Implemented Interfaces:
    ComponentExtensionContext

      public abstract class BaseComponentExtensionContext
      extends 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ErrorReporter` | `errorReporter`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseComponentExtensionContext(WSDLComponent parent, URI extNamespace, ErrorReporter errorReporter)` Constructor accepts the parent component, the extension namespace and an error reporter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `URI` | `getNamespace()`
    `WSDLComponent` | `getParent()`
    `abstract ExtensionProperty[]` | `getProperties()`
    `abstract ExtensionProperty` | `getProperty(String propertyName)`
    `protected ExtensionProperty` | `newExtensionProperty(String name, 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,
                                       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:
        `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 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(String propertyName)

      Specified by:
        `getProperty` in interface `ComponentExtensionContext`
      See Also:
        `ComponentExtensionContext.getProperty(java.lang.String)`

    - #### newExtensionProperty

          protected ExtensionProperty newExtensionProperty(String name,
                                               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:
        `NullPointerException` - if the `name` parameter is null.

Copyright ? Apache Software Foundation. All Rights Reserved.