Package org.opencastproject.mediapackage
Interface MediaPackageSerializer
- All Known Implementing Classes:
ChainingMediaPackageSerializer,DefaultMediaPackageSerializerImpl,PresignedUrlMediaPackageSerializer,SigningMediaPackageSerializer
public interface MediaPackageSerializer
-
Method Summary
Modifier and TypeMethodDescriptionThis method is called every time a url is being read from a media package manifest.This method is called every time a url is being written to a media package manifest.intIdentifies the serializer ranking number.
-
Method Details
-
encodeURI
This method is called every time a url is being written to a media package manifest. By implementing this method, serializers are able to store package elements in directories relative to some common root folder, thereby making it movable.- Parameters:
uri- the url to encode- Returns:
- the encoded path
- Throws:
URISyntaxException- if the resulting URI contains syntax errors
-
decodeURI
This method is called every time a url is being read from a media package manifest. By implementing this method, serializers are able to redirect urls to local caches which might make sense when it comes to dealing with huge media files.- Parameters:
path- the original path from the manifest- Returns:
- the resolved url
- Throws:
URISyntaxException- if the path cannot be converted into a urlURISyntaxException- if the resulting URI contains syntax errors
-
getRanking
int getRanking()Identifies the serializer ranking number. The ranking is respected when multiple serializers are chained. When encoding an URI, the serializer with the highest ranking is used first. If an URI needs to be decoded, the ranking is used in the opposite direction.- Returns:
- The service ranking number.
-