org.alfresco.repo.security.person
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.


Method Summary
 HomeSpaceNodeRef getHomeFolder(org.alfresco.service.cmr.repository.NodeRef person)
          Callback from PortableHomeFolderManager to locate or create a home folder.
 java.util.List getHomeFolderPath(org.alfresco.service.cmr.repository.NodeRef person)
          Returns a preferred path (a list of folder names) for the home folder relative to the root path.
 java.lang.String getName()
          Get the name of the provider (the bean name).
 PermissionsManager getOnCreatePermissionsManager()
          Gets the PermissionsManager used on creating the home folder
 PermissionsManager getOnReferencePermissionsManager()
          Gets the PermissionsManager used on referencing the home folder
 java.lang.String getOwner()
          Set the authority to use as the owner of all home folder nodes.
 java.lang.String getRootPath()
          Get the root path in the store under which all home folders will be located.
 java.lang.String getStoreUrl()
          Get the URL String of the node store that will be used.
 org.alfresco.service.cmr.repository.NodeRef getTemplateNodeRef()
          Returns a node to copy (a template) for the home folder.
 

Method Detail

getName

java.lang.String getName()
Get the name of the provider (the bean name).


getStoreUrl

java.lang.String getStoreUrl()
Get the URL String of the node store that will be used.


getRootPath

java.lang.String getRootPath()
Get the root path in the store under which all home folders will be located.


getHomeFolderPath

java.util.List getHomeFolderPath(org.alfresco.service.cmr.repository.NodeRef person)
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 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.

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

org.alfresco.service.cmr.repository.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 null if not required.

getOwner

java.lang.String getOwner()
Set the authority to use as the owner of all home folder nodes. If null the ContentModel.PROP_USERNAME value 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

HomeSpaceNodeRef getHomeFolder(org.alfresco.service.cmr.repository.NodeRef person)
Callback from PortableHomeFolderManager to locate or create a home folder. Implementations normally call PortableHomeFolderManager.getHomeFolder.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.