<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Default missing parameters in context in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279630#M232760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically its for the trashcan cleaner quartz job. What I wanted to happen was that is the cron expression was not set up in alfresco-global.properties it woukld default to a preset value which was provided via the context XML. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have got it using the .properties just fine, I just wanted to be able to effectively say "if this property does not exist, use this string instead".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jan 2016 17:16:55 GMT</pubDate>
    <dc:creator>rjohnson</dc:creator>
    <dc:date>2016-01-26T17:16:55Z</dc:date>
    <item>
      <title>Default missing parameters in context</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279628#M232758</link>
      <description>I have a timed job that sets its quarrtz cron string using a parameter like this&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="cronExpression"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;value&amp;gt;${myservice.cron}&amp;lt;/value&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;‍‍‍‍‍I would like to be able to default the service cron should someone not set the parameter my</description>
      <pubDate>Wed, 06 Jan 2016 19:05:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279628#M232758</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2016-01-06T19:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Default missing parameters in context</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279629#M232759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you want to default the parameter in the spring context for injection into a spring bean or format something like a web script response with a freemarker template?&amp;nbsp;&amp;nbsp; There is a big difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If in the spring context then there are a number of locations loaded.&amp;nbsp;&amp;nbsp;&amp;nbsp; Alfresco's default property values are provided in the repository.properties file which can then be overridden by files like alfresco-global.properties.&amp;nbsp;&amp;nbsp; I remember documenting the precedence rules on the wiki although you can also follow the property loading in the bootstrap section of the spring context.&amp;nbsp;&amp;nbsp; It gets slightly more complicated by modules and subsystems but its still simply loading property files in a specific order, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If in a freemarker template then your property needs to be in the model passed to the template.&amp;nbsp;&amp;nbsp; Freemarker has commands for testing whether values exist and defaulting a value for example the ? and ! operators or &amp;lt;#if&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 22:39:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279629#M232759</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2016-01-06T22:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Default missing parameters in context</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279630#M232760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically its for the trashcan cleaner quartz job. What I wanted to happen was that is the cron expression was not set up in alfresco-global.properties it woukld default to a preset value which was provided via the context XML. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have got it using the .properties just fine, I just wanted to be able to effectively say "if this property does not exist, use this string instead".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 17:16:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/default-missing-parameters-in-context/m-p/279630#M232760</guid>
      <dc:creator>rjohnson</dc:creator>
      <dc:date>2016-01-26T17:16:55Z</dc:date>
    </item>
  </channel>
</rss>

