mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
51 lines
1.4 KiB
Java
51 lines
1.4 KiB
Java
package org.alfresco.repo.security.person;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import org.alfresco.model.ContentModel;
|
|
import org.alfresco.service.cmr.repository.NodeRef;
|
|
import org.alfresco.util.FileNameValidator;
|
|
|
|
/**
|
|
* Creates home folders directly under the root path, based on the username of the user.
|
|
*
|
|
* @deprecated
|
|
* Depreciated since 4.0. {@link UsernameHomeFolderProvider} should now be used.
|
|
*
|
|
* @author Andy Hind
|
|
*/
|
|
public class UIDBasedHomeFolderProvider extends ExistingPathBasedHomeFolderProvider
|
|
{
|
|
private String templatePath;
|
|
|
|
private NodeRef templateNodeRef;
|
|
|
|
public void setTemplatePath(String templatePath)
|
|
{
|
|
this.templatePath = templatePath;
|
|
}
|
|
|
|
protected synchronized NodeRef getTemplateNodeRef()
|
|
{
|
|
if (templateNodeRef == null && templatePath != null)
|
|
{
|
|
templateNodeRef = resolvePath(templatePath);
|
|
}
|
|
return templateNodeRef;
|
|
}
|
|
|
|
public List<String> getHomeFolderPath(NodeRef person)
|
|
{
|
|
List<String> path = new ArrayList<String>(1);
|
|
path.add(FileNameValidator.getValidFileName(
|
|
getHomeFolderManager().getPersonProperty(person, ContentModel.PROP_USERNAME)));
|
|
return path;
|
|
}
|
|
|
|
protected HomeSpaceNodeRef getHomeFolder(NodeRef person)
|
|
{
|
|
return getHomeFolderManager().getHomeFolder(getV2Adaptor(), person, false);
|
|
}
|
|
}
|