|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.AbstractStore org.springframework.extensions.webscripts.RemoteStore
public class RemoteStore
Store implementation that queries and retrieves documents from a remote HTTP endpoint.
The endpoint is assumed to support a WebScript Remote Store implementation (such as AVMRemoteStore) that mirrors the required Store API.
Nested Class Summary | |
---|---|
protected class |
RemoteStore.RemoteStoreScriptLoader
Remote Store implementation of a Script Loader |
Field Summary | |
---|---|
static String |
DEFAULT_API
|
static String |
DEFAULT_ENDPOINT_ID
|
Constructor Summary | |
---|---|
RemoteStore()
|
Method Summary | |
---|---|
void |
createDocument(String documentPath,
String content)
Creates a document. |
boolean |
exists()
Determines whether the store actually exists |
String[] |
getAllDocumentPaths()
Gets the paths of all documents in this store |
String |
getApi()
Gets the api. |
String |
getBasePath()
Gets the base path of the store |
ConnectorProvider |
getConnectorProvider()
|
ConnectorService |
getConnectorService()
Gets the connector service. |
String[] |
getDescriptionDocumentPaths()
Gets the paths of all Web Script description documents in this store |
InputStream |
getDocument(String documentPath)
Gets a document |
String[] |
getDocumentPaths(String path,
boolean includeSubPaths,
String documentPattern)
Gets the paths of given document pattern within given path/sub-paths in this store |
String |
getEndpoint()
Gets the endpoint. |
String[] |
getScriptDocumentPaths(WebScript script)
Gets the paths of all implementation files for a given Web Script |
ScriptLoader |
getScriptLoader()
Gets the script loader for this store |
String |
getStoreId()
Gets the store id. |
String |
getStorePath()
Store path calculation If we have a store context, then we can check to see if a base path should be inserted ahead of the path that we believe we're directing to. |
freemarker.cache.TemplateLoader |
getTemplateLoader()
Gets the template loader for this store |
String |
getWebappId()
Gets the store's web application id binding This is meaningful for WCM Web Project stores. |
String |
getWebappPathPrefix()
|
boolean |
hasDocument(String documentPath)
Determines if the document exists. |
void |
init()
Initialise Store (called once) |
boolean |
isSecure()
Returns true if this store is considered secure - i.e. |
long |
lastModified(String documentPath)
Gets the last modified timestamp for the document. |
boolean |
removeDocument(String documentPath)
Removes an existing document. |
void |
setApi(String api)
|
void |
setConnectorProvider(ConnectorProvider connectorProvider)
Sets the connector provider |
void |
setConnectorService(ConnectorService service)
|
void |
setEndpoint(String endpoint)
|
void |
setPath(String path)
Sets the base path to send to the remote store |
void |
setStoreId(String storeId)
Allows for specification of default or fallback store id to use when binding to a remote store. |
void |
setWebappId(String webappId)
Sets the store's web application id to bind to within the designated store This is meaningful for WCM Web Project stores. |
void |
setWebappPathPrefix(String webappPathPrefix)
|
void |
updateDocument(String documentPath,
String content)
Updates an existing document. |
Methods inherited from class org.springframework.extensions.webscripts.AbstractStore |
---|
getDocumentPaths, getPreviewContext, setPreviewContextProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_API
public static final String DEFAULT_ENDPOINT_ID
Constructor Detail |
---|
public RemoteStore()
Method Detail |
---|
public void setConnectorService(ConnectorService service)
service
- The ConnectorService beanpublic ConnectorService getConnectorService()
public void setConnectorProvider(ConnectorProvider connectorProvider)
public ConnectorProvider getConnectorProvider()
public void setApi(String api)
api
- the WebScript API path to set for the remote store i.e. "/remotestore"public String getApi()
public void setPath(String path)
path
- public void setEndpoint(String endpoint)
endpoint
- the endpoint ID to use when calling the remote APIpublic String getEndpoint()
public void setWebappId(String webappId)
webappId
- public String getWebappPathPrefix()
public void setWebappPathPrefix(String webappPathPrefix)
public String getWebappId()
public void setStoreId(String storeId)
storeId
- the default store idpublic String getStoreId()
public String getStorePath()
public void init()
Store
public boolean isSecure()
Store
public boolean exists()
Store
public boolean hasDocument(String documentPath) throws IOException
Store
documentPath
- document path
IOException
- Signals that an I/O exception has occurred.public long lastModified(String documentPath) throws IOException
Store
documentPath
- document path to an existing document
IOException
- if the document does not exist in the storepublic void updateDocument(String documentPath, String content) throws IOException
Store
documentPath
- document pathcontent
- content to update the document with
IOException
- if the document does not exist or the update failspublic boolean removeDocument(String documentPath) throws IOException
Store
documentPath
- document path
IOException
- if the document does not exist or the remove failspublic void createDocument(String documentPath, String content) throws IOException
Store
documentPath
- document pathcontent
- content of the document to write
IOException
- if the document already exists or the create failspublic InputStream getDocument(String documentPath) throws IOException
Store
documentPath
- document path
IOException
- if the document does not exist in the storepublic String[] getAllDocumentPaths()
Store
public String[] getDocumentPaths(String path, boolean includeSubPaths, String documentPattern)
Store
path
- start pathincludeSubPaths
- if true, include sub-pathsdocumentPattern
- document name, allows wildcards, eg. *.ftl or my*.ftl
public String[] getDescriptionDocumentPaths()
Store
public String[] getScriptDocumentPaths(WebScript script)
Store
script
- web script
public ScriptLoader getScriptLoader()
Store
public freemarker.cache.TemplateLoader getTemplateLoader()
Store
public String getBasePath()
Store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |