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 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

      List<String> getHomeFolderPath(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

      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

      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(NodeRef person)