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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDocument(String documentPath) Gets a document from anywhere on the search path.Gets the Web Script Store for the given Store pathGets all Web Script StoresbooleanhasDocument(String documentPath) Determines if the document exists anywhere on the search pathvoidonApplicationEvent(org.springframework.context.ApplicationEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetSearchPath(List<Store> searchPath) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
SearchPath
public SearchPath()
-
-
Method Details
-
setSearchPath
- Parameters:
searchPath- List
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener
-
getStores
Gets all Web Script Stores- Returns:
- all Web Script Stores
-
getStore
Gets the Web Script Store for the given Store path- Parameters:
storePath- String- Returns:
- store (or null, if not found)
-
hasDocument
Determines if the document exists anywhere on the search path- Parameters:
documentPath- document path- Returns:
- true => exists, false => does not exist
- Throws:
IOException
-
getDocument
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
-