<?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: Services and Tagging in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449478#M128765</link>
    <description>&lt;P&gt;Can you please elaborate the significance of 4th line of this code and also what are PN_TAGS_MATCH, TAGS_MATCH_ANY_VALUE??&lt;/P&gt;</description>
    <pubDate>Sat, 23 Apr 2022 17:28:41 GMT</pubDate>
    <dc:creator>Manasi29</dc:creator>
    <dc:date>2022-04-23T17:28:41Z</dc:date>
    <item>
      <title>Services and Tagging</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449452#M128756</link>
      <description>&lt;P&gt;How do we write an OSGI Service that takes tag value and finds pages which are having tag value?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2022 10:28:31 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449452#M128756</guid>
      <dc:creator>Dvaraka</dc:creator>
      <dc:date>2022-04-23T10:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Services and Tagging</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449472#M128762</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;LI-USER uid="17526027"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use a service to use&amp;nbsp;&lt;A href="https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/index.html?com/day/cq/tagging/TagManager.html" target="_blank" rel="noopener"&gt;https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/index.html?com/day/cq/tagging/TagManager.html&lt;/A&gt;&amp;nbsp;and pass desired tag id or path to get resources tagged with the tag.&lt;/P&gt;&lt;P&gt;Below is an example from&amp;nbsp;&lt;A href="https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/ListImpl.java#L240" target="_blank"&gt;https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/ListImpl.java#L240&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private void populateTagListItems() {
        listItems = new ArrayList&amp;lt;&amp;gt;();
        String[] tags = properties.get(PN_TAGS, new String[0]);
        boolean matchAny = properties.get(PN_TAGS_MATCH, TAGS_MATCH_ANY_VALUE).equals(TAGS_MATCH_ANY_VALUE);
        if (ArrayUtils.isNotEmpty(tags)) {
            Page rootPage = getRootPage(PN_TAGS_PARENT_PAGE);
            if (rootPage != null) {
                TagManager tagManager = resourceResolver.adaptTo(TagManager.class);
                RangeIterator&amp;lt;Resource&amp;gt; resourceRangeIterator = tagManager.find(rootPage.getPath(), tags, matchAny);
                if (resourceRangeIterator != null) {
                    while (resourceRangeIterator.hasNext()) {
                        Page containingPage = pageManager.getContainingPage(resourceRangeIterator.next());
                        if (containingPage != null) {
                            listItems.add(containingPage);
                        }
                    }
                }
            }
        }
    }&lt;/PRE&gt;&lt;P&gt;Also see&amp;nbsp;&lt;A href="https://github.com/adobe/aem-core-wcm-components/blob/a7e377c6810dd2125a902d3ef3df5c92ec2a1719/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/ListImpl.java" target="_blank" rel="noopener"&gt;https://github.com/adobe/aem-core-wcm-components/blob/a7e377c6810dd2125a902d3ef3df5c92ec2a1719/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/ListImpl.java&lt;/A&gt;&amp;nbsp;look for method -&amp;nbsp;&lt;SPAN&gt;getTagListItems&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 16:19:22 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449472#M128762</guid>
      <dc:creator>Shubham_borole</dc:creator>
      <dc:date>2022-04-29T16:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Services and Tagging</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449478#M128765</link>
      <description>&lt;P&gt;Can you please elaborate the significance of 4th line of this code and also what are PN_TAGS_MATCH, TAGS_MATCH_ANY_VALUE??&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2022 17:28:41 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/services-and-tagging/m-p/449478#M128765</guid>
      <dc:creator>Manasi29</dc:creator>
      <dc:date>2022-04-23T17:28:41Z</dc:date>
    </item>
  </channel>
</rss>

