<?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: Is it possible to query WCM content through web-script in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170107#M123437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your hunch is spot on - it is indeed possible to query WCM content (including both Web Form backed and "static" files) via Web Scripts.&amp;nbsp; For Javascript-backed Web Scripts, you can use the AVM JS API (&lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#AVM_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#AVM_API&lt;/A&gt;&lt;SPAN&gt;), while for Java-backed Web Scripts you'd use the AVMService Java API (&lt;/SPAN&gt;&lt;A href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/avm/AVMService.html" rel="nofollow noopener noreferrer"&gt;http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/avm/AVMService.html&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for querying for specific types, I can think of two ways to do that (this is off the top of my head - there may be more approaches as well):&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;The first is to query for the "parentformname" attribute (a property which is automatically populated by the WCM system).&amp;nbsp; For example the Lucene query &lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;TEXT:"Alfresco" AND @\{http\://&lt;A href="http://www.alfresco.org/model/wcmappmodel/1.0\}parentformname:%22Product" rel="nofollow noopener noreferrer"&gt;www.alfresco.org/model/wcmappmodel/1.0\}parentformname:'Product&lt;/A&gt; Data-Sheet"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt; would search for all product data-sheets containing the word "Alfresco" somewhere in the full text.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Use XML Metadata Extraction (&lt;A href="http://wiki.alfresco.com/wiki/Metadata_Extraction#XML_Meta-data_Extractor_Configuration_for_WCM" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Metadata_Extraction#XML_Meta-data_Extractor_Configuration_for_WCM&lt;/A&gt;) to index a custom property with the name of the type.&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;Although it's more work, the second approach supports more complex use cases, such as the case where you want to treat multiple different Web Form types as if they were a single type at querying time (of course you could also use approach #1 with a set of "ORs", but that likely won't perform as well a single query clause against a custom property).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Aug 2008 15:22:26 GMT</pubDate>
    <dc:creator>pmonks</dc:creator>
    <dc:date>2008-08-17T15:22:26Z</dc:date>
    <item>
      <title>Is it possible to query WCM content through web-script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170106#M123436</link>
      <description>I have been reading about the WCM capabilities of Alfresco and the web scripts framework. One thing, that is not very clear to me so far is whether it is possible to query the content created using WCM webforms through web-scripts. I think that it should be; but I am not 100% sure. Similar question:</description>
      <pubDate>Sun, 17 Aug 2008 09:16:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170106#M123436</guid>
      <dc:creator>meetkenepps</dc:creator>
      <dc:date>2008-08-17T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to query WCM content through web-script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170107#M123437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your hunch is spot on - it is indeed possible to query WCM content (including both Web Form backed and "static" files) via Web Scripts.&amp;nbsp; For Javascript-backed Web Scripts, you can use the AVM JS API (&lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#AVM_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#AVM_API&lt;/A&gt;&lt;SPAN&gt;), while for Java-backed Web Scripts you'd use the AVMService Java API (&lt;/SPAN&gt;&lt;A href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/avm/AVMService.html" rel="nofollow noopener noreferrer"&gt;http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/avm/AVMService.html&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for querying for specific types, I can think of two ways to do that (this is off the top of my head - there may be more approaches as well):&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;The first is to query for the "parentformname" attribute (a property which is automatically populated by the WCM system).&amp;nbsp; For example the Lucene query &lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;TEXT:"Alfresco" AND @\{http\://&lt;A href="http://www.alfresco.org/model/wcmappmodel/1.0\}parentformname:%22Product" rel="nofollow noopener noreferrer"&gt;www.alfresco.org/model/wcmappmodel/1.0\}parentformname:'Product&lt;/A&gt; Data-Sheet"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt; would search for all product data-sheets containing the word "Alfresco" somewhere in the full text.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Use XML Metadata Extraction (&lt;A href="http://wiki.alfresco.com/wiki/Metadata_Extraction#XML_Meta-data_Extractor_Configuration_for_WCM" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Metadata_Extraction#XML_Meta-data_Extractor_Configuration_for_WCM&lt;/A&gt;) to index a custom property with the name of the type.&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;Although it's more work, the second approach supports more complex use cases, such as the case where you want to treat multiple different Web Form types as if they were a single type at querying time (of course you could also use approach #1 with a set of "ORs", but that likely won't perform as well a single query clause against a custom property).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 15:22:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170107#M123437</guid>
      <dc:creator>pmonks</dc:creator>
      <dc:date>2008-08-17T15:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to query WCM content through web-script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170108#M123438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Peter, this is real good start for me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Ken&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 17:13:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/is-it-possible-to-query-wcm-content-through-web-script/m-p/170108#M123438</guid>
      <dc:creator>meetkenepps</dc:creator>
      <dc:date>2008-08-17T17:13:51Z</dc:date>
    </item>
  </channel>
</rss>

