@Repository public class SwiftContentDAO extends Object implements ContentDAO
| Constructor and Description |
|---|
SwiftContentDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
copyContent(String sourceObjectId,
String trgObjectId)
Copies content of one storage object to another.
|
void |
deleteContent(String fileName)
Deletes storage object identified by fileName.
|
void |
getContent(String fileName,
long start,
long end,
OutputStream os)
Retrieves content of file from storage.
|
PutResult |
putContent(String fileName,
InputStream data)
Puts given content to storage under given fileName.
|
public PutResult putContent(String fileName, InputStream data) throws IOException, org.jclouds.blobstore.ContainerNotFoundException
putContent in interface ContentDAOfileName - name of the filedata - content of file to be savedIOException - if an I/O error occursorg.jclouds.blobstore.ContainerNotFoundExceptionpublic void getContent(String fileName, long start, long end, OutputStream os) throws IOException, eu.europeana.cloud.service.mcs.exception.FileNotExistsException, org.jclouds.blobstore.ContainerNotFoundException
getContent in interface ContentDAOfileName - name of the file to retrievestart - first offset included in the response. If equal to -1,
ignored.end - last offset included in the response (inclusive). If equal to
-1, ignored.os - outputstream the content is written toIOException - if an I/O error occurseu.europeana.cloud.service.mcs.exception.FileNotExistsException - if object does not exist in the storageorg.jclouds.blobstore.ContainerNotFoundExceptionpublic void copyContent(String sourceObjectId, String trgObjectId) throws eu.europeana.cloud.service.mcs.exception.FileNotExistsException, eu.europeana.cloud.service.mcs.exception.FileAlreadyExistsException
copyContent in interface ContentDAOsourceObjectId - name of the source storage objecttrgObjectId - name of the target storage objecteu.europeana.cloud.service.mcs.exception.FileNotExistsException - if source object does not exist in the storageeu.europeana.cloud.service.mcs.exception.FileAlreadyExistsExceptionpublic void deleteContent(String fileName) throws eu.europeana.cloud.service.mcs.exception.FileNotExistsException
deleteContent in interface ContentDAOfileName - name of the object to be deletedeu.europeana.cloud.service.mcs.exception.FileNotExistsException - if object does not exist in the storageCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.