Package org.alfresco.repo.web.scripts
Class RepoStore
java.lang.Object
org.springframework.extensions.webscripts.AbstractStore
org.alfresco.repo.web.scripts.RepoStore
- All Implemented Interfaces:
TenantDeployer,org.springframework.extensions.webscripts.Store
public class RepoStore
extends org.springframework.extensions.webscripts.AbstractStore
implements TenantDeployer
Repository based Web Script Store
- Author:
- davidc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentServiceprotected FileFolderServiceprotected booleanprotected org.alfresco.service.namespace.NamespaceServiceprotected NodeServiceprotected PermissionServiceprotected Stringprotected StoreRefprotected RetryingTransactionHelperprotected SearchServiceprotected TenantAdminServiceFields inherited from class org.springframework.extensions.webscripts.AbstractStore
DESC_PATH_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDocument(String documentPath, String content) voiddestroy()static StringencodePathISO9075(String path) Helper to encode the elements of a path to be used as a Lucene PATH statement using the ISO9075 encoding.booleanexists()protected NodeReffindNodeRef(String documentPath) Gets the node ref for the specified path within this repo storeString[]String[]getDocument(String documentPath) String[]getDocumentPaths(String path, boolean includeSubPaths, String documentPattern) protected StringGets the display path for the specified nodeString[]getScriptDocumentPaths(org.springframework.extensions.webscripts.WebScript script) org.springframework.extensions.webscripts.ScriptLoaderfreemarker.cache.TemplateLoaderbooleanhasDocument(String documentPath) voidinit()booleanisSecure()longlastModified(String documentPath) voidvoidbooleanremoveDocument(String documentPath) voidsetContentService(ContentService contentService) Sets the content servicevoidsetFileFolderService(FileFolderService fileService) Sets the file servicevoidsetMustExist(boolean mustExist) Sets whether the repo store must existvoidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Sets the namespace servicevoidsetNodeService(NodeService nodeService) Sets the node servicevoidSets the repo pathvoidsetPermissionService(PermissionService permissionService) Sets the permission servicevoidsetSearchService(SearchService searchService) Sets the search servicevoidSets the repo storevoidsetTenantAdminService(TenantAdminService tenantAdminService) Sets the tenant admin servicevoidsetTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) Sets helper that provides transaction callbackstoString()voidupdateDocument(String documentPath, String content) Methods inherited from class org.springframework.extensions.webscripts.AbstractStore
createDocuments, getDocumentPaths, getPreviewContext, isReadOnly, setPreviewContextProvider, setReadOnly
-
Field Details
-
mustExist
protected boolean mustExist -
repoStore
-
repoPath
-
baseNodeRefs
-
retryingTransactionHelper
-
searchService
-
nodeService
-
contentService
-
fileService
-
namespaceService
protected org.alfresco.service.namespace.NamespaceService namespaceService -
permissionService
-
tenantAdminService
-
-
Constructor Details
-
RepoStore
public RepoStore()
-
-
Method Details
-
setTransactionHelper
Sets helper that provides transaction callbacks -
setSearchService
Sets the search service -
setNodeService
Sets the node service -
setContentService
Sets the content service -
setFileFolderService
Sets the file service -
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Sets the namespace service -
setPermissionService
Sets the permission service -
setTenantAdminService
Sets the tenant admin service -
setMustExist
public void setMustExist(boolean mustExist) Sets whether the repo store must exist- Parameters:
mustExist- boolean
-
setStore
Sets the repo store -
setPath
Sets the repo path- Parameters:
repoPath- repoPath
-
init
public void init()- Specified by:
initin interfaceorg.springframework.extensions.webscripts.Store- Specified by:
initin interfaceTenantDeployer
-
destroy
public void destroy()- Specified by:
destroyin interfaceTenantDeployer
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceorg.springframework.extensions.webscripts.Store
-
exists
public boolean exists()- Specified by:
existsin interfaceorg.springframework.extensions.webscripts.Store
-
getBasePath
- Specified by:
getBasePathin interfaceorg.springframework.extensions.webscripts.Store
-
getPath
Gets the display path for the specified node- Parameters:
nodeRef- NodeRef- Returns:
- display path
-
findNodeRef
Gets the node ref for the specified path within this repo store- Parameters:
documentPath- String- Returns:
- node ref
-
getScriptDocumentPaths
- Specified by:
getScriptDocumentPathsin interfaceorg.springframework.extensions.webscripts.Store
-
getDocumentPaths
- Specified by:
getDocumentPathsin interfaceorg.springframework.extensions.webscripts.Store
-
encodePathISO9075
Helper to encode the elements of a path to be used as a Lucene PATH statement using the ISO9075 encoding. Note that leading and trailing '/' elements will NOT be preserved.- Parameters:
path- Path to encode, elements separated by '/'- Returns:
- the encoded path, a minimum of the empty string will be returned
-
getDescriptionDocumentPaths
- Specified by:
getDescriptionDocumentPathsin interfaceorg.springframework.extensions.webscripts.Store
-
getAllDocumentPaths
- Specified by:
getAllDocumentPathsin interfaceorg.springframework.extensions.webscripts.Store
-
lastModified
- Specified by:
lastModifiedin interfaceorg.springframework.extensions.webscripts.Store- Throws:
IOException
-
hasDocument
- Specified by:
hasDocumentin interfaceorg.springframework.extensions.webscripts.Store
-
getDocument
- Specified by:
getDocumentin interfaceorg.springframework.extensions.webscripts.Store- Throws:
IOException
-
createDocument
- Specified by:
createDocumentin interfaceorg.springframework.extensions.webscripts.Store- Throws:
IOException
-
updateDocument
- Specified by:
updateDocumentin interfaceorg.springframework.extensions.webscripts.Store- Throws:
IOException
-
removeDocument
- Specified by:
removeDocumentin interfaceorg.springframework.extensions.webscripts.Store- Throws:
IOException
-
getTemplateLoader
public freemarker.cache.TemplateLoader getTemplateLoader()- Specified by:
getTemplateLoaderin interfaceorg.springframework.extensions.webscripts.Store
-
getScriptLoader
public org.springframework.extensions.webscripts.ScriptLoader getScriptLoader()- Specified by:
getScriptLoaderin interfaceorg.springframework.extensions.webscripts.Store
-
onEnableTenant
public void onEnableTenant()- Specified by:
onEnableTenantin interfaceTenantDeployer
-
onDisableTenant
public void onDisableTenant()- Specified by:
onDisableTenantin interfaceTenantDeployer
-
toString
-