Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)

128649 jkaabimofrad: Merged JAMAL/MNT-16371 (5.1.2) to 5.1.N (5.1.2)
      128626 jkaabimofrad: MNT-16371: Turned off Inherit Permissions and explicitly added the Site Manager role for the Site to the surf-config folder when it is first created. Also, revoked ownership privileges for surf-config contents.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@128660 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-07-08 15:11:27 +00:00
parent 35bcbde97d
commit 76cbb2f8ff

View File

@@ -122,6 +122,38 @@ public class FileFolderUtil
public static FileInfo makeFolders(FileFolderService service, NodeService nodeService, NodeRef parentNodeRef,
List<PathElementDetails> pathElementDetails, QName folderTypeQName, BehaviourFilter behaviourFilter,
Set<QName> parentBehavioursToDisable)
{
return makeFolders(service, nodeService, parentNodeRef, pathElementDetails, folderTypeQName, behaviourFilter, parentBehavioursToDisable, null);
}
/**
* Checks for the presence of, and creates as necessary, the folder
* structure in the provided paths with the following options:
* <ul>
* <li>Option to disable parent behaviour(s) when creating sub-folder.</li>
* <li>Each folder has the option to have its own set of aspects</li>
*</ul>
*
* @param service the FileFolderService object
* @param nodeService the NodeService object
* @param parentNodeRef the node under which the path will be created
* @param pathElementDetails the list of folder hierarchy where each folder
* can have its own set of aspects - may not be empty
* @param folderTypeQName the types of nodes to create. This must be a valid
* subtype of {@link org.alfresco.model.ContentModel#TYPE_FOLDER
* they folder type}
* @param behaviourFilter the BehaviourFilter object
* @param parentBehavioursToDisable the set of behaviours that must be
* disabled
* @param allFoldersRefsInThePath (Optional) if an instance of a Set is provided,
* then it'd be populated with nodeRefs of all
* the folders that have been specified in the path
* elements details.({@code pathElementDetails}).
* @return Returns the {@code FileInfo} of the last folder in the path.
*/
public static FileInfo makeFolders(FileFolderService service, NodeService nodeService, NodeRef parentNodeRef,
List<PathElementDetails> pathElementDetails, QName folderTypeQName, BehaviourFilter behaviourFilter,
Set<QName> parentBehavioursToDisable, Set<NodeRef> allFoldersRefsInThePath)
{
validate(pathElementDetails, service, folderTypeQName);
@@ -178,6 +210,10 @@ public class FileFolderUtil
// it exists
currentParentRef = nodeRef;
}
if (allFoldersRefsInThePath != null)
{
allFoldersRefsInThePath.add(currentParentRef);
}
}
// done
// Used to call toFileInfo((currentParentRef, true);