Spring Data Key-Value

org.springframework.data.keyvalue.riak.core.io
Class RiakResource<B,K>

java.lang.Object
  extended by org.springframework.core.io.AbstractResource
      extended by org.springframework.core.io.AbstractFileResolvingResource
          extended by org.springframework.core.io.UrlResource
              extended by org.springframework.data.keyvalue.riak.core.io.RiakResource<B,K>
All Implemented Interfaces:
InputStreamSource, Resource

public class RiakResource<B,K>
extends UrlResource

An implementation of UrlResource that is backed by a resource in Riak.

Author:
J. Brisbin

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
RiakResource(RiakTemplate riak, B bucket, K key)
           
 
Method Summary
 Resource createRelative(String relativePath)
           
 B getBucket()
           
 String getDescription()
           
 File getFile()
           
 String getFilename()
           
 InputStream getInputStream()
           
 K getKey()
           
 RiakTemplate getRiakTemplate()
           
 URI getURI()
           
 URL getURL()
           
 void setDescription(String description)
           
 
Methods inherited from class org.springframework.core.io.UrlResource
equals, hashCode
 
Methods inherited from class org.springframework.core.io.AbstractFileResolvingResource
contentLength, exists, getFile, getFileForLastModifiedCheck, isReadable, lastModified
 
Methods inherited from class org.springframework.core.io.AbstractResource
isOpen, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

RiakResource

public RiakResource(RiakTemplate riak,
                    B bucket,
                    K key)
             throws MalformedURLException
Throws:
MalformedURLException
Method Detail

getRiakTemplate

public RiakTemplate getRiakTemplate()

getBucket

public B getBucket()

getKey

public K getKey()

getURL

public URL getURL()
           throws IOException
Specified by:
getURL in interface Resource
Overrides:
getURL in class UrlResource
Throws:
IOException

getURI

public URI getURI()
           throws IOException
Specified by:
getURI in interface Resource
Overrides:
getURI in class UrlResource
Throws:
IOException

createRelative

public Resource createRelative(String relativePath)
                        throws MalformedURLException
Specified by:
createRelative in interface Resource
Overrides:
createRelative in class UrlResource
Throws:
MalformedURLException

getFilename

public String getFilename()
Specified by:
getFilename in interface Resource
Overrides:
getFilename in class UrlResource

setDescription

public void setDescription(String description)

getDescription

public String getDescription()
Specified by:
getDescription in interface Resource
Overrides:
getDescription in class UrlResource

getFile

public File getFile()
             throws IOException
Specified by:
getFile in interface Resource
Overrides:
getFile in class UrlResource
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface InputStreamSource
Overrides:
getInputStream in class UrlResource
Throws:
IOException

Spring Data Key-Value

Copyright © 2010-2011 SpringSource. All Rights Reserved.