mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-09 17:45:10 +00:00
Fix to script methods definitions taking a ScriptableObject parameter
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3562 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
8473e7fc4f
commit
4005f36bfb
@ -1185,7 +1185,7 @@ public class Node implements Serializable, Scopeable
|
||||
*
|
||||
* @return true if the aspect was added successfully, false if an error occured.
|
||||
*/
|
||||
public boolean addAspect(String type, ScriptableObject properties)
|
||||
public boolean addAspect(String type, Object props)
|
||||
{
|
||||
boolean success = false;
|
||||
|
||||
@ -1194,8 +1194,10 @@ public class Node implements Serializable, Scopeable
|
||||
try
|
||||
{
|
||||
Map<QName, Serializable> aspectProps = null;
|
||||
if (properties != null)
|
||||
if (props instanceof ScriptableObject)
|
||||
{
|
||||
ScriptableObject properties = (ScriptableObject)props;
|
||||
|
||||
// we need to get all the keys to the properties provided
|
||||
// and convert them to a Map of QName to Serializable objects
|
||||
Object[] propIds = properties.getIds();
|
||||
@ -1546,9 +1548,9 @@ public class Node implements Serializable, Scopeable
|
||||
*
|
||||
* @return output of the template execution
|
||||
*/
|
||||
public String processTemplate(Node template, ScriptableObject args)
|
||||
public String processTemplate(Node template, Object args)
|
||||
{
|
||||
return processTemplate(template.getContent(), null, args);
|
||||
return processTemplate(template.getContent(), null, (ScriptableObject)args);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1572,9 +1574,9 @@ public class Node implements Serializable, Scopeable
|
||||
*
|
||||
* @return output of the template execution
|
||||
*/
|
||||
public String processTemplate(String template, ScriptableObject args)
|
||||
public String processTemplate(String template, Object args)
|
||||
{
|
||||
return processTemplate(template, null, args);
|
||||
return processTemplate(template, null, (ScriptableObject)args);
|
||||
}
|
||||
|
||||
private String processTemplate(String template, NodeRef templateRef, ScriptableObject args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user