Interface ExtensionFactory

All Known Implementing Classes:
AbstractExtensionFactory, ExtensionFactoryMap, MediaExtensionFactory

@Deprecated(since="2021-07-29") public interface ExtensionFactory
Deprecated.
This API is deprecated as Apache Abdera is a retired project since 2017.

Extension Factories are used to provide a means of dynamically resolving builders for namespaced extension elements

There are four ways of supporting extension elements.

  1. Implement your own Factory (hard)
  2. Subclass the default Axiom-based Factory (also somewhat difficult)
  3. Implement and register an ExtensionFactory (wonderfully simple)
  4. Use the Feed Object Model's dynamic support for extensions (also very simple)

Registering an Extension Factory requires generally nothing more than implementing ExtensionFactory and then creating a file called META-INF/services/org.apache.abdera.factory.ExtensionFactory and listing the class names of each ExtensionFactory you wish to register.

ExtensionFactory implementations are assumed to be threadsafe

  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Element>
    T
    Deprecated.
    Abdera's support for static extensions is based on a simple delegation model.
    <T extends Base>
    String
    getMimeType(T base)
    Deprecated.
    Retrieve the mime type for the element
    Deprecated.
    Returns the Namespace URIs handled by this Extension Factory
    boolean
    Deprecated.
    Returns true if this extension factory handles the specified namespace
  • Method Details

    • handlesNamespace

      boolean handlesNamespace(String namespace)
      Deprecated.
      Returns true if this extension factory handles the specified namespace
      Parameters:
      namespace - The XML namespace of the extension
      Returns:
      True if the namespace is supported by the ExtensionFactory
    • getNamespaces

      String[] getNamespaces()
      Deprecated.
      Returns the Namespace URIs handled by this Extension Factory
      Returns:
      A List of Namespace URIs Supported by this Extension
    • getElementWrapper

      <T extends Element> T getElementWrapper(Element internal)
      Deprecated.
      Abdera's support for static extensions is based on a simple delegation model. Static extension interfaces wrap the dynamic extension API. ExtensionFactory's are handed the internal dynamic element instance and are expected to hand back an object wrapper.
      Parameters:
      internal - The Abdera element that needs to be wrapped
      Returns:
      The wrapper element
    • getMimeType

      <T extends Base> String getMimeType(T base)
      Deprecated.
      Retrieve the mime type for the element
      Parameters:
      base - An Abdera object
      Returns:
      A MIME media type for the object