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:
@@ -40,7 +40,6 @@ import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
import org.mozilla.javascript.Scriptable;
|
||||
|
||||
/**
|
||||
* Search component for use by the ScriptService.
|
||||
@@ -55,7 +54,7 @@ import org.mozilla.javascript.Scriptable;
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public final class Search extends BaseScriptImplementation implements Scopeable
|
||||
public final class Search extends BaseScopableScriptImplementation
|
||||
{
|
||||
/** Service registry */
|
||||
private ServiceRegistry services;
|
||||
@@ -63,9 +62,6 @@ public final class Search extends BaseScriptImplementation implements Scopeable
|
||||
/** Default store reference */
|
||||
private StoreRef storeRef;
|
||||
|
||||
/** Root scope for this object */
|
||||
private Scriptable scope;
|
||||
|
||||
/**
|
||||
* Set the default store reference
|
||||
*
|
||||
@@ -86,14 +82,6 @@ public final class Search extends BaseScriptImplementation implements Scopeable
|
||||
this.services = services;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.jscript.Scopeable#setScope(org.mozilla.javascript.Scriptable)
|
||||
*/
|
||||
public void setScope(Scriptable scope)
|
||||
{
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a single Node by the Node reference
|
||||
*
|
||||
@@ -251,7 +239,7 @@ public final class Search extends BaseScriptImplementation implements Scopeable
|
||||
for (ResultSetRow row: results)
|
||||
{
|
||||
NodeRef nodeRef = row.getNodeRef();
|
||||
set.add(new Node(nodeRef, services, this.scope));
|
||||
set.add(new Node(nodeRef, services, getScope()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user