mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.1 to HEAD
14192: Support for variable assignment and replacement in upgrade scripts 14263 (RECORD ONLY) 14286: Merged V2.2 to V3.1 14124: Fixed ETWOTWO-961: FileFolderService.listFolders throws UnsupportedOperationException for AVM nodes 14277: Fixed ETWOTWO-1228: CLONE -NodeService properties don't support collections of collections for d:any 14302: Merged DEV/V3.1_UPGRADE_SCRIPTS_2 to V3.1: DB2 scripts and other minor changes 14126 (RECORD ONLY) 14193 (RECORD ONLY) 14205: Next version of DB upgrade scripts for SQLServer and DB2 14208: Enterprise DB scripts review: Move scripts to correct locations as a first pass 14211: Carried V2.1-A script change into branch; use STR() function for numeric to string comparison 14212: Moved script from old SQLServer dialect directory 14213: Minor script formatting 14303: Merged DEV/V3.1_UPGRADE_SCRIPTS_2 to V3.1: DB2 scripts and other formatting 14214: Removed redundant scripts; these are all covered by generic scripts 14236: Format SQL 14248: Formatting of SQL to produce meaningful diffs 14266: Next version of upgrade scripts 14281: Clean up formatting of SQL scripts using Convert utility ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/DEV/V3.1_UPGRADE_SCRIPTS_2:r14126,14193,14205,14208,14211-14213 Merged /alfresco/BRANCHES/V2.2:r14124,14130,14277 Merged /alfresco/BRANCHES/V3.1:r14192,14263,14286,14302-14303 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14652 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1614,7 +1614,61 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
||||
|
||||
public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, Set<QName> childNodeTypes)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
/*
|
||||
* ETWOTWO-961 forced an implementation, but this is just a workaround.
|
||||
* We do a listing and then keep files or folders looking specifically
|
||||
* for cm:folder and cm:content types from childNodeTypes.
|
||||
*/
|
||||
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
int version = avmVersionPath.getFirst();
|
||||
String path = avmVersionPath.getSecond();
|
||||
List<ChildAssociationRef> result = new ArrayList<ChildAssociationRef>();
|
||||
SortedMap<String, AVMNodeDescriptor> children = null;
|
||||
try
|
||||
{
|
||||
children =
|
||||
fAVMService.getDirectoryListing(version,
|
||||
path);
|
||||
}
|
||||
catch (AVMNotFoundException e)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
for (Map.Entry<String, AVMNodeDescriptor> entry : children.entrySet())
|
||||
{
|
||||
String name = entry.getKey();
|
||||
AVMNodeDescriptor descriptor = entry.getValue();
|
||||
if (descriptor.isFile())
|
||||
{
|
||||
if (!childNodeTypes.contains(ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (descriptor.isDirectory())
|
||||
{
|
||||
if (!childNodeTypes.contains(ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not a file or directory???
|
||||
continue;
|
||||
}
|
||||
result.add(new ChildAssociationRef(ContentModel.ASSOC_CONTAINS,
|
||||
nodeRef,
|
||||
QName.createQName(
|
||||
NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
name),
|
||||
AVMNodeConverter.ToNodeRef(
|
||||
version,
|
||||
AVMNodeConverter.ExtendAVMPath(path, name)),
|
||||
true,
|
||||
-1));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<ChildAssociationRef> getChildrenByName(NodeRef nodeRef, QName assocTypeQName, Collection<String> childNames)
|
||||
|
Reference in New Issue
Block a user