Refactor of template and script services to allow easy addition of further template and script processors.

Hightlights of check-in include:
- Introduction of script processor 
- Neutralisation of script and template models
- The notion of a processor extension introduced
- Extensions applied to processor implementation rather than the services
- Auto selection of processor based on file extension of template or script

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5519 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2007-04-20 17:13:34 +00:00
parent 9f0e52e205
commit c8cf88179a
7 changed files with 14 additions and 28 deletions

View File

@@ -27,7 +27,6 @@ package org.alfresco.web.app.servlet.command;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.jscript.RhinoScriptService;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -89,8 +88,7 @@ public final class ExecuteScriptCommand implements Command
}
// build the model needed to execute the script
Map<String, Object> model = RhinoScriptService.buildDefaultModel(
serviceRegistry,
Map<String, Object> model = serviceRegistry.getScriptService().buildDefaultModel(
personRef,
new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId()),
(NodeRef)nodeService.getProperty(personRef, ContentModel.PROP_HOMEFOLDER),