mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-2462 - Duplicate data list item does not handle aspect properties
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19886 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -809,6 +809,16 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
|
|||||||
return this.properties;
|
return this.properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all the property names defined for this node's type as an array of short QNames.
|
||||||
|
*
|
||||||
|
* @return Array of property names for this node's type.
|
||||||
|
*/
|
||||||
|
public Scriptable getTypePropertyNames()
|
||||||
|
{
|
||||||
|
return getTypePropertyNames(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all the property names defined for this node's type as an array.
|
* Return all the property names defined for this node's type as an array.
|
||||||
*
|
*
|
||||||
@@ -827,6 +837,24 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
|
|||||||
return Context.getCurrentContext().newArray(this.scope, result);
|
return Context.getCurrentContext().newArray(this.scope, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all the property names defined for this node as an array.
|
||||||
|
*
|
||||||
|
* @param useShortQNames if true short-form qnames will be returned, else long-form.
|
||||||
|
* @return Array of property names for this node type and optionally parent properties.
|
||||||
|
*/
|
||||||
|
public Scriptable getPropertyNames(boolean useShortQNames)
|
||||||
|
{
|
||||||
|
Set<QName> props = this.nodeService.getProperties(this.nodeRef).keySet();
|
||||||
|
Object[] result = new Object[props.size()];
|
||||||
|
int count = 0;
|
||||||
|
for (QName qname : props)
|
||||||
|
{
|
||||||
|
result[count++] = useShortQNames ? getShortQName(qname).toString() : qname.toString();
|
||||||
|
}
|
||||||
|
return Context.getCurrentContext().newArray(this.scope, result);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if this Node is a container (i.e. a folder)
|
* @return true if this Node is a container (i.e. a folder)
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user