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 ContentService
protected FileFolderService
protected boolean
protected org.alfresco.service.namespace.NamespaceService
protected NodeService
protected PermissionService
protected String
protected StoreRef
protected RetryingTransactionHelper
protected SearchService
protected TenantAdminService
Fields inherited from class org.springframework.extensions.webscripts.AbstractStore
DESC_PATH_PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createDocument
(String documentPath, String content) void
destroy()
static String
encodePathISO9075
(String path) Helper to encode the elements of a path to be used as a Lucene PATH statement using the ISO9075 encoding.boolean
exists()
protected NodeRef
findNodeRef
(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 String
Gets the display path for the specified nodeString[]
getScriptDocumentPaths
(org.springframework.extensions.webscripts.WebScript script) org.springframework.extensions.webscripts.ScriptLoader
freemarker.cache.TemplateLoader
boolean
hasDocument
(String documentPath) void
init()
boolean
isSecure()
long
lastModified
(String documentPath) void
void
boolean
removeDocument
(String documentPath) void
setContentService
(ContentService contentService) Sets the content servicevoid
setFileFolderService
(FileFolderService fileService) Sets the file servicevoid
setMustExist
(boolean mustExist) Sets whether the repo store must existvoid
setNamespaceService
(org.alfresco.service.namespace.NamespaceService namespaceService) Sets the namespace servicevoid
setNodeService
(NodeService nodeService) Sets the node servicevoid
Sets the repo pathvoid
setPermissionService
(PermissionService permissionService) Sets the permission servicevoid
setSearchService
(SearchService searchService) Sets the search servicevoid
Sets the repo storevoid
setTenantAdminService
(TenantAdminService tenantAdminService) Sets the tenant admin servicevoid
setTransactionHelper
(RetryingTransactionHelper retryingTransactionHelper) Sets helper that provides transaction callbackstoString()
void
updateDocument
(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:
init
in interfaceorg.springframework.extensions.webscripts.Store
- Specified by:
init
in interfaceTenantDeployer
-
destroy
public void destroy()- Specified by:
destroy
in interfaceTenantDeployer
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfaceorg.springframework.extensions.webscripts.Store
-
exists
public boolean exists()- Specified by:
exists
in interfaceorg.springframework.extensions.webscripts.Store
-
getBasePath
- Specified by:
getBasePath
in 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:
getScriptDocumentPaths
in interfaceorg.springframework.extensions.webscripts.Store
-
getDocumentPaths
- Specified by:
getDocumentPaths
in 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:
getDescriptionDocumentPaths
in interfaceorg.springframework.extensions.webscripts.Store
-
getAllDocumentPaths
- Specified by:
getAllDocumentPaths
in interfaceorg.springframework.extensions.webscripts.Store
-
lastModified
- Specified by:
lastModified
in interfaceorg.springframework.extensions.webscripts.Store
- Throws:
IOException
-
hasDocument
- Specified by:
hasDocument
in interfaceorg.springframework.extensions.webscripts.Store
-
getDocument
- Specified by:
getDocument
in interfaceorg.springframework.extensions.webscripts.Store
- Throws:
IOException
-
createDocument
- Specified by:
createDocument
in interfaceorg.springframework.extensions.webscripts.Store
- Throws:
IOException
-
updateDocument
- Specified by:
updateDocument
in interfaceorg.springframework.extensions.webscripts.Store
- Throws:
IOException
-
removeDocument
- Specified by:
removeDocument
in interfaceorg.springframework.extensions.webscripts.Store
- Throws:
IOException
-
getTemplateLoader
public freemarker.cache.TemplateLoader getTemplateLoader()- Specified by:
getTemplateLoader
in interfaceorg.springframework.extensions.webscripts.Store
-
getScriptLoader
public org.springframework.extensions.webscripts.ScriptLoader getScriptLoader()- Specified by:
getScriptLoader
in interfaceorg.springframework.extensions.webscripts.Store
-
onEnableTenant
public void onEnableTenant()- Specified by:
onEnableTenant
in interfaceTenantDeployer
-
onDisableTenant
public void onDisableTenant()- Specified by:
onDisableTenant
in interfaceTenantDeployer
-
toString
-