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 Details

    • createNew

      Creates a new media package in the temporary directory defined by the java runtime property java.io.tmpdir.
      Returns:
      the new media package
      Throws:
      MediaPackageException - if creation of the new media package fails
    • createNew

      MediaPackage createNew(Id identifier) throws MediaPackageException
      Creates a new media package in the temporary directory defined by the java runtime property java.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

      MediaPackage loadFromXml(String xml) throws MediaPackageException
      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

      MediaPackage loadFromXml(Node xml) throws MediaPackageException
      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

      void setSerializer(MediaPackageSerializer serializer)
      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: