Merged DEV/TEMPORARY to HEAD

17804: Branch for SpringSurf integration 2 to RemoteAPI - from HEAD r17789
   17808: Part 3 of SpringSurf integration - RemoteAPI, Web-Client, Mobile and DOD5015 java code refactored to use SpringSurf Webscripts libraries, removed dependancies on existing WebScriptFramework project.
   17812: Removed web-framework and webscript-framework projects. Updated build scripts to use SpringSurf dependencies for remote API and client projects and also removal of wf and wsf projects from builds.
   17818: Various Spring app context and config changes to integration SpringSurf at the RemoteAPI and Web-Client project level.
           - Build scripts fixed up
           - Temporary web.xml changes until spring mvc dispatcher is hooked into /service urls
           - The server starts up! No nothing else works yet, you know how this goes...
   17819: Fix to incremental-webclient-tomcat-exploded build target to work on first deploy to a clean tomcat (affects HEAD also, not SpringSurf related).
   17872: Refactor Web-Client web.xml to use Spring WebScripts Dispatcher Servlet
           - servlet is configured to use the existing Spring application context instance as loaded by the ContextLoaderListener
          Share web.xml TODOs for JBoss app-server support (currently missing from SpringSurf extraction)
   17892: Upgraded Repository Spring dependant libraries to 3.0.0 release.
          Upgraded to latest SpringSurf release (also running against Spring 3.0.0)
          Various related fixes.
   17893: Additional Spring3.0.0 migration fixes and libraries.
   17899: Integrated another SpringSurf bug fix - to correctly add ClassPathStore instances to SearchPath objects.
   17901: Fixes to handling of merging of models returned from the new Script Processors.
          Share now works against a Repository that is running SpringSurf WebScripts and Spring 3.0.0.
   17904: Latest SpringSurf libraries after latest changes.

 TODO:
  - NTLM filter needs moving to Share (not present in SpringSurf)
  - MessagesWebScript - community tracking image needs adding to Share specific version (not present in SpringSurf)
  - feedController - for rss feed service urls - needs testing
  - Clustering config overrides - no longer work in SpringSurf, needs a rethink
  - Mobile project is not working
  - PHP module project
  - JBossEnabledWebApplicationContext required for Share - currently missing from SpringSurf

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17906 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2010-01-06 17:09:10 +00:00
parent e512f9c29d
commit ec246ec1da
98 changed files with 1977 additions and 440 deletions

View File

@@ -38,10 +38,10 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.scripts.AbstractWebScript;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
/**

View File

@@ -36,9 +36,9 @@ import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -48,10 +48,10 @@ import org.alfresco.service.cmr.repository.MimetypeService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.scripts.AbstractWebScript;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -41,10 +41,10 @@ import org.alfresco.service.cmr.view.ExporterService;
import org.alfresco.service.cmr.view.Location;
import org.alfresco.util.GUID;
import org.alfresco.util.TempFileProvider;
import org.alfresco.web.scripts.Status;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONArray;

View File

@@ -48,19 +48,19 @@ import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.MimetypeService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.TempFileProvider;
import org.alfresco.web.scripts.AbstractWebScript;
import org.alfresco.web.scripts.Cache;
import org.alfresco.web.scripts.Status;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
import org.alfresco.web.scripts.WebScriptResponse;
import org.alfresco.web.scripts.WebScriptStatus;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.ScriptProcessor;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.extensions.webscripts.WebScriptStatus;
import org.springframework.util.FileCopyUtils;
import de.schlichtherle.io.FileOutputStream;
@@ -155,7 +155,7 @@ public class StreamContent extends AbstractWebScript
Map<String, Object> returnModel = new HashMap<String, Object>(8, 1.0f);
scriptModel.put("model", returnModel);
executeScript(executeScript.getContent(), scriptModel);
mergeScriptModelIntoTemplateModel(returnModel, model);
mergeScriptModelIntoTemplateModel(executeScript.getContent().getPath(), returnModel, model);
}
// is a redirect to a status specific template required?
@@ -214,18 +214,28 @@ public class StreamContent extends AbstractWebScript
/**
* Merge script generated model into template-ready model
*
*
* @param scriptPath path to script
* @param scriptModel script model
* @param templateModel template model
*/
final private void mergeScriptModelIntoTemplateModel(Map<String, Object> scriptModel, Map<String, Object> templateModel)
final private void mergeScriptModelIntoTemplateModel(String scriptPath, Map<String, Object> scriptModel, Map<String, Object> templateModel)
{
for (Map.Entry<String, Object> entry : scriptModel.entrySet())
int i = scriptPath.lastIndexOf(".");
if (i != -1)
{
// retrieve script model value
Object value = entry.getValue();
Object templateValue = getContainer().getScriptProcessor().unwrapValue(value);
templateModel.put(entry.getKey(), templateValue);
String extension = scriptPath.substring(i+1);
ScriptProcessor processor = getContainer().getScriptProcessorRegistry().getScriptProcessorByExtension(extension);
if (processor != null)
{
for (Map.Entry<String, Object> entry : scriptModel.entrySet())
{
// retrieve script model value
Object value = entry.getValue();
Object templateValue = processor.unwrapValue(value);
templateModel.put(entry.getKey(), templateValue);
}
}
}
}