From e512f9c29d3ce728c009af56482f89999f2e7d97 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Mon, 14 Dec 2009 13:49:45 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20DEV/TEMPORARY=20to=20HEAD=20=20=20=201?= =?UTF-8?q?7682:=20Fixed=20up=20package=20structure=20of=20standalone=20al?= =?UTF-8?q?fresco-jlan=20configelement=20fa=E2=80=A1ade=20classes.=20=20?= =?UTF-8?q?=20=2017684:=20Fix=20up=20build.xml=20for=20first=20set=20of=20?= =?UTF-8?q?spring-surf=20integration=20changes=20-=20tested=20alfresco/sha?= =?UTF-8?q?re=20server=20startup.=20=20=20=2017697:=20Minor=20tweaks=20fro?= =?UTF-8?q?m=20V3.3=5FSPRING3=20branch=20before=20spring-webscripts=20JAR?= =?UTF-8?q?=20integration.=20=20=20=2017730:=20Updated=20to=20latest=20Spr?= =?UTF-8?q?ingSurf=20libs=20and=20fixed=20up=20build.xml.=20=20=20=2017737?= =?UTF-8?q?:=20Share=20war=20built=20against=20SpringSurf=20libraries=20an?= =?UTF-8?q?d=20deploys=20into=20tomcat.=20=20=20=20=20=20=20=20=20=20=20-?= =?UTF-8?q?=20First=20pass=20of=20configuration=20and=20web.xml=20refactor?= =?UTF-8?q?ed=20to=20new=20structure=20=20=20=20=20=20=20=20=20=20=20-=20R?= =?UTF-8?q?efactored=20Slingshot=20PageMapper=20and=20UserFactory=20classe?= =?UTF-8?q?s=20to=20new=20interfaces=20=20=20=20=20=20=20=20=20=20=20-=20B?= =?UTF-8?q?uild=20scripts=20updated=20to=20use=20SpringSurf=20libraries=20?= =?UTF-8?q?to=20build=20Share=20-=20dependency=20on=20old=20WebScripts=20a?= =?UTF-8?q?nd=20WebFramework=20projects=20removed.=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20-=20Some=20cleanup=20related=20to=20SpringSurf=20Core?= =?UTF-8?q?=20project=20class=20removal=20=20=20=20=20=20=20=20=20=20=20-?= =?UTF-8?q?=20NOTE:=20Share=20does=20not=20work=20yet,=20not=20even=20clos?= =?UTF-8?q?e,=20just=20builds=20and=20deploys=20WAR=20with=20no=20errors.?= =?UTF-8?q?=20=20=20=2017738:=20Updates=20to=20WebFrameworkCommons=20-=20r?= =?UTF-8?q?emoves=20dependency=20on=20old=20WebScripts=20and=20WebFramewor?= =?UTF-8?q?k=20projects=20-=20now=20uses=20new=20=20SpringSurf=20libraries?= =?UTF-8?q?.=20=20=20=2017739:=20Removed=20webscripts=20and=20webframework?= =?UTF-8?q?=20references=20from=20build=20targets=20for=20slingshot.=20=20?= =?UTF-8?q?=20=2017740:=20Removed=20old=20WebStudio=20project=20and=20buil?= =?UTF-8?q?d=20scripts.=20=20=20=2017747:=20Updated=20to=20latest=20Spring?= =?UTF-8?q?Surf=20dependent=20libraries.=20=20=20=20=20=20=20=20=20=20=20F?= =?UTF-8?q?ixes=20to=20Share=20startup=20config=20-=20added=20page=20types?= =?UTF-8?q?.=20=20=20=2017751:=20More=20refactoring=20of=20Share=20app-con?= =?UTF-8?q?text=20config.=20=20=20=20=20=20=20=20=20=20=20Moved=20StaticAs?= =?UTF-8?q?setCacheFilter=20to=20WebFrameworkCommons=20(as=20no=20longer?= =?UTF-8?q?=20present=20in=20SpringSurf).=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?Added=20SlingshotPageMapperFactory=20to=20complete=20classes=20?= =?UTF-8?q?required=20for=20Share=20SpringSurf=20customisation.=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20Updated=20SpringSurf=20jars=20to=20late?= =?UTF-8?q?st=20after=20recent=20SpringSurf=20SVN=20commits.=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20Slingshot=20surf-config.xml=20now=20loads?= =?UTF-8?q?=20custom=20app-context=20from=20backward=20compatibility=20loc?= =?UTF-8?q?ations.=20=20=20=20=20=20=20=20=20=20=20URL=20rewrite=20config?= =?UTF-8?q?=20added=20to=20allow=20/service=20and=20/proxy=20URLs=20to=20w?= =?UTF-8?q?ork=20for=20backward=20compatibility.=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20Removal=20of=20more=20obsolete=20sections=20from=20Sha?= =?UTF-8?q?re=20web.xml.=20=20=20=2017752:=20Share=20login=20and=20basic?= =?UTF-8?q?=20authentication=20and=20user=20generation=20path=20now=20work?= =?UTF-8?q?ing.=20=20=20=2017775:=20Share=20dashboards=20and=20other=20pag?= =?UTF-8?q?es=20now=20working=20under=20SpringSurf.=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20-=20Added=20latest=20SpringSurf=20libs=20after=20my?= =?UTF-8?q?=20recent=20commits=20for=20various=20fixes=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20-=20Added=20Share=20overriden=20PageViewResolver?= =?UTF-8?q?=20to=20handle=20Uri=20template=20matching=20-=20required=20for?= =?UTF-8?q?=20Share=20=20=20=20=20=20=20=20=20=20=20-=20Fixed=20Logout=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20-=20Moved=20slingshot-region-chom?= =?UTF-8?q?e=20to=20correct=20new=20location=20=20=20=2017785:=20Removed?= =?UTF-8?q?=20obsolete=20system-templates=20dir.=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20Fixed=20slingshot=20app=20context=20to=20correctly=20p?= =?UTF-8?q?ickup=20custom=20share=20config=20xml=20in=20web-extension.=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20Fixed=20up=20JSF=20client=20index?= =?UTF-8?q?.jsp=20to=20use=20new=20ConfigService=20class=20location.=20=20?= =?UTF-8?q?=20=2017786:=20Updated=20SpringSurf=20libs=20after=20recent=20c?= =?UTF-8?q?ommits.=20=20=20=20=20=20=20=20=20=20=20Share=20related=20fixes?= =?UTF-8?q?=20to=20app-context.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Share is now working! For the basic use cases i'm no longer seeing any issues; login, dashboards, creation of sites, document library etc. all seem to be working now. A complete QA pass of the application will be required for 3.3. 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) - Clustering config overrides - no longer work in SpringSurf, needs a rethink - Mobile project is not working - Repository Remote API and Web-Client to work ontop of SpringSurf WebScripts (the next BIG bit...) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17789 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/webframework/metadata.get.html.ftl | 17 ++++++++++++----- .../org/alfresco/webframework/metadata.get.js | 7 +++++++ .../repo/web/scripts/bean/BaseRemoteStore.java | 6 +----- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.html.ftl index 75927fea79..5dcf4efbb0 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.html.ftl @@ -1,5 +1,12 @@ { - <@serialize object=object includeChildren=includeChildren includeContent=includeContent/> + "code" : "${code}" + +<#if object?exists> + , + "data" : { + <@serialize object=object includeChildren=includeChildren includeContent=includeContent/> + } + } <#macro serialize object includeChildren includeContent> @@ -10,10 +17,10 @@ "url" : "${object.url}" , "downloadUrl" : "${object.downloadUrl}" -<#if object.mimetype?exists> +<#if object.mimetype?exists> , "mimetype" : "${object.mimetype}" - + , "size" : "${object.size}" , @@ -36,7 +43,7 @@ "type" : "${object.type}" , "isCategory" : ${object.isCategory?string} - + <#if object.properties?exists> , "properties" : @@ -86,7 +93,7 @@ { <@serialize object=child includeChildren=false includeContent=includeContent/> } - <#assign first = false> + <#assign first = false> ] <#else> diff --git a/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.js b/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.js index a2f76d36b3..6372d54457 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.js +++ b/config/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.js @@ -2,6 +2,8 @@ model.includeChildren = true; model.includeContent = false; model.isUser = false; +model.code = "ERROR"; + var object = null; // allow for content to be loaded from id @@ -35,4 +37,9 @@ else object = roothome.childByNamePath(path); } +if (object != null) +{ + model.code = "OK"; +} + model.object = object; \ No newline at end of file diff --git a/source/java/org/alfresco/repo/web/scripts/bean/BaseRemoteStore.java b/source/java/org/alfresco/repo/web/scripts/bean/BaseRemoteStore.java index 7d95925b61..688a3cce76 100644 --- a/source/java/org/alfresco/repo/web/scripts/bean/BaseRemoteStore.java +++ b/source/java/org/alfresco/repo/web/scripts/bean/BaseRemoteStore.java @@ -146,7 +146,7 @@ public abstract class BaseRemoteStore extends AbstractWebScript String methodName = null; String store = null; String webapp = null; - StringBuilder pathBuilder = null; + StringBuilder pathBuilder = new StringBuilder(128); // tokenize the path and figure out tokenized values StringTokenizer tokenizer = new StringTokenizer(extPath, "/"); @@ -178,10 +178,6 @@ public abstract class BaseRemoteStore extends AbstractWebScript while (el != null) { - if (pathBuilder == null) - { - pathBuilder = new StringBuilder(128); - } pathBuilder.append('/'); pathBuilder.append(el);