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:
Mike Hatfield
2010-04-17 01:10:23 +00:00
parent 5f481b53bf
commit 29d1e316a9

View File

@@ -809,6 +809,16 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
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.
*
@@ -827,6 +837,24 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
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)
*/