Class AbstractHomeFolderProvider2
java.lang.Object
org.alfresco.repo.security.person.AbstractHomeFolderProvider2
- All Implemented Interfaces:
HomeFolderProvider2,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
BootstrapHomeFolderProvider,ExistingPathBasedHomeFolderProvider2,UsernameHomeFolderProvider
public abstract class AbstractHomeFolderProvider2
extends Object
implements HomeFolderProvider2, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean
Abstract class that implements
HomeFolderProvider2 which
works with the PortableHomeFolderManager (which performs most of
the work) to create home folders in custom locations.- Author:
- Alan Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRegister with the homeFolderManagewrprotected PortableHomeFolderManagerGet the home folder manager.getHomeFolderPath(NodeRef person) Returns a preferred path (a list of folder names) for the home folder relative to the root path.getName()Get the provider nameGets the PermissionsManager used on creating the home folderGets the PermissionsManager used on referencing the home foldergetOwner()Set the authority to use as the owner of all home folder nodes.Get the path of the root folderGet the URL String of the node store that will be used.Returns a node to copy (a template) for the home folder.voidsetBeanName(String name) The provider name is taken from the bean namevoidsetHomeFolderManager(PortableHomeFolderManager homeFolderManager) Set the home folder manager.voidsetOnCreatePermissionsManager(PermissionsManager onCreatePermissionsManager) Sets the PermissionsManager used on creating the home foldervoidsetOnReferencePermissionsManager(PermissionsManager onReferencePermissionsManager) Sets the PermissionsManager used on referencing the home foldervoidSet the authority to use as the owner of all home folder nodes.voidsetRootPath(String rootPath) Set the path of the root foldervoidsetStoreUrl(String storeUrl) Set the store URL.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.security.person.HomeFolderProvider2
getHomeFolder
-
Constructor Details
-
AbstractHomeFolderProvider2
public AbstractHomeFolderProvider2()
-
-
Method Details
-
afterPropertiesSet
Register with the homeFolderManagewr- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getHomeFolderManager
Get the home folder manager. -
setHomeFolderManager
Set the home folder manager.- Parameters:
homeFolderManager- PortableHomeFolderManager
-
getName
Get the provider name- Specified by:
getNamein interfaceHomeFolderProvider2
-
setBeanName
The provider name is taken from the bean name- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
getRootPath
Get the path of the root folder- Specified by:
getRootPathin interfaceHomeFolderProvider2
-
setRootPath
Set the path of the root folder -
getStoreUrl
Description copied from interface:HomeFolderProvider2Get the URL String of the node store that will be used.- Specified by:
getStoreUrlin interfaceHomeFolderProvider2
-
setStoreUrl
Set the store URL. -
setOnCreatePermissionsManager
Sets the PermissionsManager used on creating the home folder -
getOnCreatePermissionsManager
Description copied from interface:HomeFolderProvider2Gets the PermissionsManager used on creating the home folder- Specified by:
getOnCreatePermissionsManagerin interfaceHomeFolderProvider2
-
setOnReferencePermissionsManager
Sets the PermissionsManager used on referencing the home folder -
getOnReferencePermissionsManager
Description copied from interface:HomeFolderProvider2Gets the PermissionsManager used on referencing the home folder- Specified by:
getOnReferencePermissionsManagerin interfaceHomeFolderProvider2
-
setOwner
Set the authority to use as the owner of all home folder nodes. -
getOwner
Description copied from interface:HomeFolderProvider2Set the authority to use as the owner of all home folder nodes. IfnulltheContentModel.PROP_USERNAMEvalue of the person is used.- Specified by:
getOwnerin interfaceHomeFolderProvider2
-
getHomeFolderPath
Description copied from interface:HomeFolderProvider2Returns a preferred path (a list of folder names) for the home folder relative to the root path. If all users share the root, the returned value should be an empty List ornull. When all users have their own folder under the root there should be just one element in the List. Multiple elements should be returned when a nested folder structure is preferred.- Specified by:
getHomeFolderPathin interfaceHomeFolderProvider2- Parameters:
person- NodeRef from which a property (normally the userName) is used as a hash key to create a nested directory structure.- Returns:
- the path to be used.
-
getTemplateNodeRef
Description copied from interface:HomeFolderProvider2Returns a node to copy (a template) for the home folder. Only used by HomeFolderProviders that create home folders rather than just reference existing folders.- Specified by:
getTemplateNodeRefin interfaceHomeFolderProvider2- Returns:
- the node to copy or
nullif not required.
-