package org.alfresco.repo.security.person; import java.util.List; import org.alfresco.service.cmr.repository.NodeRef; /** * Interface for home folder providers. Instances work with the * {@link 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 * {@link ExistingPathBasedHomeFolderProvider2}), or all home folders are in the same root * folder (See {@link UsernameHomeFolderProvider}) or in a tree of sub folders to * avoids any single directory containing too many home directories which might cause * performance issues (See {@link RegexHomeFolderProvider}).
*
* If the HomeFolderProvider is changed, home folders may be
* moved by using the {@link HomeFolderProviderSynchronizer} which optionally runs on
* restart.
*
* @author Andy Hind, Alan Davis (support v1 and v2 HomeFolderProviders)
*/
public interface HomeFolderProvider2
{
/**
* Get the name of the provider (the bean name).
*/
String getName();
/**
* Get the URL String of the node store that will be used.
*/
String getStoreUrl();
/**
* Get the root path in the store under which all home folders will be located.
*/
String getRootPath();
/**
* 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 or {@code null}. 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.
* @param person NodeRef from which a property (normally the userName) is used as a
* hash key to create a nested directory structure.
* @return the path to be used.
*/
List