ALF-9981 Due to Spring 3.0 SPEL running on FTL entries like ${foo} before they are passed as properties to beans, support an escaped form of \$\{foo\} which is un-escaped before being passed to the FreeMarker engine. Updates the template code for scheduled actions to un-escape, and the example action definitions to be escaped

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30551 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2011-09-15 16:02:25 +00:00
parent 127ca27aa0
commit 3eed98f84a
2 changed files with 34 additions and 12 deletions

View File

@@ -33,7 +33,8 @@
<key>
<value>{http://www.alfresco.org/model/content/1.0}categories</value>
</key>
<value>${selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/cm:generalclassifiable/cm:Languages/cm:English"' )}</value>
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
<value>\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/cm:generalclassifiable/cm:Languages/cm:English"' )\}</value>
</entry>
</map>
</property>
@@ -95,19 +96,22 @@
<key>
<value>destination-folder</value>
</key>
<value>${selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/app:company_home"' )}</value>
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
<value>\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/app:company_home"' )\}</value>
</entry>
<entry>
<key>
<value>assoc-type</value>
</key>
<value>${node.primaryParentAssoc.typeQName}</value>
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
<value>\$\{node.primaryParentAssoc.typeQName\}</value>
</entry>
<entry>
<key>
<value>assoc-name</value>
</key>
<value>${node.primaryParentAssoc.QName}</value>
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
<value>\$\{node.primaryParentAssoc.QName\}</value>
</entry>
<entry>
<key>
@@ -150,7 +154,8 @@
<key>
<value>value</value>
</key>
<value>${today?string("yyyy-MM-dd'T'HH:mm:ss.sss'Z'")}</value>
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
<value>\$\{today?string("yyyy-MM-dd'T'HH:mm:ss.sss'Z'")\}</value>
</entry>
</map>
</property>
@@ -402,7 +407,8 @@
</list>
</property>
<property name="queryTemplate">
<value>@cm\:created:${luceneDateRange(yesterday, "-P10Y")}</value>
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
<value>@cm\:created:\$\{luceneDateRange(yesterday, "-P10Y")\}</value>
</property>
<property name="cronExpression">
<value>0 0/1 * * * ?</value>
@@ -439,4 +445,4 @@
</property>
</bean>
</beans>
</beans>