Class SearchPath

java.lang.Object
org.springframework.extensions.webscripts.SearchPath
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class SearchPath extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
Web Script Storage
Author:
davidc
  • Constructor Details

    • SearchPath

      public SearchPath()
  • Method Details

    • setSearchPath

      public void setSearchPath(List<Store> searchPath)
      Parameters:
      searchPath - List
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener
    • getStores

      public Collection<Store> getStores()
      Gets all Web Script Stores
      Returns:
      all Web Script Stores
    • getStore

      public Store getStore(String storePath)
      Gets the Web Script Store for the given Store path
      Parameters:
      storePath - String
      Returns:
      store (or null, if not found)
    • hasDocument

      public boolean hasDocument(String documentPath) throws IOException
      Determines if the document exists anywhere on the search path
      Parameters:
      documentPath - document path
      Returns:
      true => exists, false => does not exist
      Throws:
      IOException
    • getDocument

      public InputStream getDocument(String documentPath) throws IOException
      Gets a document from anywhere on the search path. Note a raw InputStream to the content is returned and must be closed by the accessing method.
      Parameters:
      documentPath - document path
      Returns:
      input stream onto document or null if it does not exist on the search path
      Throws:
      IOException