Customize Content Finder Searches
I've recently inherited development on a CQ 5.5 instance. Part of this site is a custom asset management wrapper around the DAM. As part of that asset management, we set a particular property on assets that indicates they are populated with required metadata. We have the requirement that only assets that have this property set to true should be visible in the content finder. Before I started working on this, custom content finder tabs had been developed that link to servlets that enforce this requirement of the "populated" property being true. However, the default tabs (i.e. Images, Documents, etc.) have no knowledge of this of course. I'm trying to figure out the easiest way to add support for this requirement to the default tabs. The one thing I have tried, which did not appear to work, was to overlay the images tab and add additional baseParams values, like the following:
}, { "baseParams": { /*"defaultMimeType": "image"*/ "mimeType": "image", "1_property": "jcr:content/metadata/populated", "1_property_value": true } })I've also noticed that these tabs post to "/bin/wcm/contentfinder/asset/view.json/content/dam", which maps to com.day.cq.wcm.core.impl.servlets.contentfinder.AssetViewHandler. Another thought I had was to write my own handler that extends AssetViewHandler, whose doGet() method takes a Predicate as a parameter, and simply add my own predicate and call super.doGet(). Then I could overlay all the default tabs and change the url value to point at my handler. I'm not sure if that's even possible however. I'm hoping someone has done this before and can offer some advice. Thank you.