Interface HomeFolderProvider2
- All Known Implementing Classes:
AbstractHomeFolderProvider.V2Adaptor,AbstractHomeFolderProvider2,BootstrapHomeFolderProvider,ExistingPathBasedHomeFolderProvider2,RegexHomeFolderProvider,UsernameHomeFolderProvider
public interface HomeFolderProvider2
Interface for home folder providers. Instances work with the
PortableHomeFolderManager (which performs most of the work) to allow it to create home folders in custom locations.
The home folder may be a simple structure where all users share a root folder (See ExistingPathBasedHomeFolderProvider2), or all home folders are in the same root folder (See UsernameHomeFolderProvider) or in a tree of sub folders to avoids any single directory containing too many home directories which might cause performance issues (See RegexHomeFolderProvider).
If the HomeFolderProvider is changed, home folders may be moved by using the HomeFolderProviderSynchronizer which optionally runs on restart.
- Author:
- Andy Hind, Alan Davis (support v1 and v2 HomeFolderProviders)
-
Method Summary
Modifier and TypeMethodDescriptiongetHomeFolder(NodeRef person) Callback fromPortableHomeFolderManagerto locate or create a home folder.getHomeFolderPath(NodeRef person) Returns a preferred path (a list of folder names) for the home folder relative to the root path.getName()Get the name of the provider (the bean name).Gets 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 root path in the store under which all home folders will be located.Get the URL String of the node store that will be used.Returns a node to copy (a template) for the home folder.
-
Method Details
-
getName
String getName()Get the name of the provider (the bean name). -
getStoreUrl
String getStoreUrl()Get the URL String of the node store that will be used. -
getRootPath
String getRootPath()Get the root path in the store under which all home folders will be located. -
getHomeFolderPath
Returns 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.- 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
NodeRef getTemplateNodeRef()Returns a node to copy (a template) for the home folder. Only used by HomeFolderProviders that create home folders rather than just reference existing folders.- Returns:
- the node to copy or
nullif not required.
-
getOwner
String getOwner()Set the authority to use as the owner of all home folder nodes. IfnulltheContentModel.PROP_USERNAMEvalue of the person is used. -
getOnCreatePermissionsManager
PermissionsManager getOnCreatePermissionsManager()Gets the PermissionsManager used on creating the home folder -
getOnReferencePermissionsManager
PermissionsManager getOnReferencePermissionsManager()Gets the PermissionsManager used on referencing the home folder -
getHomeFolder
Callback fromPortableHomeFolderManagerto locate or create a home folder. Implementations normally callPortableHomeFolderManager.getHomeFolder(org.alfresco.repo.security.person.HomeFolderProvider2, org.alfresco.service.cmr.repository.NodeRef, boolean).
-