public class MediaStorageServiceImpl extends Object implements MediaStorageService
| Constructor and Description |
|---|
MediaStorageServiceImpl(eu.europeana.features.ObjectStorageClient objectStorageClient) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
checkIfExists(String id)
Checks if a particular file with the provided id is present in the media storage
|
byte[] |
convertPayloadToByteArray(org.jclouds.io.Payload payload)
Helper class to convert payload to an array of bytes
|
void |
createOrModify(MediaFile mediaFile)
Deprecated.
September 2018, no longer needed/required
|
void |
delete(String id)
Deprecated.
September 2018, no longer needed/required
|
MediaFile |
retrieveAsMediaFile(String id,
String originalUrl,
boolean withContent)
Retrieves a file from media storage with or without the content.
|
eu.europeana.domain.StorageObject |
retrieveAsStorageObject(String id,
boolean withContent)
Retrieves a file from media storage with or without the content.
|
byte[] |
retrieveContent(String id)
Retrieves only the content of a media file (so no metadata)
|
eu.europeana.domain.ObjectMetadata |
retrieveMetaData(String id)
Retrieves only the metadata of a media file
|
public MediaStorageServiceImpl(eu.europeana.features.ObjectStorageClient objectStorageClient)
public Boolean checkIfExists(String id)
MediaStorageServicecheckIfExists in interface MediaStorageServiceid - the id of the fileMediaStorageService.checkIfExists(String)public MediaFile retrieveAsMediaFile(String id, String originalUrl, boolean withContent)
MediaStorageServiceretrieveAsMediaFile in interface MediaStorageServiceid - the id of the filewithContent - boolean which indicates whether the actual contents should be retrieved, or
only the metadata of the fileMediaStorageService.retrieveAsMediaFile(String, String, boolean)public eu.europeana.domain.StorageObject retrieveAsStorageObject(String id, boolean withContent)
MediaStorageServiceretrieveAsStorageObject in interface MediaStorageServiceid - the id of the filewithContent - boolean which indicates whether the actual contents should be retrieved, or
only the metadata of the fileMediaStorageService.retrieveAsStorageObject(String, boolean)public byte[] convertPayloadToByteArray(org.jclouds.io.Payload payload)
throws IOException
MediaStorageServiceconvertPayloadToByteArray in interface MediaStorageServiceIOExceptionMediaStorageService.convertPayloadToByteArray(Payload)public byte[] retrieveContent(String id)
MediaStorageServiceretrieveContent in interface MediaStorageServiceid - the id of the fileMediaStorageService.retrieveContent(String)public eu.europeana.domain.ObjectMetadata retrieveMetaData(String id)
MediaStorageServiceretrieveMetaData in interface MediaStorageServiceid - the id of the fileMediaStorageService.retrieveMetaData(String)@Deprecated public void createOrModify(MediaFile mediaFile)
MediaStorageServicecreateOrModify in interface MediaStorageServicemediaFile - the new/modified MediaFileMediaStorageService.createOrModify(MediaFile)@Deprecated public void delete(String id)
MediaStorageServicedelete in interface MediaStorageServiceid - the id of the fileMediaStorageService.delete(String)Copyright © 2019 Europeana Foundation. All rights reserved.