public class DuracloudContentWriter extends Object implements ContentWriter
Constructor and Description |
---|
DuracloudContentWriter(ContentStore contentStore,
String username) |
DuracloudContentWriter(ContentStore contentStore,
String username,
boolean throwOnError) |
Modifier and Type | Method and Description |
---|---|
List<AddContentResult> |
getResults()
This method returns an item-by-item list of results for the write
requests.
|
void |
ignore(String spaceId,
String contentId,
long contentSize)
This method helps with the book-keeping of which files are ignored.
|
ChunksManifest |
write(String spaceId,
ChunkableContent chunkable)
This method writes the ChunkableContent to the arg space.
|
ChunksManifest |
write(String spaceId,
ChunkableContent chunkable,
Map<String,String> contentProperties)
This method implements the ContentWriter interface for writing content
to a DataStore.
|
String |
writeSingle(String spaceId,
String chunkChecksum,
ChunkInputStream chunk)
This method writes the arg Chunk to the arg space.
|
String |
writeSingle(String spaceId,
String chunkChecksum,
ChunkInputStream chunk,
Map<String,String> properties)
This method writes a single chunk to the DataStore.
|
public DuracloudContentWriter(ContentStore contentStore, String username)
public DuracloudContentWriter(ContentStore contentStore, String username, boolean throwOnError)
public List<AddContentResult> getResults()
ContentWriter
getResults
in interface ContentWriter
public void ignore(String spaceId, String contentId, long contentSize)
ContentWriter
ignore
in interface ContentWriter
spaceId
- destination where arg content was assigned to be writtencontentId
- of contentcontentSize
- of contentpublic ChunksManifest write(String spaceId, ChunkableContent chunkable, Map<String,String> contentProperties) throws NotFoundException
write
in interface ContentWriter
spaceId
- destination space of arg chunkable contentchunkable
- content to be writtencontentProperties
- user defined properties to be stored with chunkable contentNotFoundException
- if space is not foundpublic ChunksManifest write(String spaceId, ChunkableContent chunkable) throws NotFoundException
ContentWriter
write
in interface ContentWriter
spaceId
- destination where arg chunkable content will be writtenchunkable
- content to be writtenNotFoundException
- on errorpublic String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk, Map<String,String> properties) throws NotFoundException
writeSingle
in interface ContentWriter
spaceId
- destination where arg chunk content will be writtenchunkChecksum
- md5 checksum of the chunk if known, null otherwisechunk
- content to be writtenproperties
- user-defined properties for the contentNotFoundException
- if space is not foundpublic String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk) throws NotFoundException
ContentWriter
writeSingle
in interface ContentWriter
spaceId
- destination where arg chunk content will be writtenchunkChecksum
- md5 checksum of the chunk if known, null otherwisechunk
- content to be writtenNotFoundException
- on errorCopyright © 2009–2014 DuraSpace. All rights reserved.