Interface ContentWriter

All Known Implementing Classes:
DuracloudContentWriter, FilesystemContentWriter

public interface ContentWriter
Author:
Andrew Woods Date: Feb 5, 2010
  • Method Details

    • write

      ChunksManifest write(String spaceId, ChunkableContent chunkable) throws NotFoundException
      This method writes the ChunkableContent to the arg space.
      Parameters:
      spaceId - destination where arg chunkable content will be written
      chunkable - content to be written
      Returns:
      ChunksManifest of written content
      Throws:
      NotFoundException - on error
    • write

      ChunksManifest write(String spaceId, ChunkableContent chunkable, Map<String,String> contentProperties) throws NotFoundException
      This method writes the ChunkableContent to the arg space.
      Parameters:
      spaceId - destination where arg chunkable content will be written
      chunkable - content to be written
      contentProperties - user defined properties to be stored with chunkable content
      Returns:
      ChunksManifest of written content
      Throws:
      NotFoundException - on error
    • writeSingle

      String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk, Map<String,String> properties) throws NotFoundException
      This method writes the arg Chunk to the arg space. It is intended for use when when the arg chunk is actually a complete piece of content
      Parameters:
      spaceId - destination where arg chunk content will be written
      chunkChecksum - md5 checksum of the chunk if known, null otherwise
      chunk - content to be written
      properties - user-defined properties for the content
      Returns:
      MD5 of content
      Throws:
      NotFoundException - on error
    • writeSingle

      String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk) throws NotFoundException
      This method writes the arg Chunk to the arg space. It is intended for use when when the arg chunk is actually a complete piece of content
      Parameters:
      spaceId - destination where arg chunk content will be written
      chunkChecksum - md5 checksum of the chunk if known, null otherwise
      chunk - content to be written
      properties - user-defined properties for the content
      Returns:
      MD5 of content
      Throws:
      NotFoundException - on error
    • ignore

      void ignore(String spaceId, String contentId, long contentSize)
      This method helps with the book-keeping of which files are ignored.
      Parameters:
      spaceId - destination where arg content was assigned to be written
      contentId - of content
      contentSize - of content
    • getResults

      List<AddContentResult> getResults()
      This method returns an item-by-item list of results for the write requests.
      Returns:
      List of results