<?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: Asset collection query placeholders in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268597#M221727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are a couple of others provided: "siteid" and "sectionid".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, as you might hope, this is a pluggable component, so you can add in as many more as you want. If you take a look in the file "context-parsers-context.xml" you will see all the provided placeholder processors (they are called "context parsers") along with an abstract bean definition named "wcmquickstartmodule_contextParser". To plug-in a new context parser, create a new class that extends the abstract class "org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser.ContextParser" and register a bean for it using the abstract "wcmquickstartmodule_contextParser" bean as its parent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To take the "section" parser as an example, this is defined by the class "SectionPathContextParser" and the bean "wcmquickstartmodule_sectionPathContextParser". The bean definition looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="wcmquickstartmodule_sectionPathContextParser"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent="wcmquickstartmodule_contextParser"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class="org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser.SectionPathContextParser"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="name" value="section" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Note the reference to the parent bean: "wcmquickstartmodule_contextParser". Also note the value of the name property of this bean: "section" - by default this is used as the key that ties your parser to a particular placeholder (although this is overridden by this particular parser).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully that makes sense and gives you the starting point you need. Come back to me if you need more information.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2011 13:03:17 GMT</pubDate>
    <dc:creator>bremmington</dc:creator>
    <dc:date>2011-08-31T13:03:17Z</dc:date>
    <item>
      <title>Asset collection query placeholders</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268596#M221726</link>
      <description>The standard query definitions for the dynamic asset collections contain a placeholder for a section path. Is there any documentation available on what other placeholders could be used here? Or could you point me to the location in the code where these placeholders are processed?</description>
      <pubDate>Wed, 31 Aug 2011 12:07:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268596#M221726</guid>
      <dc:creator>aussen2</dc:creator>
      <dc:date>2011-08-31T12:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Asset collection query placeholders</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268597#M221727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are a couple of others provided: "siteid" and "sectionid".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, as you might hope, this is a pluggable component, so you can add in as many more as you want. If you take a look in the file "context-parsers-context.xml" you will see all the provided placeholder processors (they are called "context parsers") along with an abstract bean definition named "wcmquickstartmodule_contextParser". To plug-in a new context parser, create a new class that extends the abstract class "org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser.ContextParser" and register a bean for it using the abstract "wcmquickstartmodule_contextParser" bean as its parent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To take the "section" parser as an example, this is defined by the class "SectionPathContextParser" and the bean "wcmquickstartmodule_sectionPathContextParser". The bean definition looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="wcmquickstartmodule_sectionPathContextParser"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent="wcmquickstartmodule_contextParser"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class="org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser.SectionPathContextParser"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="name" value="section" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Note the reference to the parent bean: "wcmquickstartmodule_contextParser". Also note the value of the name property of this bean: "section" - by default this is used as the key that ties your parser to a particular placeholder (although this is overridden by this particular parser).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully that makes sense and gives you the starting point you need. Come back to me if you need more information.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 13:03:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268597#M221727</guid>
      <dc:creator>bremmington</dc:creator>
      <dc:date>2011-08-31T13:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Asset collection query placeholders</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268598#M221728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks you very much for the quick reply! Based on your explanation I could already implement what I needed using a copy of SectionIdContextParser.java and changing it to return the name of the section instead of the nodeRef.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;package org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser;&lt;BR /&gt;&lt;BR /&gt;import org.alfresco.model.ContentModel;&lt;BR /&gt;import org.alfresco.service.cmr.repository.NodeRef;&lt;BR /&gt;&lt;BR /&gt;public class SectionNameContextParser extends ContextParser&lt;BR /&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public String execute(NodeRef context)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String result = null;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NodeRef nodeRef = siteHelper.getRelevantSection(context);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (nodeRef != null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String nodeName = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;result = nodeName;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return result;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 15:37:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268598#M221728</guid>
      <dc:creator>aussen2</dc:creator>
      <dc:date>2011-08-31T15:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Asset collection query placeholders</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268599#M221729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great. Glad it helped.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 15:40:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asset-collection-query-placeholders/m-p/268599#M221729</guid>
      <dc:creator>bremmington</dc:creator>
      <dc:date>2011-08-31T15:40:21Z</dc:date>
    </item>
  </channel>
</rss>

