public class PortableHomeFolderManager extends Object implements HomeFolderManager
Constructor and Description |
---|
PortableHomeFolderManager() |
Modifier and Type | Method and Description |
---|---|
void |
addProvider(HomeFolderProvider provider)
Register a home folder provider.
|
void |
addProvider(HomeFolderProvider2 provider)
Register a home folder provider.
|
HomeSpaceNodeRef |
getHomeFolder(HomeFolderProvider2 provider,
org.alfresco.service.cmr.repository.NodeRef person,
boolean referenceRootNode)
Helper method for
HomeFolderProvider2.getHomeFolder(NodeRef)
implementations to return a HomeSpaceNodeRef |
HomeFolderProvider |
getHomeFolderProvider1(String providerName)
Returns the version 1 HomeFolderProvider with the given name.
|
HomeFolderProvider2 |
getHomeFolderProvider2(String providerName)
Returns the version 2 HomeFolderProvider2 with the given name.
|
String |
getPersonProperty(org.alfresco.service.cmr.repository.NodeRef person,
org.alfresco.service.namespace.QName name)
Helper method for
HomeFolderProvider2.getHomeFolder(org.alfresco.service.cmr.repository.NodeRef) (so that it
does not need its own NodeService) that returns a person property value. |
void |
makeHomeFolder(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Create / move the home folder if required.
|
void |
modifyHomeFolderNameIfItExists(org.alfresco.service.cmr.repository.NodeRef root,
List<String> homeFolderPath)
Modifies (if required) the leaf folder name in the
homeFolderPath by
appending "-N" (where N is an integer starting with 1), so that a
new folder will be created. |
void |
setDefaultProvider(HomeFolderProvider2 defaultProvider)
Set the default home folder provider (user which none is specified or when one is not found)
|
void |
setFileFolderService(FileFolderService fileFolderService)
Set the FileFolderService
|
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Set the namespaceService
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set the node service.
|
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService) |
void |
setSingletonCache(org.alfresco.repo.cache.SimpleCache<String,org.alfresco.service.cmr.repository.NodeRef> singletonCache) |
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setFileFolderService(FileFolderService fileFolderService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService
- the searchService to setpublic void setSingletonCache(org.alfresco.repo.cache.SimpleCache<String,org.alfresco.service.cmr.repository.NodeRef> singletonCache)
public void addProvider(HomeFolderProvider provider)
provider
- HomeFolderProviderpublic void addProvider(HomeFolderProvider2 provider)
provider
- HomeFolderProvider2public HomeFolderProvider getHomeFolderProvider1(String providerName)
public HomeFolderProvider2 getHomeFolderProvider2(String providerName)
public void setDefaultProvider(HomeFolderProvider2 defaultProvider)
defaultProvider
- HomeFolderProvider2public void makeHomeFolder(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
HomeFolderManager
makeHomeFolder
in interface HomeFolderManager
childAssocRef
- the primary child association pointing to the person node.public String getPersonProperty(org.alfresco.service.cmr.repository.NodeRef person, org.alfresco.service.namespace.QName name)
HomeFolderProvider2.getHomeFolder(org.alfresco.service.cmr.repository.NodeRef)
(so that it
does not need its own NodeService) that returns a person property value.public HomeSpaceNodeRef getHomeFolder(HomeFolderProvider2 provider, org.alfresco.service.cmr.repository.NodeRef person, boolean referenceRootNode)
HomeFolderProvider2.getHomeFolder(NodeRef)
implementations to return a HomeSpaceNodeRef
referenceRootNode
- indicates that a reference to the root node
should be returned if the home folder property on the person
has not yet been set.public void modifyHomeFolderNameIfItExists(org.alfresco.service.cmr.repository.NodeRef root, List<String> homeFolderPath)
homeFolderPath
by
appending "-N"
(where N is an integer starting with 1), so that a
new folder will be created.root
- folder.homeFolderPath
- the full path. Only the final element is used.Copyright © 2005–2017 Alfresco Software. All rights reserved.