Class AttachmentBuilderPlugin
java.lang.Object
org.opencastproject.mediapackage.elementbuilder.AbstractElementBuilderPlugin
org.opencastproject.mediapackage.elementbuilder.AbstractAttachmentBuilderPlugin
org.opencastproject.mediapackage.elementbuilder.AttachmentBuilderPlugin
- All Implemented Interfaces:
MediaPackageElementBuilderPlugin,MediaPackageElementBuilder
public class AttachmentBuilderPlugin
extends AbstractAttachmentBuilderPlugin
implements MediaPackageElementBuilder
This implementation of the
MediaPackageElementBuilderPlugin recognizes arbitrary attachments and creates
media package element representations for them.
A media package element is considered an attachment by this plugin if it is of type Attachment and does not
have any specializing flavor.
-
Field Summary
Fields inherited from class org.opencastproject.mediapackage.elementbuilder.AbstractAttachmentBuilderPlugin
flavorFields inherited from class org.opencastproject.mediapackage.elementbuilder.AbstractElementBuilderPlugin
mimeTypes, priority, xpath -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(URI uri, MediaPackageElement.Type type, MediaPackageElementFlavor flavor) This method is called on every registered media package builder plugin until one of these plugins returnstrue.booleanThis implementation ofaccepttests for the correct node type (attachment).intReturns -1 by default.toString()Methods inherited from class org.opencastproject.mediapackage.elementbuilder.AbstractAttachmentBuilderPlugin
accept, elementFromManifest, elementFromURI, elementFromURI, newElement, specializeAttachmentMethods inherited from class org.opencastproject.mediapackage.elementbuilder.AbstractElementBuilderPlugin
destroy, init, setPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opencastproject.mediapackage.MediaPackageElementBuilder
elementFromManifest, elementFromURI, elementFromURI, newElement
-
Constructor Details
-
AttachmentBuilderPlugin
public AttachmentBuilderPlugin()
-
-
Method Details
-
accept
Description copied from interface:MediaPackageElementBuilderPluginThis method is called on every registered media package builder plugin until one of these plugins returnstrue. If no plugin recognises the file, it is rejected.The parameters
typeandflavormay be taken as strong hints and may both benull.Implementers schould return the correct mime type for the given file if they are absolutely sure about the file. Otherwise,
nullshould be returned.- Specified by:
acceptin interfaceMediaPackageElementBuilderPlugin- Overrides:
acceptin classAbstractAttachmentBuilderPlugin- Parameters:
uri- the element locationtype- the element typeflavor- the element flavor- Returns:
trueif the plugin can handle the element- See Also:
-
accept
Description copied from class:AbstractAttachmentBuilderPluginThis implementation ofaccepttests for the correct node type (attachment).- Specified by:
acceptin interfaceMediaPackageElementBuilderPlugin- Overrides:
acceptin classAbstractAttachmentBuilderPlugin- Parameters:
elementNode- the node- Returns:
trueif the plugin is able to create such an element- See Also:
-
getPriority
public int getPriority()Returns -1 by default. This plugin is an implementation for unknown attachments, therefore it returns-1as its priority.- Overrides:
getPriorityin classAbstractElementBuilderPlugin- See Also:
-
toString
- Overrides:
toStringin classAbstractAttachmentBuilderPlugin- See Also:
-