mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
121221 jvonka: FileFolder API - minor update for get/list node info (aspectNames & properties) - now hides all "sys" aspects & properties (not just "referenceable" & "localizable") - pre-work (eg. before implementing "move") - in the future, we could add advanced query option to also return these RA-634, RA-638 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126402 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -197,10 +197,13 @@ public class NodesImpl implements Nodes
|
|||||||
this.defaultIgnoreTypes = ignoreTypes;
|
this.defaultIgnoreTypes = ignoreTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<QName> EXCLUDED_ASPECTS = Arrays.asList(
|
// excluded namespaces (aspects and properties)
|
||||||
ContentModel.ASPECT_REFERENCEABLE,
|
private static final List<String> EXCLUDED_NS = Arrays.asList(NamespaceService.SYSTEM_MODEL_1_0_URI);
|
||||||
ContentModel.ASPECT_LOCALIZED);
|
|
||||||
|
|
||||||
|
// excluded aspects
|
||||||
|
private static final List<QName> EXCLUDED_ASPECTS = Arrays.asList();
|
||||||
|
|
||||||
|
// excluded properties
|
||||||
private static final List<QName> EXCLUDED_PROPS = Arrays.asList(
|
private static final List<QName> EXCLUDED_PROPS = Arrays.asList(
|
||||||
// top-level minimal info
|
// top-level minimal info
|
||||||
ContentModel.PROP_NAME,
|
ContentModel.PROP_NAME,
|
||||||
@@ -209,13 +212,6 @@ public class NodesImpl implements Nodes
|
|||||||
ContentModel.PROP_CREATOR,
|
ContentModel.PROP_CREATOR,
|
||||||
ContentModel.PROP_CREATED,
|
ContentModel.PROP_CREATED,
|
||||||
ContentModel.PROP_CONTENT,
|
ContentModel.PROP_CONTENT,
|
||||||
// sys:localized
|
|
||||||
ContentModel.PROP_LOCALE,
|
|
||||||
// sys:referenceable
|
|
||||||
ContentModel.PROP_NODE_UUID,
|
|
||||||
ContentModel.PROP_STORE_IDENTIFIER,
|
|
||||||
ContentModel.PROP_STORE_PROTOCOL,
|
|
||||||
ContentModel.PROP_NODE_DBID,
|
|
||||||
// other - TBC
|
// other - TBC
|
||||||
ContentModel.PROP_INITIAL_VERSION,
|
ContentModel.PROP_INITIAL_VERSION,
|
||||||
ContentModel.PROP_AUTO_VERSION_PROPS,
|
ContentModel.PROP_AUTO_VERSION_PROPS,
|
||||||
@@ -470,7 +466,7 @@ public class NodesImpl implements Nodes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private NodeRef getParentNodeRef(final NodeRef nodeRef)
|
private NodeRef getParentNodeRef(NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
if (repositoryHelper.getCompanyHome().equals(nodeRef))
|
if (repositoryHelper.getCompanyHome().equals(nodeRef))
|
||||||
{
|
{
|
||||||
@@ -781,11 +777,11 @@ public class NodesImpl implements Nodes
|
|||||||
{
|
{
|
||||||
// return all properties
|
// return all properties
|
||||||
selectedProperties = new ArrayList<>(nodeProps.size());
|
selectedProperties = new ArrayList<>(nodeProps.size());
|
||||||
for (QName name : nodeProps.keySet())
|
for (QName propQName : nodeProps.keySet())
|
||||||
{
|
{
|
||||||
if (!EXCLUDED_PROPS.contains(name))
|
if ((! EXCLUDED_NS.contains(propQName.getNamespaceURI())) && (! EXCLUDED_PROPS.contains(propQName)))
|
||||||
{
|
{
|
||||||
selectedProperties.add(name);
|
selectedProperties.add(propQName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -825,11 +821,11 @@ public class NodesImpl implements Nodes
|
|||||||
{
|
{
|
||||||
List<String> aspectNames = new ArrayList<>(nodeAspects.size());
|
List<String> aspectNames = new ArrayList<>(nodeAspects.size());
|
||||||
|
|
||||||
for (QName aspectName : nodeAspects)
|
for (QName aspectQName : nodeAspects)
|
||||||
{
|
{
|
||||||
if (! EXCLUDED_ASPECTS.contains(aspectName))
|
if ((! EXCLUDED_NS.contains(aspectQName.getNamespaceURI())) && (! EXCLUDED_ASPECTS.contains(aspectQName)))
|
||||||
{
|
{
|
||||||
aspectNames.add(aspectName.toPrefixString(namespaceService));
|
aspectNames.add(aspectQName.toPrefixString(namespaceService));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1094,7 +1090,7 @@ public class NodesImpl implements Nodes
|
|||||||
|
|
||||||
for (QName aspectQName : aspectQNames)
|
for (QName aspectQName : aspectQNames)
|
||||||
{
|
{
|
||||||
if (EXCLUDED_ASPECTS.contains(aspectQName) || aspectQName.equals(ContentModel.ASPECT_AUDITABLE))
|
if (EXCLUDED_NS.contains(aspectQName.getNamespaceURI()) || EXCLUDED_ASPECTS.contains(aspectQName) || aspectQName.equals(ContentModel.ASPECT_AUDITABLE))
|
||||||
{
|
{
|
||||||
continue; // ignore
|
continue; // ignore
|
||||||
}
|
}
|
||||||
@@ -1107,7 +1103,7 @@ public class NodesImpl implements Nodes
|
|||||||
|
|
||||||
for (QName existingAspect : existingAspects)
|
for (QName existingAspect : existingAspects)
|
||||||
{
|
{
|
||||||
if (EXCLUDED_ASPECTS.contains(existingAspect) || existingAspect.equals(ContentModel.ASPECT_AUDITABLE))
|
if (EXCLUDED_NS.contains(existingAspect.getNamespaceURI()) || EXCLUDED_ASPECTS.contains(existingAspect) || existingAspect.equals(ContentModel.ASPECT_AUDITABLE))
|
||||||
{
|
{
|
||||||
continue; // ignore
|
continue; // ignore
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user