Package org.opencastproject.mediapackage
Interface MediaPackageBuilder
- All Known Implementing Classes:
MediaPackageBuilderImpl
public interface MediaPackageBuilder
A media package builder provides factory methods for the creation of media packages from manifest files, packages,
directories or from sratch.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new media package in the temporary directory defined by the java runtime propertyjava.io.tmpdir.Creates a new media package in the temporary directory defined by the java runtime propertyjava.io.tmpdir.Returns the currently active serializer.Loads a media package from the manifest.loadFromXml(String xml) Loads a media package from the manifest.loadFromXml(Node xml) Loads a media package from the manifest.voidsetSerializer(MediaPackageSerializer serializer) Sets the media package serializer that is used to resolve urls and helps in serialization and deserialization of media package elements.
-
Method Details
-
createNew
Creates a new media package in the temporary directory defined by the java runtime propertyjava.io.tmpdir.- Returns:
- the new media package
- Throws:
MediaPackageException- if creation of the new media package fails
-
createNew
Creates a new media package in the temporary directory defined by the java runtime propertyjava.io.tmpdir.The name of the media package root folder will be equal to the handle value.
- Parameters:
identifier- the media package identifier- Returns:
- the new media package
- Throws:
MediaPackageException- if creation of the new media package fails
-
loadFromXml
Loads a media package from the manifest.- Parameters:
is- the media package manifest input stream- Returns:
- the media package
- Throws:
MediaPackageException- if loading of the media package fails
-
loadFromXml
Loads a media package from the manifest.- Parameters:
xml- the media package manifest as an xml string- Returns:
- the media package
- Throws:
MediaPackageException- if loading of the media package fails
-
loadFromXml
Loads a media package from the manifest.- Parameters:
xml- the media package manifest as an xml node- Returns:
- the media package
- Throws:
MediaPackageException- if loading of the media package fails
-
setSerializer
Sets the media package serializer that is used to resolve urls and helps in serialization and deserialization of media package elements.- Parameters:
serializer- the serializer
-
getSerializer
MediaPackageSerializer getSerializer()Returns the currently active serializer. The serializer is used to resolve urls and helps in serialization and deserialization of media package elements.- Returns:
- the serializer
- See Also:
-