<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Content Management</title>
	<atom:link href="http://blogs.adobe.com/contentmanagement/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.adobe.com/contentmanagement</link>
	<description>All about CQ</description>
	<lastBuildDate>Mon, 13 May 2013 18:56:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>CQ 5.6 Out Of The Box Workflow Processes, and what they do/can be used for.</title>
		<link>http://blogs.adobe.com/contentmanagement/2013/05/13/cq-5-6-out-of-the-box-workflow-processes-and-what-they-docan-be-used-for/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2013/05/13/cq-5-6-out-of-the-box-workflow-processes-and-what-they-docan-be-used-for/#comments</comments>
		<pubDate>Mon, 13 May 2013 18:56:05 +0000</pubDate>
		<dc:creator>Kaushal Mall</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[ootb workflow processes]]></category>
		<category><![CDATA[workflow processes]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=302</guid>
		<description><![CDATA[I will try and cover what are all the OOTB workflow processes available in CQ 5.6. The processes in red below are the ones where I will add some explanations to as and when I find time. Collaboration Worklow Approve Comment - This process is to approve a comment posted on the site automatically. It will [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">I will try and cover what are all the OOTB workflow processes available in CQ 5.6. The processes in <span style="color: #ff0000;">red</span> below are the ones where I will add some explanations to as and when I find time.</p>
<ul>
<li style="text-align: justify;"><strong><span style="line-height: 13px;">Collaboration Worklow</span></strong>
<ul>
<li><strong>Approve Comment</strong> - This process is to approve a comment posted on the site automatically. It will only approve the comment if you have the &#8220;Approve&#8221; box checked on the Arguments tab of the wf process dialog.The script used by the process is located under
<ul>
<li>/etc/workflow/scripts/social/set_approved.ecma.</li>
</ul>
</li>
<li><strong>Approve Comment Step</strong> &#8211; This process is to send a notification to a user or group to approve a comment. You have the option to choose the User/Group on the dialog and also an option to send an email.</li>
<li><strong>Blog Search Ping</strong> &#8211; This process submits a blog post to various blog search engines. It uses the BlogSearchPingService for the post. Look at the &#8220;Day CQ Social Collaboration Blog Search Engine Ping&#8221; class&#8217; configuration in the Felix Console. There are no arguments available for this process.</li>
<li><strong>Calendar Subscription</strong> &#8211; This process can be used to either subscribe or unsubscribe to a calendar. It will either subscribe or unsubscribe the calendar component given as the &#8220;target&#8221;  property in the workflow metadata to the event or calendar (payload). You can choose whether you want the process to do a subscription or an un-subscription from the process arguments.</li>
<li><strong>Check Blog Spam</strong> &#8211; This process checks a comment for spam. OOTB you can either use Akismet service, you need to enter a valid key and registered URL for the spam service in the configurations for Day CQ Antispam.</li>
<li><strong>Check Journal Spam</strong> &#8211; Same as the Check Blog Process above, uses the the Akismet service.</li>
<li><strong>Flush (Replicate) Page - </strong>A process to flush(replicate) a page for a given replication agent, the argument should be like &#8220;agent:flush&#8221; for the dispatcher flush agent. It uses the script &#8220;/etc/workflow/scripts/social/flush_page.ecma&#8221;.</li>
<li><strong>Forum Subscription - </strong>Process to subscribe and unsubscribe from a forum.  Subscribes or unsubscribes the given user in the metadata to the payload forum topic. This process is used in conjunction with the User State Toggle Button feature. You can choose the &#8220;Subscribe&#8221; or &#8220;Unsubscribe&#8221; argument. Subscribe is the default.</li>
<li><strong>Journal Search Ping</strong> &#8211; Same as the Blog Search Ping process above.</li>
<li><strong>QnA Subscription</strong> &#8211; Same as the Forum/Calendar Subscription process above.</li>
<li><strong>Send Email</strong> - Sends an email based on an email template. You can either point to a template or put the template in a text area of the Arguments tab of the process. The Day CQ Mail Service must be configured for this to work.</li>
</ul>
</li>
<li style="text-align: justify;"><strong>DAM Workflow</strong>
<ul>
<li><strong>Command Line</strong> - A process to execute multiple command line programs (imagemagick for example). Mime type, Commands and Thumbnails are the arguments that can be passed to the process. This is documented pretty well on the process dialog itself.</li>
<li><strong>Create Sub Asset</strong> - This process will fragment an asset in its subassets. Sub assets are assets stored under another asset, as a result of splitting up the asset in fragments during its import, e.g. the single pages of a multi-page PDF file.</li>
<li><strong>Create Thumbnail</strong> - This process will create one or more thumbnails for the asset to be processed. This is pretty self explanatory.</li>
<li><strong>Create Video Storyboard</strong> - A process to create a video storyboard. Workflow process that calls FFMPEG on the command line to create a storyboard of a video. A storyboard consists of several key frames extracted from the video. The key frames will be stored as subassets of the video asset. Also, a merged film strip of the key frames will be stored as a storyboard rendition of the video asset. Frame Count, Start, Maximum Width, Maximum Height , Upscale and Frames are the arguments. Examples: Create 10 frames, starting with the first at 12 seconds into the movie frames:10,start:12 Create 10 frames, each 100 x 80 px, upscaled: frames:10,maxWidth:100,maxHeight:80,upScale:true Create 5 frames, each at a defined position, each 100 x 80 px, upscaled: maxWidth:100,maxHeight:80,[00:05:00],[00:10:00],[00:15:00],[00:20:00],[00:25:00]. Will create thumbnails of size 140&#215;100 and 48&#215;48 with a black letterbox/pillarbox only for assets of the video based mime types.</li>
<li><strong>Create Video Thumbnails</strong> - Workflow process that calls FFMPEG on the command line to create thumbnails of the image. You can specify the dimension of the thumbnails to be created. For example, using the following workflow step arguments:count:3,index:1,start:10,[140x100],[48x48]. Will create thumbnails of size 140&#215;100 and 48&#215;48 with a black letterbox/pillarbox only for assets having a video-based mime-type.</li>
<li><strong>Create Web Enabled Image</strong> &#8211; This one is pretty well explained on the process dialog itself.</li>
<li><strong>Delete Asset</strong> &#8211; Self Explanatory.</li>
<li><strong>Delete DAM Asset - </strong>The process will delete the file in the /var/dam when the asset in the /content/dam location got deleted. Deletes an Item for the Payload under the following condition: The Payloads relative path to a given source root exists in a given destination branch. If the Payload points to /content/dam/geometrixx/buildings, the Process checks if an Item exists at /var/dam/geometrixx/buildings. If there is an Item and this Item is not involved in a Workflowm, it will be deleted. Assuming the source and destination arguments were set to match the example.</li>
<li><strong>Extract Meta Data</strong> &#8211; Self Explanatory.</li>
<li><strong>Gate Keeper - </strong>This process prevents the workflow from being fired if an asset is restored, a version restore for example.</li>
<li><strong>IDS Job Process - </strong>Workflow process for InDesign assets.</li>
<li><strong>Light Box Update Asset - </strong>This process sets the entry in the lightbox as new originial to the asset it references. It looks at the &#8220;assetRefs&#8221; property for the original asset.</li>
<li><strong>Media Extraction - </strong>InDesign Media Extraction. This process creates a SOAP packet with an embedded EmbeddedScript to be executed on InDesign server. The process arguments lets you choose the ExtendScript library, Extend Scripts and the Links Folder Path.</li>
<li><strong>Page Extraction - </strong>InDesign Page Extraction. This process step creates a CQ page from an InDesign document.The actual extraction is carried out by a configurable PageExtractionHandler. This step works on asset renditions only. The renditions to use are determined by the PageExtractionHandler as well and are expected to be created in a previous step. Arguments available  are<br />
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>extractionHandler: The actual extraction handler class to use for creating the page<br />
pageName: The name int for the extracted page<br />
pageRoot: The root path for the extracted page<br />
pageTemplate: The template to use for the extracted page<br />
pageDesign: The page design to use for the extracted page<br />
pageTitle: The page title to use for the extracted page</p></blockquote>
</li>
</ul>
<ul>
<li><strong>Resize Image - </strong>The process dialog for this is pretty self explanatory.</li>
<li><strong>Resize Image to Area - </strong>Same as above, except that you can enter the area of the image (width x height).</li>
<li><strong>Set Last Modified - </strong>Self Explanatory</li>
<li><strong><strong>Synchronize /var/dam - </strong></strong>The SyncContentProcess syncs the content below /var/dam with /content/dam in two different modes (cleanup and sync). Process is only executed if started with a mode argument, the payload exists and is currently not involved in a Workflow.</li>
<li><strong>Synchronize Asset - </strong>Self Explanatory from the process dialog.</li>
<li><strong>Synchronize Content - </strong>The SyncContentProcess syncs the content below /content/dam in two selectable modes (cleanup and sync). Expects its Payload to point to a nt:folder. The cleanup mode removes the nodes in /content/dam structure that have no counterpart in the /var structure. The sync mode starts for any nt:file in the branch a Workflow with the Workflow Model Id provided in the arguments and the files path as the payload. The workflow model id argument is the Identifier of a WorkflowModel. This Workflow will be started on Assets added by this Process in mode sync. It is ignored in cleanup mode. Example :/etc/wokflow/models/syncmodell</li>
<li><strong>Transcode Video - </strong>Self Explanatory.</li>
<li><strong>Unarchiver - </strong>The process dialog does a very good job of explaining what this process does.</li>
<li><strong>XMP Writeback - </strong>Writes metadata back to the binary.</li>
</ul>
</li>
<li style="text-align: justify;"><strong>WCM Workflow - </strong>All the OOTB processes in this group are pretty self explanatory.
<ul>
<li><strong>Activate Page/Asset</strong></li>
<li><strong>Create Version</strong></li>
<li><strong>Deactivate Page/Asset</strong></li>
<li><strong>Reverse Replicate Content</strong></li>
</ul>
</li>
<li><strong>Workflow</strong>
<ul>
<li style="text-align: justify;"><strong>AND Split - </strong>Puts an AND split in your workflow model. You can choose between 2 and 5 branches.</li>
<li style="text-align: justify;"><strong>Absolute Time Auto Advancer - </strong>Workflow Auto Advance Process.</li>
<li style="text-align: justify;"><strong>Auto Advancer - </strong>Same as above.</li>
<li style="text-align: justify;"><strong>Call Url - </strong>Process to call a URL. Script is located at /etc/workflow/scripts/urlcaller.ecma. Arguments are URL, username and password. Pretty self explanatory once you look at the ECMA script.</li>
<li style="text-align: justify;"><strong>Container Step - </strong>Process to contain a workflow within a workflow. The process dialog lets you choose the workflow model you want to include.</li>
<li style="text-align: justify;"><strong>Create Task - </strong>Process to create a task in the new CQ 5.6 Task Manager. The process dialog does a pretty good job of defining arguments and what they are used for.</li>
<li style="text-align: justify;"><strong>Delete Node - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><strong>Dialog Participant Step - </strong>This process lets you define your custom dialog that will be presented to the user when they want to complete the workflow task from the CQ inbox. This is a good way to have users enter custom data when completing a workflow task.</li>
<li style="text-align: justify;"><strong>Dynamic Participant Step - </strong>This process lets you choose a participant dynamically within the workflow rather than setting it up in the model on creation.</li>
<li style="text-align: justify;"><span style="color: #ff0000;"><strong>Extract Export Data </strong></span></li>
<li style="text-align: justify;"><strong>Form Participant Step - </strong>Same as the dialog participant step. Reference <a title="Workflow Reference" href="http://dev.day.com/docs/en/cq/current/workflows/wf-ref.html" target="_blank">here</a> on how to use it.</li>
<li style="text-align: justify;"><strong>Goto Step - </strong>Lets you go back to a particular step in the workflow. At the time of writing this blog, there was a UI bug where if you had the goto step inside a split, the drop down wont show the steps outside the branch of the split. The workaround for this is to manually update the property in CRXDE for the goto step process.</li>
<li style="text-align: justify;"><strong>Lock Payload Step - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><strong>No Operation - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><strong>OR Split - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><strong>Participant Step - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><span style="color: #ff0000;"><strong>Process Assembler</strong></span></li>
<li style="text-align: justify;"><strong>Process Step - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><strong>Random Participant Chooser - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><span style="color: #ff0000;"><strong>Scene7</strong></span></li>
<li style="text-align: justify;"><span style="color: #ff0000;"><strong>Sentiments Analyzer</strong></span></li>
<li style="text-align: justify;"><span style="color: #ff0000;"><strong>Test &amp; Target Offer</strong></span></li>
<li style="text-align: justify;"><strong>Unlock Payload Process - </strong>Self Explanatory.</li>
<li style="text-align: justify;"><span style="color: #ff0000;"><strong>Watchwords Analyzer</strong></span></li>
<li style="text-align: justify;"><strong>Workflow Initiator Participant Chooser - </strong>Sample that chooses the workflow initiator as the participant.</li>
</ul>
</li>
</ul>
<p>As always, please leave comments with questions/concerns and I will try to answer as soon as I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2013/05/13/cq-5-6-out-of-the-box-workflow-processes-and-what-they-docan-be-used-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a mobile site in CQ</title>
		<link>http://blogs.adobe.com/contentmanagement/2013/04/02/how-to-create-a-mobile-site-in-cq/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2013/04/02/how-to-create-a-mobile-site-in-cq/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 23:07:16 +0000</pubDate>
		<dc:creator>Kaushal Mall</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[cq mobile]]></category>
		<category><![CDATA[cq mobile site]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[how to create a mobile site using cq]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=295</guid>
		<description><![CDATA[Recently found some very nice detailed videos on how to create mobile sites in CQ. Thanks for the OP for the videos. There are 4 videos in the series. http://www.youtube.com/watch?v=_1Q9MS7MBj0 http://www.youtube.com/watch?v=Qd6zojTpYkk http://www.youtube.com/watch?v=kt50HicMIn0 http://www.youtube.com/watch?v=lRuT6mDZqcw Of course the official Mobile page is located here Enjoy!]]></description>
				<content:encoded><![CDATA[<p>Recently found some very nice detailed videos on how to create mobile sites in CQ. Thanks for the OP for the videos.</p>
<p>There are 4 videos in the series.</p>
<ol>
<li><a title="Part One" href="http://www.youtube.com/watch?v=_1Q9MS7MBj0" target="_blank">http://www.youtube.com/watch?v=_1Q9MS7MBj0</a></li>
<li><a title="Part Two" href="http://www.youtube.com/watch?v=Qd6zojTpYkk" target="_blank">http://www.youtube.com/watch?v=Qd6zojTpYkk</a></li>
<li><a title="Part Three" href="http://www.youtube.com/watch?v=kt50HicMIn0" target="_blank">http://www.youtube.com/watch?v=kt50HicMIn0</a></li>
<li><a title="Part Four" href="http://www.youtube.com/watch?v=lRuT6mDZqcw" target="_blank">http://www.youtube.com/watch?v=lRuT6mDZqcw</a></li>
</ol>
<p>Of course the official Mobile page is located <a href="http://dev.day.com/docs/en/cq/current/wcm/mobile.html">here</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2013/04/02/how-to-create-a-mobile-site-in-cq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Marketing Webinar</title>
		<link>http://blogs.adobe.com/contentmanagement/2013/02/11/digital-marketing-webinar/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2013/02/11/digital-marketing-webinar/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 21:46:09 +0000</pubDate>
		<dc:creator>Oliver Choy</dc:creator>
				<category><![CDATA[Webinar]]></category>
		<category><![CDATA[Digital Marketing]]></category>
		<category><![CDATA[dispatcher caching strategies]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=291</guid>
		<description><![CDATA[Be sure to attend the Digital Marketing webinar that will discuss Adobe CQ dispatcher caching strategies. See the following link for more information: http://app.response.adobesystemsinc.com/e/es.aspx?s=1391&#38;e=131990&#38;elq=71157a507acc4e7c8c1aaf08d74220e7 &#160; To sign up for this webinar, click the following link: https://adobeformscentral.com/?f=wOfpVd6l9yvZGF%2AQy-MExw]]></description>
				<content:encoded><![CDATA[<p>Be sure to attend the Digital Marketing webinar that will discuss Adobe CQ dispatcher caching strategies. See the following link for more information:</p>
<p><a href="http://app.response.adobesystemsinc.com/e/es.aspx?s=1391&amp;e=131990&amp;elq=71157a507acc4e7c8c1aaf08d74220e7">http://app.response.adobesystemsinc.com/e/es.aspx?s=1391&amp;e=131990&amp;elq=71157a507acc4e7c8c1aaf08d74220e7</a></p>
<p>&nbsp;</p>
<p>To sign up for this webinar, click the following link:</p>
<p><a href="https://adobeformscentral.com/?f=wOfpVd6l9yvZGF%2AQy-MExw">https://adobeformscentral.com/?f=wOfpVd6l9yvZGF%2AQy-MExw</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2013/02/11/digital-marketing-webinar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add custom namespace in CRX</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/11/21/how-to-add-custom-namespace-in-crx/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/11/21/how-to-add-custom-namespace-in-crx/#comments</comments>
		<pubDate>Thu, 22 Nov 2012 04:31:54 +0000</pubDate>
		<dc:creator>Oliver Choy</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[CND file]]></category>
		<category><![CDATA[CRX]]></category>
		<category><![CDATA[Namespace]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=275</guid>
		<description><![CDATA[There are times when custom namespace is needed in a system for organization and management purposes. Without registering the namespace with CRX, properties with custom namespace would not be accepted. In this blog post I will talk about two ways of registering a namespace in CRX. To illustrate, let&#8217;s take a look at the behavior [...]]]></description>
				<content:encoded><![CDATA[<p>There are times when custom namespace is needed in a system for organization and management purposes. Without registering the namespace with CRX, properties with custom namespace would not be accepted. In this blog post I will talk about two ways of registering a namespace in CRX.</p>
<p>To illustrate, let&#8217;s take a look at the behavior of CRX without registering any namespace. Let me go ahead and enter a property that has namespace in it:</p>
<p><a class="lightbox" title="namespace_before_registering" href="http://blogs.adobe.com/contentmanagement/files/2012/11/namespace_before_registering.jpg"><img class="alignnone  wp-image-277" title="namespace_before_registering" src="http://blogs.adobe.com/contentmanagement/files/2012/11/namespace_before_registering.jpg" alt="" width="638" height="199" /></a></p>
<p>Upon saving, I would get the following error:</p>
<p><a class="lightbox" title="namespace_before_registering_result" href="http://blogs.adobe.com/contentmanagement/files/2012/11/namespace_before_registering_result.jpg"><img class="alignnone  wp-image-278" title="namespace_before_registering_result" src="http://blogs.adobe.com/contentmanagement/files/2012/11/namespace_before_registering_result.jpg" alt="" width="647" height="297" /></a></p>
<p>Now let&#8217;s proceed with registering the namespace. There are two ways of doing this:</p>
<p><strong><span style="text-decoration: underline;">Register namespace via CRX Console</span></strong></p>
<ol>
<li>Namespace can be added via Node Type Administration in CRX Console.</li>
<li>In the Node Type Administration window, click on &#8220;Namespaces&#8221; which is located at far right of the toolbar.<br />
<a class="lightbox" title="nodetypeadmin_toolbar" href="http://blogs.adobe.com/contentmanagement/files/2012/11/nodetypeadmin_toolbar.jpg"><img class="alignnone  wp-image-279" title="nodetypeadmin_toolbar" src="http://blogs.adobe.com/contentmanagement/files/2012/11/nodetypeadmin_toolbar.jpg" alt="" width="581" height="285" /></a></li>
<li> At the bottom of the Namespaces window, click on &#8220;New&#8221;.<br />
<a class="lightbox" title="nodetypeadmin_new_namespace" href="http://blogs.adobe.com/contentmanagement/files/2012/11/nodetypeadmin_new_namespace.jpg"><img class="alignnone  wp-image-280" title="nodetypeadmin_new_namespace" src="http://blogs.adobe.com/contentmanagement/files/2012/11/nodetypeadmin_new_namespace.jpg" alt="" width="478" height="358" /></a></li>
<li>Enter the URI and the Namespace mapping and click Ok. And you should see the namespace added:<br />
<a class="lightbox" title="nodetypeadmin_namespace_added" href="http://blogs.adobe.com/contentmanagement/files/2012/11/nodetypeadmin_namespace_added.jpg"><img class="alignnone  wp-image-281" title="nodetypeadmin_namespace_added" src="http://blogs.adobe.com/contentmanagement/files/2012/11/nodetypeadmin_namespace_added.jpg" alt="" width="466" height="223" /></a></li>
<li>Voila! It&#8217;s that easy. And now you can add the property again with the registered namespace:<br />
<a class="lightbox" title="namespace_property_added" href="http://blogs.adobe.com/contentmanagement/files/2012/11/namespace_property_added.jpg"><img class="alignnone  wp-image-282" title="namespace_property_added" src="http://blogs.adobe.com/contentmanagement/files/2012/11/namespace_property_added.jpg" alt="" width="598" height="183" /></a></li>
</ol>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>Register custom namespace via CND file</strong></span></p>
<ol>
<li>Namespace can also be registered via a CND file. The CND file can be deployed with any CRX packages (install folder, or via the package manager).</li>
<li>Once the package is installed on CRX, any namespaces in CND files found inside the package would be registered automatically.</li>
<li>Here&#8217;s the content of the CND file:

<div class="wp_syntax"><table><tr><td class="code"><pre class="txt" style="font-family:monospace;">&lt;demo='demo'&gt;</pre></td></tr></table></div>

</li>
<li>That&#8217;s it! It&#8217;s nothing more than a mapping=uri pair.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/11/21/how-to-add-custom-namespace-in-crx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prevent users from entering duplicate vanity URL&#8217;s</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/08/27/how-to-prevent-users-from-entering-duplicate-vanity-urls/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/08/27/how-to-prevent-users-from-entering-duplicate-vanity-urls/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 00:49:13 +0000</pubDate>
		<dc:creator>Kaushal Mall</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[cq]]></category>
		<category><![CDATA[cq duplicate vanity url]]></category>
		<category><![CDATA[cq vanity url]]></category>
		<category><![CDATA[prevent duplicate vanity url]]></category>
		<category><![CDATA[vanity url]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=249</guid>
		<description><![CDATA[This is something which should come very handy at every CQ implementation. The requirement for vanity URLs is that you cant have two pages in CQ with the same vanity URL. In this blog I will try to go over an implementation which will prevent your content authors from entering duplicate vanity URL in the [...]]]></description>
				<content:encoded><![CDATA[<p>This is something which should come very handy at every CQ implementation. The requirement for vanity URLs is that you cant have two pages in CQ with the same vanity URL. In this blog I will try to go over an implementation which will prevent your content authors from entering duplicate vanity URL in the first place.</p>
<p>1. First thing you will need to do is override the OOTB page component dialog and the tab_basic node. To do this, please copy the following nodes</p>
<ol>
<ul>
<li>/libs/foundation/components/page/dialog</li>
<li>/libs/foundation/components/page/tab_basic</li>
</ul>
</ol>
<p>2. Paste these nodes as the child of your projects page component whose &#8220;sling:resourceSuperType&#8221; is &#8220;foundation/components/page&#8221;</p>
<p><a class="lightbox" title="Screen Shot 2012-08-27 at 4.44.35 PM" href="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-4.44.35-PM.png"><img class="alignnone  wp-image-254" style="border: 1px solid black;" title="Screen Shot 2012-08-27 at 4.44.35 PM" src="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-4.44.35-PM-1024x176.png" alt="" width="590" height="143" /></a></p>
<p>&nbsp;</p>
<div>3. For the dialog node, change the path to the basic tab to match the path of the &#8220;tab_basic&#8221; you pasted in your projects page component.</div>
<div></div>
<div><a class="lightbox" title="dialog_tab_basic_node" href="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-4.50.20-PM.png"><img class="alignnone  wp-image-257" style="border: 1px solid black;" title="dialog_tab_basic_node" src="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-4.50.20-PM-1024x142.png" alt="" width="550" height="142" /></a></div>
<div></div>
<div>4. For the &#8220;tab_basic&#8221; node update the &#8220;tab_basic/items/vanity/items/vanityPath/fieldConfig&#8221; node to add the following two properties</div>
<div>
<ul>
<li>vtype</li>
<li>vtypeText</li>
</ul>
<div><a class="lightbox" title="tab_basic_vanity_vtype" href="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-4.56.50-PM.png"><img class="alignnone  wp-image-261" style="border: 1px solid black;" title="tab_basic_vanity_vtype" src="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-4.56.50-PM-1024x256.png" alt="" width="590" height="154" /></a></div>
</div>
<div></div>
<div>5. Override  the following in your apps folder</div>
<div>
<ul>
<li>/libs/cq/ui/widgets/js.txt</li>
<li>/libs/cq/ui/widgets/source/widgets</li>
</ul>
<div>6. To your overridden widgets directory at &#8220;/apps/cq/ui/widgets/source/widgets&#8221;, add a file called duplicateVanityCheck.js</div>
<div></div>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">CQ.<span style="color: #006633;">Ext</span>.<span style="color: #006633;">apply</span><span style="color: #009900;">&#40;</span>CQ.<span style="color: #006633;">Ext</span>.<span style="color: #006633;">form</span>.<span style="color: #006633;">VTypes</span>, <span style="color: #009900;">&#123;</span>
duplicateVanityCheck<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span>v, f<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>var dialog <span style="color: #339933;">=</span> f.<span style="color: #006633;">findParentByType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;dialog&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
var dialogPath <span style="color: #339933;">=</span> dialog.<span style="color: #006633;">path</span><span style="color: #339933;">;</span>
var cqresponse <span style="color: #339933;">=</span> CQ.<span style="color: #006633;">HTTP</span>.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/apps/duplicateVanityCheck?vanityPath=&quot;</span><span style="color: #339933;">+</span>v<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;&amp;amp;pagePath=&quot;</span><span style="color: #339933;">+</span>dialogPath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
var json <span style="color: #339933;">=</span> eval<span style="color: #009900;">&#40;</span>cqresponse<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
var vanitypathsjson <span style="color: #339933;">=</span> json.<span style="color: #006633;">responseText</span><span style="color: #339933;">;</span>
var JSONObj <span style="color: #339933;">=</span> JSON.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span>vanitypathsjson<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
var jsonVanityPath <span style="color: #339933;">=</span> JSONObj.<span style="color: #006633;">vanitypaths</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>jsonVanityPath.<span style="color: #006633;">length</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// check whether the path of the page where the vanity path is defined matches the dialog's path</span>
<span style="color: #666666; font-style: italic;">// which means that the vanity path is legal</span>
<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//alert( &quot;Checking Duplicate&quot; );</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p>7. In your overridden js.txt file, add this line</p>
<ul>
<li>widgets/duplicateVanityCheck.js</li>
</ul>
<p><a class="lightbox" title="cq-ui-widgets-js.txt" href="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-5.34.01-PM.png"><img class="alignnone  wp-image-265" title="cq-ui-widgets-js.txt" src="http://blogs.adobe.com/contentmanagement/files/2012/08/Screen-Shot-2012-08-27-at-5.34.01-PM.png" alt="" width="559" height="500" /></a></p>
<p>&nbsp;</p>
<p>8. You also need to make sure that your foundation client lib has a dependency on &#8220;cq.widgets&#8221;.</p>
<p>9. Now, we have to create an OSGi bundle that will query the JCR for an entered vanity and return the JSON that will be used by duplicateVanityCheck.js. The code for this class will look something like below</p>
</div>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * @scr.component immediate=&quot;true&quot; metatype=&quot;false&quot;
 * @scr.service interface=&quot;javax.servlet.Servlet&quot;
 * @scr.property name=&quot;sling.servlet.methods&quot; values.0=&quot;GET&quot;
 * @scr.property name=&quot;sling.servlet.paths&quot; values.1=&quot;/apps/duplicateVanityCheck&quot;
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> VanityDuplicateCheck <span style="color: #000000; font-weight: bold;">extends</span> SlingAllMethodsServlet<span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> Logger logger <span style="color: #339933;">=</span> LoggerFactory.<span style="color: #006633;">getLogger</span><span style="color: #009900;">&#40;</span>VanityDuplicateCheck.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    @Override
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">void</span> doGet<span style="color: #009900;">&#40;</span>SlingHttpServletRequest request, SlingHttpServletResponse response<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> ServletException, <span style="color: #003399;">IOException</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            Session session <span style="color: #339933;">=</span> request.<span style="color: #006633;">getResourceResolver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">adaptTo</span><span style="color: #009900;">&#40;</span>Session.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> vanityPath <span style="color: #339933;">=</span> request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;vanityPath&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">String</span> pagePath <span style="color: #339933;">=</span> request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;pagePath&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;vanity path parameter passed is {}&quot;</span>, vanityPath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;page path parameter passed is {}&quot;</span>, pagePath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
                QueryManager qm <span style="color: #339933;">=</span> session.<span style="color: #006633;">getWorkspace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getQueryManager</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">String</span> xpath <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;//element(*)[sling:vanityPath='&quot;</span><span style="color: #339933;">+</span> vanityPath <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;']&quot;</span><span style="color: #339933;">;</span>
                logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;xpath is {}&quot;</span>, xpath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                Query query <span style="color: #339933;">=</span> qm.<span style="color: #006633;">createQuery</span><span style="color: #009900;">&#40;</span>xpath, Query.<span style="color: #006633;">XPATH</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Xpath Query Statement is {}&quot;</span>, query.<span style="color: #006633;">getStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                QueryResult result <span style="color: #339933;">=</span> query.<span style="color: #006633;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                NodeIterator nodes <span style="color: #339933;">=</span> result.<span style="color: #006633;">getNodes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;result is &quot;</span>, result.<span style="color: #006633;">getNodes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                TidyJSONWriter tidyJSONWriter <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TidyJSONWriter<span style="color: #009900;">&#40;</span>response.<span style="color: #006633;">getWriter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                tidyJSONWriter.<span style="color: #006633;">object</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                tidyJSONWriter.<span style="color: #006633;">key</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;vanitypaths&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;text/html&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>nodes.<span style="color: #006633;">hasNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    Node node <span style="color: #339933;">=</span> nodes.<span style="color: #006633;">nextNode</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Node path is {}&quot;</span>, node.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Page path is {}&quot;</span>, pagePath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>node <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> node.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">contains</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/content&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                    <span style="color: #009900;">&#123;</span>
                        <span style="color: #666666; font-style: italic;">// check whether the path of the page where the vanity path is defined matches the dialog's path</span>
                        <span style="color: #666666; font-style: italic;">// which means that the vanity path is legal.</span>
                        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>node.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>pagePath<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                        <span style="color: #009900;">&#123;</span>
                            <span style="color: #666666; font-style: italic;">//do not add that to the list</span>
                            logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Node path is {}&quot;</span>, node.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            logger.<span style="color: #006633;">info</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Page path is {}&quot;</span>, pagePath<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                            tidyJSONWriter.<span style="color: #006633;">value</span><span style="color: #009900;">&#40;</span>node.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                tidyJSONWriter.<span style="color: #006633;">endArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                tidyJSONWriter.<span style="color: #006633;">endObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                response.<span style="color: #006633;">setCharacterEncoding</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>RepositoryException re<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                logger.<span style="color: #006633;">error</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Error in doGet&quot;</span>, re <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>JSONException e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            logger.<span style="color: #006633;">error</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;Error in doGet&quot;</span>, e <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>8. At this point you should have everything you need to prevent content authors from entering duplicate vanity URL&#8217;s. If they do enter a URL that is already in use, it will fail the validation and they will see an error message similar to what you entered in the vtypeText property.</p>
<p>&nbsp;</p>
<p>Enjoy..and as always, please leave comments/questions and I will try to answer them as soon as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/08/27/how-to-prevent-users-from-entering-duplicate-vanity-urls/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CQ Selector driven results page</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/08/19/cq-selector-driven-results-page/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/08/19/cq-selector-driven-results-page/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 05:32:55 +0000</pubDate>
		<dc:creator>Oliver Choy</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[component property filtering]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[sling selector]]></category>
		<category><![CDATA[sort by property]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=237</guid>
		<description><![CDATA[In this article I would like to talk about CQ pages where content is based on the Sling selectors. Recently I have worked on a simple requirement for a customer project where a page would have a drop-down (or multiple) menu to filter certain types of content. In the demo below I have a simple [...]]]></description>
				<content:encoded><![CDATA[<p>In this article I would like to talk about CQ pages where content is based on the Sling selectors. Recently I have worked on a simple requirement for a customer project where a page would have a drop-down (or multiple) menu to filter certain types of content. In the demo below I have a simple set of Adobe products where I want to be able to filter by the product name and/or the product version. Let&#8217;s check out the demo first (focus on the selection and the URL changes):</p>
<p><a title="Video Overlay" href="http://blogs.adobe.com/contentmanagement/files/2012/08/selector_driven_content.swf"><img class="alignnone size-full wp-image-88" title="Selector driven content demo" src="http://blogs.adobe.com/contentmanagement/files/2011/12/video_play_overlay-e1322727414473.png" alt="" width="200" height="128" /></a></p>
<p><a href="http://blogs.adobe.com/contentmanagement/files/2012/08/selector_driven_content.swf">Selector driven content demo</a></p>
<p>As you can see from the quick demo. Dropdown selection would trigger a URL redirection where content is filtered based on the sling selector. For example:</p>
<p>products.illustrator.all.html displays only Adobe Illustrator products, all versions.<br />
products.illustrator.cs4.html displays only the Adobe Illustrator CS4 product.<br />
products.photoshop.cs6.html displays only the Adobe Photoshop CS6 product.<br />
&#8230;so on and so on&#8230;</p>
<p>And for demo purposes, we have created pages with a Product component with the following fields:</p>
<p><a class="lightbox" title="Product component dialog" href="http://blogs.adobe.com/contentmanagement/files/2012/08/product_dialog.jpg"><img class="alignnone  wp-image-239" title="Product component dialog" src="http://blogs.adobe.com/contentmanagement/files/2012/08/product_dialog.jpg" alt="" width="453" height="255" /></a></p>
<p>Now let&#8217;s get to see how the filtering works. Here I will provide code pertaining to the sling selector processing and query only.</p>
<p>Sling selector processing (Pagination also factored in):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #666666; font-style: italic;">// page number should be request param not selector</span>
    <span style="color: #000066; font-weight: bold;">int</span> pageNum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;page&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
            pageNum <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Integer</span><span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;page&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">intValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">NumberFormatException</span> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>pageNum  <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// if product and version present</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>selectors.<span style="color: #006633;">length</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            selectedProduct <span style="color: #339933;">=</span> selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            selectedVersion <span style="color: #339933;">=</span> selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>selectors.<span style="color: #006633;">length</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equalsIgnoreCase</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cs4&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> selectedVersion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cs4&quot;</span><span style="color: #339933;">;</span>    
            <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equalsIgnoreCase</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cs5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> selectedVersion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cs5&quot;</span><span style="color: #339933;">;</span>    
            <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equalsIgnoreCase</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cs6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> selectedVersion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;cs6&quot;</span><span style="color: #339933;">;</span>     
            <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>productsMap.<span style="color: #006633;">containsKey</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#41;</span> selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                selectedProduct <span style="color: #339933;">=</span> selectors<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                selectedProduct <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #339933;">;</span>
                selectedVersion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            selectedProduct <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #339933;">;</span>
            selectedVersion <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The above code would determine the product and the version selected by the user (since they are passed in the URL). And once we have the product, version determined, we can run the following query and display the results in tabular format just like in the demo:</p>
<p>&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;">    QueryBuilder builder <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    Map<span style="color: #339933;">&lt;</span><span style="color: #003399;">String</span>, Object<span style="color: #339933;">&gt;</span> map <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    Query query <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">SearchResult</span> result <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
    map <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HashMap<span style="color: #339933;">&lt;</span><span style="color: #003399;">String</span>, Object<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;path&quot;</span>, <span style="color: #0000ff;">&quot;/content/demo/en/products&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;type&quot;</span>,<span style="color: #0000ff;">&quot;cq:Page&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;1_property&quot;</span>,<span style="color: #0000ff;">&quot;jcr:content/cq:template&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;1_property.value&quot;</span>,<span style="color: #0000ff;">&quot;/apps/demo/templates/productspage&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// query only productspage</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;2_property&quot;</span>,<span style="color: #0000ff;">&quot;jcr:content/par_main/product/sling:resourceType&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// query for pages with product component</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;2_property.value&quot;</span>,<span style="color: #0000ff;">&quot;demo/components/content/product&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>selectedProduct.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>selectedVersion.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;3_property&quot;</span>,<span style="color: #0000ff;">&quot;jcr:content/par_main/product/category&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;3_property.value&quot;</span>,selectedProduct<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;4_property&quot;</span>,<span style="color: #0000ff;">&quot;jcr:content/par_main/webinar/productVersion&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;4_property.value&quot;</span>,selectedVersion<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>selectedProduct.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;3_property&quot;</span>,<span style="color: #0000ff;">&quot;jcr:content/par_main/product/category&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;3_property.value&quot;</span>,selectedProduct<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>selectedVersion.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;all&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;3_property&quot;</span>,<span style="color: #0000ff;">&quot;jcr:content/par_main/product/productVersion&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;3_property.value&quot;</span>,selectedVersion<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;5_orderby&quot;</span>,<span style="color: #0000ff;">&quot;@jcr:content/par_main/product/category&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;5_orderby.sort&quot;</span>,<span style="color: #0000ff;">&quot;asc&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;6_orderby&quot;</span>,<span style="color: #0000ff;">&quot;@jcr:content/jcr:title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;6_orderby.sort&quot;</span>,<span style="color: #0000ff;">&quot;asc&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
&nbsp;
    builder <span style="color: #339933;">=</span> resource.<span style="color: #006633;">getResourceResolver</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">adaptTo</span><span style="color: #009900;">&#40;</span>QueryBuilder.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    query <span style="color: #339933;">=</span> builder.<span style="color: #006633;">createQuery</span><span style="color: #009900;">&#40;</span>PredicateGroup.<span style="color: #006633;">create</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#41;</span>, currentNode.<span style="color: #006633;">getSession</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    query.<span style="color: #006633;">setStart</span><span style="color: #009900;">&#40;</span>startIndex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    query.<span style="color: #006633;">setHitsPerPage</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    result <span style="color: #339933;">=</span> query.<span style="color: #006633;">getResult</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And the above queries for pages that are using the product template, with a product component in it, and filter by either product category or the version if they are passed in.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/08/19/cq-selector-driven-results-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to integrate with other web services without creating OSGi packages</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/08/19/how-to-integrate-with-other-web-services-without-creating-osgi-packages/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/08/19/how-to-integrate-with-other-web-services-without-creating-osgi-packages/#comments</comments>
		<pubDate>Sun, 19 Aug 2012 18:21:49 +0000</pubDate>
		<dc:creator>Oliver Choy</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[component dialog]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=222</guid>
		<description><![CDATA[A lot of enterprise grade systems require some sort of integration with other services these days, to extend and bring in more features into the systems. In this blog post I would like to show a quick and easy way to integrate CQ5 with other web services. Examples below will be showing a RESTful webservice [...]]]></description>
				<content:encoded><![CDATA[<p>A lot of enterprise grade systems require some sort of integration with other services these days, to extend and bring in more features into the systems. In this blog post I would like to show a quick and easy way to integrate CQ5 with other web services. Examples below will be showing a RESTful webservice but other webservices like SOAP will take similar approach.</p>
<p>Webservices integration usually involves building a integration layer. A Java Servlet would definitely be a good candidate. But to avoid building / compiling / packaging / deploying such code into an OSGi container, one can easily write a JSP (on the fly) in CQ to handle the integration.</p>
<p>Create an integration layer page:</p>
<p><a class="lightbox" title="Console: Integration Demo Page" href="http://blogs.adobe.com/contentmanagement/files/2012/08/website_console.jpg"><img class="alignnone  wp-image-223" title="Console: Integration Demo Page" src="http://blogs.adobe.com/contentmanagement/files/2012/08/website_console.jpg" alt="" width="598" height="281" /></a></p>
<p>This integration page is basically to create an instance of a CQ Page so that the rest of the content pages can communicate to it (Things under /app are not exposed or cannot be called directly). And extra benefit about this CQ Page -&gt; You can control who has access to it!</p>
<p>Note the above page is using &#8220;Demo &#8211; API Page Template&#8221;, and here is the mapping:</p>
<p><a class="lightbox" title="Integration Demo API Template mapping" href="http://blogs.adobe.com/contentmanagement/files/2012/08/integration_api_template_mapping.jpg"><img class="alignnone  wp-image-224" title="Integration Demo API Template mapping" src="http://blogs.adobe.com/contentmanagement/files/2012/08/integration_api_template_mapping.jpg" alt="" width="634" height="178" /></a></p>
<p>&nbsp;</p>
<p>And apipage.jsp is nothing more than what you want to surface in a typical Servlet.  Here is snippet of the code:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;action&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;action&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;getSomething&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        Node demoNode <span style="color: #339933;">=</span> resourceResolver.<span style="color: #006633;">getResource</span><span style="color: #009900;">&#40;</span>INTEGRATION_DESIGN_NODEPATH<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">adaptTo</span><span style="color: #009900;">&#40;</span>Node.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        out.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>getSomething<span style="color: #009900;">&#40;</span>demoNode<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;action&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;getCategories&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        Node demoNode <span style="color: #339933;">=</span> resourceResolver.<span style="color: #006633;">getResource</span><span style="color: #009900;">&#40;</span>INTEGRATION_DESIGN_NODEPATH<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">adaptTo</span><span style="color: #009900;">&#40;</span>Node.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        out.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>getCategories<span style="color: #009900;">&#40;</span>demoNode<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;action&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;getFields&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>
            request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;param1&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>
            request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;param2&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        out.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>getFields<span style="color: #009900;">&#40;</span>
            request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;param1&quot;</span><span style="color: #009900;">&#41;</span>,
            request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;param2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        response.<span style="color: #006633;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        out.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;{<span style="color: #000099; font-weight: bold;">\&quot;</span>error<span style="color: #000099; font-weight: bold;">\&quot;</span>:<span style="color: #000099; font-weight: bold;">\&quot;</span>error<span style="color: #000099; font-weight: bold;">\&quot;</span>}&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p>And derived from the above, we now have the following links to retrieve data:</p>
<p>http://_server_:_port_/content/integrationdemo/en/integration/integrationapi?action=getSomething</p>
<p>http://_server_:_port_/content/integrationdemo/en/integration/integrationapi?action=getCategories</p>
<p>http://_server_:_port_/content/integrationdemo/en/integration/integrationapi?action=getFields&#038;param1=test&#038;param2=data</p>
<p>&nbsp;</p>
<p>The integration implementation will be per your requirements, but at a high level you can pretty much do everything-in-a-servlet inside a JSP. JSPs are Servlets after all. Here is a snippet of a http call (to a webservice) inside the same JSP:</p>
<p>&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">String</span> getFields<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> apiKey, <span style="color: #003399;">String</span> accessToken, <span style="color: #003399;">String</span> someJson<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    HttpClient httpClient <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HttpClient<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    HttpClientParams httpClientParams <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HttpClientParams<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    DefaultHttpMethodRetryHandler defaultHttpMethodRetryHandler <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DefaultHttpMethodRetryHandler<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    httpClientParams.<span style="color: #006633;">setParameter</span><span style="color: #009900;">&#40;</span>HttpClientParams.<span style="color: #006633;">RETRY_HANDLER</span>, defaultHttpMethodRetryHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    httpClient.<span style="color: #006633;">setParams</span><span style="color: #009900;">&#40;</span>httpClientParams<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    PostMethod post <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PostMethod<span style="color: #009900;">&#40;</span>EXTERNAL_WEBSERVICE_API_URL<span style="color: #339933;">+</span>apiKey.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;/URL_EXAMPLE/test?oauth_token=&quot;</span><span style="color: #339933;">+</span>accessToken.<span style="color: #006633;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    post.<span style="color: #006633;">addRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Accept&quot;</span>, <span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    post.<span style="color: #006633;">addRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type&quot;</span>, <span style="color: #0000ff;">&quot;application/json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    post.<span style="color: #006633;">setRequestBody</span><span style="color: #009900;">&#40;</span>someJson<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
        httpClient.<span style="color: #006633;">executeMethod</span><span style="color: #009900;">&#40;</span>post<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">String</span> result <span style="color: #339933;">=</span> post.<span style="color: #006633;">getResponseBodyAsString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>result <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #339933;">!</span>result.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            JSONObject returnObj <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JSONObject<span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> returnObj.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> ex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> ex.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>   
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p>And finally, as an option (if you want to integration the CQ authoring experience with an external webservice), you can expose the data retrieved inside a CQ Component dialog field, you will need to configure the widget to retrieve webservice data. Details are documented in:</p>
<p><a href="http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.Selection">http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.Selection</a></p>
<p>Here&#8217;s a quick example:</p>
<p><a class="lightbox" title="Integration Demo Dialog Options configuration" href="http://blogs.adobe.com/contentmanagement/files/2012/08/demo_options.jpg"><img class="alignnone  wp-image-232" title="Integration Demo Dialog Options configuration" src="http://blogs.adobe.com/contentmanagement/files/2012/08/demo_options.jpg" alt="" width="625" height="196" /></a></p>
<p>And the result:</p>
<p><a class="lightbox" title="Integration Demo Dialog" href="http://blogs.adobe.com/contentmanagement/files/2012/08/demo_dialog.jpg"><img class="alignnone  wp-image-233" title="Integration Demo Dialog" src="http://blogs.adobe.com/contentmanagement/files/2012/08/demo_dialog.jpg" alt="" width="514" height="288" /></a></p>
<p>&nbsp;</p>
<p>Enjoy~</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/08/19/how-to-integrate-with-other-web-services-without-creating-osgi-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix CRXDE performance issues</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/06/06/how-to-fix-crxde-performance-issues/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/06/06/how-to-fix-crxde-performance-issues/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 18:26:10 +0000</pubDate>
		<dc:creator>Kaushal Mall</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CRXDE]]></category>
		<category><![CDATA[CRXDE performance]]></category>
		<category><![CDATA[CRXDE too slow]]></category>
		<category><![CDATA[CRXDE wont open]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=217</guid>
		<description><![CDATA[Is CRXDE too slow or is not loading at all? Try these steps below to possibly fix the issue. Make sure the crxde:paths property doesn&#8217;t include anything that you dont want to load in CRXDE. Open the Content Explorer and browse to /etc/crxde/profiles/default, on the right hand panel there will be the crxde:paths property, this defines [...]]]></description>
				<content:encoded><![CDATA[<p>Is CRXDE too slow or is not loading at all? Try these steps below to possibly fix the issue.</p>
<p>Make sure the crxde:paths property doesn&#8217;t include anything that you dont want to load in CRXDE.</p>
<ul>
<li>Open the Content Explorer and browse to /etc/crxde/profiles/default, on the right hand panel there will be the crxde:paths property, this defines what nodes CRXDE will try to load. Having nodes like /content will make it slow/unresponsive.</li>
</ul>
<p>Locate and open the CRXDE.ini file and assign more memory to CRXDE.</p>
<ul>
<li>On OSX right click on CRXDE.app and select Show Package Contents.</li>
<li>Browse to Contents/MacOS</li>
<li>Open the CRXDE.ini file and change the values for Xms, Xmx and the MaxPermSize to suit your needs and what your system will support.</li>
</ul>
<p>Delete the .crxde folder</p>
<ul>
<li>CRXDE created a hidden .crxde folder under the users home directory.</li>
<li>Delete that folder</li>
</ul>
<p>Start CRXDE from command line.</p>
<ul>
<li>Open -a CRXDE &#8211;args -clean (This is for OSX only)</li>
</ul>
<p>Hope this helps. Please leave a comment/question and I will try to answer them as soon as I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/06/06/how-to-fix-crxde-performance-issues/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to track CQ component clicks in SiteCatalyst</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/05/19/how-to-track-cq-component-clicks-in-sitecatalyst/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/05/19/how-to-track-cq-component-clicks-in-sitecatalyst/#comments</comments>
		<pubDate>Sat, 19 May 2012 21:21:45 +0000</pubDate>
		<dc:creator>Oliver Choy</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[clickstreamcloud]]></category>
		<category><![CDATA[component tracking]]></category>
		<category><![CDATA[SiteCatalyst]]></category>
		<category><![CDATA[traffic variable]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=199</guid>
		<description><![CDATA[When SiteCatalyst&#8217;s tracking is enabled on a site, the overall site traffic and page-to-page traffic tracking is pretty much given and administrators usually do not have to do anything. But one of the requirements that most companies desire is the component tracking capability &#8211; to be able to tell which component on a page the [...]]]></description>
				<content:encoded><![CDATA[<p>When SiteCatalyst&#8217;s tracking is enabled on a site, the overall site traffic and page-to-page traffic tracking is pretty much given and administrators usually do not have to do anything. But one of the requirements that most companies desire is the component tracking capability &#8211; to be able to tell which component on a page the users are coming from. Here&#8217;s a typical scenario:</p>
<ul>
<li>A featured article is displayed inside a Slideshow or teaser type component on a page, e.g. http://www.example.com/home.html.</li>
<li>The same featured article is displayed inside another component (e.g. Spotlight component) on the same page &#8211; http://www.example.com/home.html</li>
</ul>
<p>Requirement:</p>
<ul>
<li>To be able to track traffic at component level.</li>
</ul>
<p>In order to do this, two SiteCatalyst variables will need to be introduced:</p>
<ul>
<li>A variable on tracking what components are &#8220;clicked from&#8221;. In this example I named the variable &#8220;Clicked From Component&#8221;.</li>
<li>A variable on tracking what pages the components lead to, or &#8220;clicked to&#8221;. In this example I named the variable &#8220;Clicked To Page&#8221;.</li>
</ul>
<p><a class="lightbox" title="SiteCatalyst component traffic variables" href="http://blogs.adobe.com/contentmanagement/files/2012/05/sitecatalyst_traffic_variables.jpg"><img class="alignnone  wp-image-200" title="SiteCatalyst component traffic variables" src="http://blogs.adobe.com/contentmanagement/files/2012/05/sitecatalyst_traffic_variables.jpg" alt="" width="463" height="46" /></a></p>
<p>And it is critical to set up a correlation between these two variables:</p>
<p><a class="lightbox" title="SiteCatalyst component tracking variables correlation" href="http://blogs.adobe.com/contentmanagement/files/2012/05/sitecatalyst_correlation.jpg"><img class="alignnone  wp-image-201" title="SiteCatalyst component tracking variables correlation" src="http://blogs.adobe.com/contentmanagement/files/2012/05/sitecatalyst_correlation.jpg" alt="" width="597" height="123" /></a></p>
<p><span style="text-decoration: underline;"><strong>On to CQ:</strong></span></p>
<p>On the CQ side, components will need to be customized to pass the variables onto the &#8220;clicked to&#8221; page so traffic can be tracked. For instance, links can be modified to have additional parameters like the following:</p>
<p><em>http://server:port/news/2012/5/component-tracking-example.html?trackFrom=Spotlight</em></p>
<p>And on pages that should be tracked, the following code can be inserted to surface the variables inside CQ&#8217;s clickstreamcloud:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;trackFrom&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">String</span> trackFromComponent <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#41;</span> request.<span style="color: #006633;">getParameter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;trackFrom&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #339933;">%&gt;</span>
        <span style="color: #339933;">&lt;</span>span record<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;'trackComponent',{'clickedFrom':'&lt;%=trackFromComponent%&gt;','clickedTo':'&lt;%=request.getRequestURL()%&gt;'}&quot;</span><span style="color: #339933;">&gt;&lt;/</span>span<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;%</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p>Then these parameters will be surfaced inside CQ&#8217;s clickstreamcloud:</p>
<p><a class="lightbox" title="Clickstreamcloud component tracking" href="http://blogs.adobe.com/contentmanagement/files/2012/05/clickstreamcloud.jpg"><img class="alignnone  wp-image-205" title="Clickstreamcloud component tracking" src="http://blogs.adobe.com/contentmanagement/files/2012/05/clickstreamcloud.jpg" alt="" width="391" height="384" /></a></p>
<p>To map these events to SiteCatalyst variables, (after traffic variables setup in SiteCatalyst), simply Edit the clickstreamcloud and map the following events to variables:</p>
<ul>
<li>clickedFrom &#8211; &#8220;Clicked From Component&#8221;</li>
<li>clickedTo &#8211; &#8220;Clicked To Page&#8221;</li>
</ul>
<p>&nbsp;</p>
<p><a class="lightbox" title="Clickstreamcloud event mapping" href="http://blogs.adobe.com/contentmanagement/files/2012/05/clickstreamcloud_event_spotlight.jpg"><img class="alignnone  wp-image-206" title="Clickstreamcloud event mapping" src="http://blogs.adobe.com/contentmanagement/files/2012/05/clickstreamcloud_event_spotlight.jpg" alt="" width="347" height="304" /></a></p>
<p>&nbsp;</p>
<p>Once all the above is done, you may click around and start viewing the &#8220;Clicked From Component&#8221; report in SiteCatalyst. And to view how components are &#8220;clicked to&#8221; certain pages, the correlation report surface that very nicely.</p>
<p><span style="text-decoration: underline;">Clicked From Component Report</span></p>
<p><a class="lightbox" title="clicked from component report" href="http://blogs.adobe.com/contentmanagement/files/2012/05/clicked-from-component-report.jpg"><img class="alignnone  wp-image-208" title="clicked from component report" src="http://blogs.adobe.com/contentmanagement/files/2012/05/clicked-from-component-report.jpg" alt="" width="603" height="461" /></a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;">Correlation Report</span></p>
<p><a class="lightbox" title="correlation report" href="http://blogs.adobe.com/contentmanagement/files/2012/05/correlation-report.jpg"><img class="alignnone  wp-image-209" title="correlation report" src="http://blogs.adobe.com/contentmanagement/files/2012/05/correlation-report.jpg" alt="" width="600" height="502" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/05/19/how-to-track-cq-component-clicks-in-sitecatalyst/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to downsize OOTB DAM&#8217;s web rendition</title>
		<link>http://blogs.adobe.com/contentmanagement/2012/05/19/how-to-downsize-ootb-dams-web-rendition/</link>
		<comments>http://blogs.adobe.com/contentmanagement/2012/05/19/how-to-downsize-ootb-dams-web-rendition/#comments</comments>
		<pubDate>Sat, 19 May 2012 19:36:07 +0000</pubDate>
		<dc:creator>Oliver Choy</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[DAM]]></category>
		<category><![CDATA[DAM update asset]]></category>
		<category><![CDATA[web enabled rendition]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/contentmanagement/?p=190</guid>
		<description><![CDATA[By default, upon image upload to CQ&#8217;s Digital Asset Management, a &#8220;DAM Update Asset&#8221; workflow would be triggered and one of the many processes inside the workflow is to generate a web rendition of the uploaded image. And the default setting of CQ&#8217;s Image API is to always render the web-enabled version of the uploaded [...]]]></description>
				<content:encoded><![CDATA[<p>By default, upon image upload to CQ&#8217;s Digital Asset Management, a &#8220;DAM Update Asset&#8221; workflow would be triggered and one of the many processes inside the workflow is to generate a web rendition of the uploaded image. And the default setting of CQ&#8217;s Image API is to always render the web-enabled version of the uploaded image. This combination helps to limit the size and the quality of the image displayed thus reducing the page load time.</p>
<p>The OOTB setting for the web-enabled image dimensions is set to 1280 pixels by 1280 pixels. And the image quality is set to reduce to 90%. To change this setting, browse to CQ&#8217;s workflow console and select the &#8220;DAM Update Asset&#8221; workflow under the Models tab:</p>
<p><a class="lightbox" title="workflow console dam update asset selected" href="http://blogs.adobe.com/contentmanagement/files/2012/05/dam_update_asset_workflow.jpg"><img class="alignnone  wp-image-191" title="workflow console dam update asset selected" src="http://blogs.adobe.com/contentmanagement/files/2012/05/dam_update_asset_workflow.jpg" alt="" width="602" height="375" /></a></p>
<p>Inside the workflow model, select the Web enabled rendition step:</p>
<p><a class="lightbox" title="DAM update asset workflow web enabled selected" href="http://blogs.adobe.com/contentmanagement/files/2012/05/dam_update_asset_workflow_detail.jpg"><img class="alignnone  wp-image-192" title="DAM update asset workflow web enabled selected" src="http://blogs.adobe.com/contentmanagement/files/2012/05/dam_update_asset_workflow_detail.jpg" alt="" width="288" height="454" /></a></p>
<p>Then adjust the settings accordingly. In my example below, I have set the maximum dimension to be 640pixel by 640pixel. I have also reduced the quality of the images to 80%:</p>
<p><a class="lightbox" title="web enabled rendition workflow step" href="http://blogs.adobe.com/contentmanagement/files/2012/05/web_enabled_rendition_step.jpg"><img class="alignnone  wp-image-193" title="web enabled rendition workflow step" src="http://blogs.adobe.com/contentmanagement/files/2012/05/web_enabled_rendition_step.jpg" alt="" width="475" height="261" /></a></p>
<p>&nbsp;</p>
<p>Preliminary testing shows that file sizes of this setting (in comparison with the OOTB 1280px by 1280px; 90% quality setting) is reduced by a third, while difference in image quality is minimal. YMMV, please adjust your settings accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/contentmanagement/2012/05/19/how-to-downsize-ootb-dams-web-rendition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
