mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/V3.4-BUG-FIX to HEAD:
32244: Fix for ALF-11435: 32246: Fix for ALF-11435 (part 2) 32247: Fix for ALF-11435 (part 3) plus make sure that hidden files have the noindex aspect applied git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32388 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -256,9 +256,16 @@ public class FileFolderServiceImpl implements FileFolderService
|
||||
// Is it a folder
|
||||
QName typeQName = nodeService.getType(nodeRef);
|
||||
boolean isFolder = isFolder(typeQName);
|
||||
boolean isHidden = false;
|
||||
|
||||
if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_HIDDEN))
|
||||
{
|
||||
isHidden = true;
|
||||
}
|
||||
|
||||
// Construct the file info and add to the results
|
||||
FileInfo fileInfo = new FileInfoImpl(nodeRef, typeQName, isFolder, properties);
|
||||
FileInfo fileInfo = new FileInfoImpl(nodeRef, typeQName, isFolder, isHidden, properties);
|
||||
|
||||
// Done
|
||||
return fileInfo;
|
||||
}
|
||||
@@ -569,7 +576,7 @@ public class FileFolderServiceImpl implements FileFolderService
|
||||
}
|
||||
return childNodeRef;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see #search(NodeRef, String, boolean, boolean, boolean)
|
||||
*/
|
||||
@@ -1434,4 +1441,19 @@ public class FileFolderServiceImpl implements FileFolderService
|
||||
}
|
||||
return new Pair<String, String>(base, ext);
|
||||
}
|
||||
|
||||
public List<FileInfo> removeHiddenFiles(List<FileInfo> files)
|
||||
{
|
||||
List<FileInfo> ret = new ArrayList<FileInfo>(files.size());
|
||||
|
||||
for(FileInfo file : files)
|
||||
{
|
||||
if(!nodeService.hasAspect(file.getNodeRef(), ContentModel.ASPECT_HIDDEN))
|
||||
{
|
||||
ret.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user