mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Script specific Node class renamed to ScriptNode.
SVN rename command used to ensure file history is kept. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5920 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
package org.alfresco.repo.workflow.jbpm;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.jscript.Node;
|
||||
import org.alfresco.repo.jscript.ScriptNode;
|
||||
import org.alfresco.repo.security.authority.AuthorityDAO;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowException;
|
||||
@@ -97,9 +97,9 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler
|
||||
{
|
||||
actor = (String)eval;
|
||||
}
|
||||
else if (eval instanceof Node)
|
||||
else if (eval instanceof ScriptNode)
|
||||
{
|
||||
actor = mapAuthorityToName((Node)eval, false);
|
||||
actor = mapAuthorityToName((ScriptNode)eval, false);
|
||||
}
|
||||
if (actor == null)
|
||||
{
|
||||
@@ -133,13 +133,13 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler
|
||||
throw new WorkflowException("pooledactors expression '" + pooledactorValStr + "' evaluates to null");
|
||||
}
|
||||
|
||||
if (eval instanceof Node[])
|
||||
if (eval instanceof ScriptNode[])
|
||||
{
|
||||
Node[] nodes = (Node[])eval;
|
||||
ScriptNode[] nodes = (ScriptNode[])eval;
|
||||
assignedPooledActors = new String[nodes.length];
|
||||
|
||||
int i = 0;
|
||||
for (Node node : (Node[])nodes)
|
||||
for (ScriptNode node : (ScriptNode[])nodes)
|
||||
{
|
||||
String actor = mapAuthorityToName(node, true);
|
||||
if (actor == null)
|
||||
@@ -149,9 +149,9 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler
|
||||
assignedPooledActors[i++] = actor;
|
||||
}
|
||||
}
|
||||
else if (eval instanceof Node)
|
||||
else if (eval instanceof ScriptNode)
|
||||
{
|
||||
Node node = (Node)eval;
|
||||
ScriptNode node = (ScriptNode)eval;
|
||||
String actor = mapAuthorityToName(node, true);
|
||||
if (actor == null)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler
|
||||
* @param authority
|
||||
* @return actor id
|
||||
*/
|
||||
private String mapAuthorityToName(Node authority, boolean allowGroup)
|
||||
private String mapAuthorityToName(ScriptNode authority, boolean allowGroup)
|
||||
{
|
||||
String name = null;
|
||||
QName type = authority.getType();
|
||||
|
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.jscript.Node;
|
||||
import org.alfresco.repo.jscript.ScriptNode;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -125,9 +125,9 @@ public class AlfrescoJavaScript extends JBPMSpringActionHandler
|
||||
|
||||
// execute
|
||||
Object result = executeScript(executionContext, services, expression, variableAccesses);
|
||||
if (result instanceof Node)
|
||||
if (result instanceof ScriptNode)
|
||||
{
|
||||
result = new JBPMNode(((Node)result).getNodeRef(), services);
|
||||
result = new JBPMNode(((ScriptNode)result).getNodeRef(), services);
|
||||
}
|
||||
|
||||
// map script return variable to process context
|
||||
|
@@ -105,11 +105,11 @@ public class ForEachFork extends JBPMSpringActionHandler
|
||||
}
|
||||
|
||||
// expression evaluates to Node array
|
||||
else if (eval instanceof org.alfresco.repo.jscript.Node[])
|
||||
else if (eval instanceof org.alfresco.repo.jscript.ScriptNode[])
|
||||
{
|
||||
org.alfresco.repo.jscript.Node[] nodes = (org.alfresco.repo.jscript.Node[])eval;
|
||||
org.alfresco.repo.jscript.ScriptNode[] nodes = (org.alfresco.repo.jscript.ScriptNode[])eval;
|
||||
forEachColl = new ArrayList(nodes.length);
|
||||
for (org.alfresco.repo.jscript.Node node : nodes)
|
||||
for (org.alfresco.repo.jscript.ScriptNode node : nodes)
|
||||
{
|
||||
forEachColl.add(new JBPMNode(node.getNodeRef(), services));
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ import org.mozilla.javascript.Scriptable;
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public class JBPMNode extends org.alfresco.repo.jscript.Node
|
||||
public class JBPMNode extends org.alfresco.repo.jscript.ScriptNode
|
||||
{
|
||||
private static final long serialVersionUID = -826970280203254365L;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class JBPMNode extends org.alfresco.repo.jscript.Node
|
||||
/**
|
||||
* Value converter for beanshell.
|
||||
*/
|
||||
private class JBPMNodeConverter extends org.alfresco.repo.jscript.Node.NodeValueConverter
|
||||
private class JBPMNodeConverter extends org.alfresco.repo.jscript.ScriptNode.NodeValueConverter
|
||||
{
|
||||
@Override
|
||||
public Serializable convertValueForRepo(Serializable value)
|
||||
|
Reference in New Issue
Block a user