Package org.apache.abdera.factory
Interface ExtensionFactory
- All Known Implementing Classes:
AbstractExtensionFactory
,ExtensionFactoryMap
,MediaExtensionFactory
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.
- Implement your own Factory (hard)
- Subclass the default Axiom-based Factory (also somewhat difficult)
- Implement and register an ExtensionFactory (wonderfully simple)
- 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 TypeMethodDescription<T extends Element>
TgetElementWrapper
(Element internal) Deprecated.Abdera's support for static extensions is based on a simple delegation model.getMimeType
(T base) Deprecated.Retrieve the mime type for the elementString[]
Deprecated.Returns the Namespace URIs handled by this Extension Factoryboolean
handlesNamespace
(String namespace) Deprecated.Returns true if this extension factory handles the specified namespace
-
Method Details
-
handlesNamespace
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
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
Deprecated.Retrieve the mime type for the element- Parameters:
base
- An Abdera object- Returns:
- A MIME media type for the object
-