@Deprecated public interface MediaPackageElementBuilderPlugin
Implementation note: Builder plugins may be stateful. They are intended to be used as throw-away objects.
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(MediaPackageElement.Type type,
MediaPackageElementFlavor flavor)
Deprecated.
This method is called if the media package builder tries to create a new media package element of type
elementType. |
boolean |
accept(Node elementNode)
Deprecated.
This method is called while the media package builder parses a media package manifest.
|
boolean |
accept(URI uri,
MediaPackageElement.Type type,
MediaPackageElementFlavor flavor)
Deprecated.
This method is called on every registered media package builder plugin until one of these plugins returns
true. |
void |
destroy()
Deprecated.
This method is called before the plugin is abandoned by the element builder.
|
MediaPackageElement |
elementFromManifest(Node elementNode,
MediaPackageSerializer serializer)
Deprecated.
Creates a media package element from the DOM element.
|
MediaPackageElement |
elementFromURI(URI uri)
Deprecated.
Creates a media package element from the given url that was previously accepted.
|
void |
init()
Deprecated.
This method is called once in a plugin's life cycle.
|
MediaPackageElement |
newElement(MediaPackageElement.Type type,
MediaPackageElementFlavor flavor)
Deprecated.
Creates a new media package element of the specified type.
|
void init() throws Exception
Exception - if some unrecoverable state is reachedvoid destroy()
boolean accept(MediaPackageElement.Type type, MediaPackageElementFlavor flavor)
elementType.
Every registered builder plugin will then be asked whether it is able to create a media package element from the
given element type. If this is the case for a plugin, it will then be asked to create such an element by a call to
newElement(org.opencastproject.mediapackage.MediaPackageElement.Type ,MediaPackageElementFlavor).
type - the typeflavor - the element flavortrue if the plugin is able to create such an elementboolean accept(URI uri, MediaPackageElement.Type type, MediaPackageElementFlavor flavor)
true. If no plugin recognises the file, it is rejected.
The parameters type and flavor may be taken as strong hints and may both be
null.
Implementers schould return the correct mime type for the given file if they are absolutely sure about the file.
Otherwise, null should be returned.
uri - the element locationtype - the element typeflavor - the element flavortrue if the plugin can handle the elementboolean accept(Node elementNode)
Every registered builder plugin will then be asked, whether it is able to create a media package element from the given element definition.
The element must then be constructed and returned in the call to
elementFromManifest(Node, MediaPackageSerializer).
elementNode - the nodetrue if the plugin is able to create such an elementMediaPackageElement elementFromURI(URI uri) throws UnsupportedElementException
uri - the element locationUnsupportedElementException - if creating the media package element failsMediaPackageElement elementFromManifest(Node elementNode, MediaPackageSerializer serializer) throws UnsupportedElementException
elementNode - the DOM nodeserializer - the media package serializerUnsupportedElementExceptionMediaPackageElement newElement(MediaPackageElement.Type type, MediaPackageElementFlavor flavor)
type - the element typeflavor - the element flavorCopyright © 2009–2020 Opencast Project. All rights reserved.