public class VtiPathHelper
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
| Modifier and Type | Field and Description |
|---|---|
static String |
ALTERNATE_PATH_DOCUMENT_IDENTIFICATOR |
static String |
ALTERNATE_PATH_SITE_IDENTIFICATOR |
| Constructor and Description |
|---|
VtiPathHelper() |
| Modifier and Type | Method and Description |
|---|---|
String[] |
decomposeDocumentURL(String alfrescoContext,
String uri,
org.alfresco.service.namespace.QName spaceType)
Breaks down the Document Context + URI into the
document path and name.
|
protected String[] |
doDecomposeURLWork(String alfrescoContext,
String uri,
org.alfresco.service.namespace.QName spaceType) |
org.alfresco.service.cmr.repository.NodeRef |
findList(org.alfresco.service.cmr.repository.NodeRef itemInList)
For a given node, looks up the parent tree to find the List
(Site Container) that it is part of.
|
String |
getAlfrescoContext()
Get alfresco context
|
String |
getContextFromDocumentName(String document)
Get context form document name
|
String |
getDwsFromDocumentName(String document,
org.alfresco.service.namespace.QName spaceType)
Get Document Workspace site from document name
|
org.alfresco.service.cmr.model.FileFolderService |
getFileFolderService() |
String |
getHostFromDocumentName(String document)
Get host from document name
|
String |
getPathForURL(String urlPath)
Translates an incoming path (as used in a URL) to a repository path, taking into account
any translations that may be necessary.
|
String |
getPathFromDocumentName(String document)
Get path from document name
|
org.alfresco.service.cmr.repository.NodeRef |
getRootNodeRef() |
String |
getRootPath() |
String |
getStorePath() |
String |
getUserHomeLocation()
Get home space for current user
|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
static String |
removeSlashes(String value)
Remove slashes from string
|
String |
resolveListName(String listId)
Helper method that allows to resolve list name from listId
|
org.alfresco.service.cmr.model.FileInfo |
resolvePathFileInfo(org.alfresco.service.cmr.model.FileInfo parentFileInfo,
String childName)
Resolves file info for file with URL path in parent directory with file info
|
org.alfresco.service.cmr.model.FileInfo |
resolvePathFileInfo(String initialURL)
Resolve file info for file with URL path
|
void |
setAuthenticationComponent(org.alfresco.repo.security.authentication.AuthenticationComponent authenticationComponent)
Set authentication component
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
Set file-folder service
|
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Set namespace service
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set node service
|
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Set permission service
|
void |
setPersonService(org.alfresco.service.cmr.security.PersonService personService) |
void |
setRootPath(String rootPath)
Set root path
|
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Set search service
|
void |
setSingletonCache(org.alfresco.repo.cache.SimpleCache<String,org.alfresco.service.cmr.repository.NodeRef> singletonCache) |
void |
setStorePath(String storePath)
Set store path
|
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
void |
setUrlPathPrefix(String urlPathPrefix) |
static org.alfresco.util.Pair<String,String> |
splitPathParentChild(String path)
Split URL path to document name and path to parent folder of that document
|
String |
stripPathPrefix(String prefix,
String path)
Removes a prefix from a given path.
|
String |
toUrlPath(org.alfresco.service.cmr.model.FileInfo fileInfo)
Format FrontPageExtension URL path from file information
|
public static final String ALTERNATE_PATH_DOCUMENT_IDENTIFICATOR
public static final String ALTERNATE_PATH_SITE_IDENTIFICATOR
public void setAuthenticationComponent(org.alfresco.repo.security.authentication.AuthenticationComponent authenticationComponent)
authenticationComponent - the authentication component to set (AuthenticationComponent)public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - the node service to set (NodeService)public void setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
fileFolderService - the file-folder service to set (FileFolderService)public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
permissionService - the permission service to set (PermissionService)public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService - the search service to set (SearchService)public void setRootPath(String rootPath)
rootPath - the root path to setpublic void setStorePath(String storePath)
storePath - the store path to setpublic void setUrlPathPrefix(String urlPathPrefix)
urlPathPrefix - the urlPathPrefix to setpublic String getAlfrescoContext()
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
namespaceService - the namespace service to set (NamespaceService)public org.alfresco.service.cmr.model.FileInfo resolvePathFileInfo(String initialURL)
initialURL - URL pathpublic org.alfresco.service.cmr.model.FileInfo resolvePathFileInfo(org.alfresco.service.cmr.model.FileInfo parentFileInfo,
String childName)
parentFileInfo - file info for parent directory (FileInfo)childName - url path relative to parent directorypublic static org.alfresco.util.Pair<String,String> splitPathParentChild(String path)
path - URL pathpublic String toUrlPath(org.alfresco.service.cmr.model.FileInfo fileInfo)
fileInfo - file information (FileInfo)public String getUserHomeLocation()
public String[] decomposeDocumentURL(String alfrescoContext, String uri, org.alfresco.service.namespace.QName spaceType)
alfrescoContext - The alfresco contexturi - The document URIspaceType - The type of the spaceprotected String[] doDecomposeURLWork(String alfrescoContext, String uri, org.alfresco.service.namespace.QName spaceType)
public String getPathForURL(String urlPath)
/alfresco/mysite/documentLibrary/folder1/file1.txtwill be translated to:
/mysite/documentLibrary/folder1/file1.txt(assuming that the context-path/servletpath is /alfresco)
urlPath - public String stripPathPrefix(String prefix, String path)
prefix - path - public String getDwsFromDocumentName(String document, org.alfresco.service.namespace.QName spaceType)
document - documentspaceType - type of spacepublic String getHostFromDocumentName(String document)
document - documentpublic String getContextFromDocumentName(String document)
document - documentpublic String getPathFromDocumentName(String document)
document - documentpublic String resolveListName(String listId)
listId - the id of the listpublic org.alfresco.service.cmr.repository.NodeRef findList(org.alfresco.service.cmr.repository.NodeRef itemInList)
itemInList - the nodeRef of item to look parent container forprotected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBeanAbstractLifecycleBean.onBootstrap(org.springframework.context.ApplicationEvent)public static String removeSlashes(String value)
value - input stringprotected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBeanAbstractLifecycleBean.onShutdown(org.springframework.context.ApplicationEvent)public org.alfresco.service.cmr.repository.NodeRef getRootNodeRef()
public String getRootPath()
public String getStorePath()
public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
public org.alfresco.service.cmr.model.FileFolderService getFileFolderService()
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setSingletonCache(org.alfresco.repo.cache.SimpleCache<String,org.alfresco.service.cmr.repository.NodeRef> singletonCache)
Copyright © 2005–2014 Alfresco Software. All rights reserved.