mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Template extension spring configuration support
- similar pattern to existing script bean extension support - new root model helper objects and custom methods can be added via spring configuration Cleanup of script extension spring support Fix to thread safety of configured script extension beans that use the Scopable interface git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5369 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,21 +30,17 @@ import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ActionDefinition;
|
||||
import org.alfresco.service.cmr.action.ActionService;
|
||||
import org.mozilla.javascript.Scriptable;
|
||||
|
||||
/**
|
||||
* Scripted Action service for describing and executing actions against Nodes.
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public final class Actions extends BaseScriptImplementation implements Scopeable
|
||||
public final class Actions extends BaseScopableScriptImplementation
|
||||
{
|
||||
/** Repository Service Registry */
|
||||
private ServiceRegistry services;
|
||||
|
||||
/** Root scope for this object */
|
||||
private Scriptable scope;
|
||||
|
||||
/**
|
||||
* Set the service registry
|
||||
*
|
||||
@@ -54,14 +50,6 @@ public final class Actions extends BaseScriptImplementation implements Scopeable
|
||||
{
|
||||
this.services = serviceRegistry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.jscript.Scopeable#setScope(org.mozilla.javascript.Scriptable)
|
||||
*/
|
||||
public void setScope(Scriptable scope)
|
||||
{
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list of registered action names
|
||||
@@ -102,7 +90,7 @@ public final class Actions extends BaseScriptImplementation implements Scopeable
|
||||
{
|
||||
Action action = actionService.createAction(actionName);
|
||||
scriptAction = new ScriptAction(this.services, action, actionDef);
|
||||
scriptAction.setScope(scope);
|
||||
scriptAction.setScope(getScope());
|
||||
}
|
||||
return scriptAction;
|
||||
}
|
||||
|
Reference in New Issue
Block a user