public abstract class ResourceStore
extends org.springframework.extensions.webscripts.AbstractStore
| Modifier and Type | Class and Description |
|---|---|
protected class |
ResourceStore.WebApplicationStoreScriptLoader
Web Application Store implementation of a Script Loader
|
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.core.io.support.PathMatchingResourcePatternResolver |
resolver |
| Constructor and Description |
|---|
ResourceStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
createDocument(String documentPath,
String content) |
boolean |
exists() |
String[] |
getAllDocumentPaths() |
String |
getBasePath() |
String[] |
getDescriptionDocumentPaths() |
InputStream |
getDocument(String documentPath) |
String[] |
getDocumentPaths(String path,
boolean includeSubPaths,
String documentPattern) |
protected org.springframework.core.io.Resource[] |
getDocumentResources(String documentPathPattern)
Gets resources that match a given location pattern.
|
String |
getPath()
Returns the resource path where the store begins.
|
protected abstract org.springframework.core.io.support.PathMatchingResourcePatternResolver |
getResourceResolver()
Returns the resource resolver to be used in resolving resource references by this
resources tore.
|
protected String |
getRoot() |
org.springframework.core.io.Resource |
getRootResource()
Returns the servlet context resource that is the root of the store
|
String[] |
getScriptDocumentPaths(org.springframework.extensions.webscripts.WebScript script) |
org.springframework.extensions.webscripts.ScriptLoader |
getScriptLoader() |
freemarker.cache.TemplateLoader |
getTemplateLoader() |
boolean |
hasDocument(String documentPath) |
void |
init() |
protected boolean |
isForbidden(String documentPath)
Determines whether the given document is a forbidden path (i.e.
|
boolean |
isSecure() |
long |
lastModified(String documentPath) |
protected abstract List<String> |
matchDocumentPaths(String documentPathPattern)
Returns a list of document paths for a given document pattern
|
boolean |
removeDocument(String documentPath) |
void |
setPath(String root)
Sets the path to the root resource on top of which this store will mount.
|
protected String |
toDocumentPath(String resourcePath)
Converts from a resource path back to a document path.
|
protected String |
toResourcePath(String documentPath)
Converts from a document path to a full resource path that incorporates
the root of the store.
|
void |
updateDocument(String documentPath,
String content) |
protected org.springframework.core.io.support.PathMatchingResourcePatternResolver resolver
protected abstract org.springframework.core.io.support.PathMatchingResourcePatternResolver getResourceResolver()
protected abstract List<String> matchDocumentPaths(String documentPathPattern) throws IOException
documentPathPattern - StringIOExceptionprotected boolean isForbidden(String documentPath)
documentPath - Stringpublic void init()
public void setPath(String root)
root - Stringpublic String getPath()
protected String getRoot()
public org.springframework.core.io.Resource getRootResource()
protected String toResourcePath(String documentPath)
documentPath - Stringprotected String toDocumentPath(String resourcePath)
resourcePath - Stringpublic boolean isSecure()
public boolean exists()
public boolean hasDocument(String documentPath)
public long lastModified(String documentPath) throws IOException
IOExceptionpublic void updateDocument(String documentPath, String content) throws IOException
IOExceptionpublic boolean removeDocument(String documentPath) throws IOException
IOExceptionpublic void createDocument(String documentPath, String content) throws IOException
IOExceptionpublic InputStream getDocument(String documentPath) throws IOException
IOExceptionpublic String[] getAllDocumentPaths()
public String[] getDocumentPaths(String path, boolean includeSubPaths, String documentPattern) throws IOException
IOExceptionpublic String[] getDescriptionDocumentPaths() throws IOException
IOExceptionpublic String[] getScriptDocumentPaths(org.springframework.extensions.webscripts.WebScript script) throws IOException
IOExceptionpublic org.springframework.extensions.webscripts.ScriptLoader getScriptLoader()
public freemarker.cache.TemplateLoader getTemplateLoader()
public String getBasePath()
protected org.springframework.core.io.Resource[] getDocumentResources(String documentPathPattern) throws IOException
documentPathPattern - StringIOExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.