org.alfresco.repo.web.scripts.bean
Class AVMRemoteStore

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractWebScript
      extended by org.alfresco.repo.web.scripts.bean.BaseRemoteStore
          extended by org.alfresco.repo.web.scripts.bean.AVMRemoteStore
All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript

public class AVMRemoteStore
extends BaseRemoteStore

AVM Remote Store service.

See Also:
for the available API methods.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
 
Field Summary
 
Fields inherited from class org.alfresco.repo.web.scripts.bean.BaseRemoteStore
defaultStore, mimetypeService, REQUEST_PARAM_STORE, REQUEST_PARAM_WEBAPP, TOKEN_STORE, TOKEN_WEBAPP
 
Constructor Summary
AVMRemoteStore()
           
 
Method Summary
protected  void createDocument(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path, java.io.InputStream content)
          Creates a document.
protected  void createDocuments(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.io.InputStream in)
          Creates multiple XML documents encapsulated in a single one.
protected  void deleteDocument(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path)
          Deletes an existing document.
protected  void getDocument(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path)
          Gets a document.
protected  void hasDocument(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path)
          Determines if the document exists.
protected  void lastModified(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path)
          Gets the last modified timestamp for the document.
protected  void listDocuments(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path, boolean recurse)
          Lists the document paths under a given path.
protected  void listDocuments(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path, java.lang.String pattern)
          Lists the document paths matching a file pattern under a given path.
 void setAvmService(org.alfresco.service.cmr.avm.AVMService avmService)
           
 void setRootPath(java.lang.String rootPath)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
protected  void updateDocument(org.springframework.extensions.webscripts.WebScriptResponse res, java.lang.String store, java.lang.String path, java.io.InputStream content)
          Updates an existing document.
 
Methods inherited from class org.alfresco.repo.web.scripts.bean.BaseRemoteStore
encodePath, execute, getPathParts, setMimetypeService, setStore
 
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVMRemoteStore

public AVMRemoteStore()
Method Detail

setRootPath

public void setRootPath(java.lang.String rootPath)
Parameters:
rootPath - the root path under which to process store requests

setAvmService

public void setAvmService(org.alfresco.service.cmr.avm.AVMService avmService)
Parameters:
avmService - the AVMService to set

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Parameters:
searchService - the SearchService to set

lastModified

protected void lastModified(org.springframework.extensions.webscripts.WebScriptResponse res,
                            java.lang.String store,
                            java.lang.String path)
                     throws java.io.IOException
Gets the last modified timestamp for the document.

Specified by:
lastModified in class BaseRemoteStore
Parameters:
store - the store id
path - document path to an existing document
Throws:
java.io.IOException

getDocument

protected void getDocument(org.springframework.extensions.webscripts.WebScriptResponse res,
                           java.lang.String store,
                           java.lang.String path)
                    throws java.io.IOException
Description copied from class: BaseRemoteStore
Gets a document. The output will be the document content stream.

Specified by:
getDocument in class BaseRemoteStore
store - the store id
path - document path
Throws:
java.io.IOException - if an error occurs retrieving the document

hasDocument

protected void hasDocument(org.springframework.extensions.webscripts.WebScriptResponse res,
                           java.lang.String store,
                           java.lang.String path)
                    throws java.io.IOException
Description copied from class: BaseRemoteStore
Determines if the document exists. The output will be either the string "true" or the string "false".

Specified by:
hasDocument in class BaseRemoteStore
store - the store id
path - document path
Throws:
java.io.IOException

createDocument

protected void createDocument(org.springframework.extensions.webscripts.WebScriptResponse res,
                              java.lang.String store,
                              java.lang.String path,
                              java.io.InputStream content)
Description copied from class: BaseRemoteStore
Creates a document.

Specified by:
createDocument in class BaseRemoteStore
store - the store id
path - document path
content - content of the document to write

createDocuments

protected void createDocuments(org.springframework.extensions.webscripts.WebScriptResponse res,
                               java.lang.String store,
                               java.io.InputStream in)
Description copied from class: BaseRemoteStore
Creates multiple XML documents encapsulated in a single one.

Specified by:
createDocuments in class BaseRemoteStore
store - the store id
in - content of the document to write

updateDocument

protected void updateDocument(org.springframework.extensions.webscripts.WebScriptResponse res,
                              java.lang.String store,
                              java.lang.String path,
                              java.io.InputStream content)
Description copied from class: BaseRemoteStore
Updates an existing document.

Specified by:
updateDocument in class BaseRemoteStore
store - the store id
path - document path
content - content to update the document with

deleteDocument

protected void deleteDocument(org.springframework.extensions.webscripts.WebScriptResponse res,
                              java.lang.String store,
                              java.lang.String path)
Description copied from class: BaseRemoteStore
Deletes an existing document.

Specified by:
deleteDocument in class BaseRemoteStore
store - the store id
path - document path

listDocuments

protected void listDocuments(org.springframework.extensions.webscripts.WebScriptResponse res,
                             java.lang.String store,
                             java.lang.String path,
                             boolean recurse)
                      throws java.io.IOException
Description copied from class: BaseRemoteStore
Lists the document paths under a given path. The output will be the list of relative document paths found under the path. Separated by newline characters.

Specified by:
listDocuments in class BaseRemoteStore
store - the store id
path - document path
recurse - true to peform a recursive list, false for direct children only.
Throws:
java.io.IOException - if an error occurs listing the documents

listDocuments

protected void listDocuments(org.springframework.extensions.webscripts.WebScriptResponse res,
                             java.lang.String store,
                             java.lang.String path,
                             java.lang.String pattern)
                      throws java.io.IOException
Description copied from class: BaseRemoteStore
Lists the document paths matching a file pattern under a given path. The output will be the list of relative document paths found under the path that match the given file pattern. Separated by newline characters.

Specified by:
listDocuments in class BaseRemoteStore
store - the store id
path - document path
pattern - file pattern to match - allows wildcards e.g. *.xml or site*.xml
Throws:
java.io.IOException - if an error occurs listing the documents


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.