org.springframework.web.context.support
Class StoreResource

java.lang.Object
  extended by org.springframework.core.io.AbstractResource
      extended by org.springframework.web.context.support.StoreResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class StoreResource
extends org.springframework.core.io.AbstractResource

Spring resource implementation which describes a resource that is located within an Alfresco Store. The Alfresco Store within which the resource is located could be any of the conventional Alfresco Store types, including: ClassPathStore RemoteStore LocalFileSystemStore WebApplicationStore Store resources empower Spring to load resources from Alfresco Store implementations. This essentially includes beans and bean imports performed by service locators within Spring.

Author:
muzquiano

Constructor Summary
StoreResource(Store store, String path)
          Constructs a new store resource
 
Method Summary
 org.springframework.core.io.Resource createRelative(String relativePath)
           
 boolean equals(Object obj)
           
 String getDescription()
           
 String getFilename()
           
 InputStream getInputStream()
           
 String getPath()
          Return the path for this resource.
 Store getStore()
          Return the Store for this resource.
 int hashCode()
           
 
Methods inherited from class org.springframework.core.io.AbstractResource
exists, getFile, getFileForLastModifiedCheck, getURI, getURL, isOpen, isReadable, lastModified, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoreResource

public StoreResource(Store store,
                     String path)
Constructs a new store resource

Parameters:
store - The store within which the resource lives
path - Path to the resource
Method Detail

getStore

public final Store getStore()
Return the Store for this resource.


getPath

public final String getPath()
Return the path for this resource.


getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getFilename

public String getFilename()
Specified by:
getFilename in interface org.springframework.core.io.Resource
Overrides:
getFilename in class org.springframework.core.io.AbstractResource

getDescription

public String getDescription()

equals

public boolean equals(Object obj)
Overrides:
equals in class org.springframework.core.io.AbstractResource

hashCode

public int hashCode()
Overrides:
hashCode in class org.springframework.core.io.AbstractResource

createRelative

public org.springframework.core.io.Resource createRelative(String relativePath)
                                                    throws IOException
Specified by:
createRelative in interface org.springframework.core.io.Resource
Overrides:
createRelative in class org.springframework.core.io.AbstractResource
Throws:
IOException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.