AEM

Advanced AEM Search: Consuming External Content and Enriching Content with Apache Camel

I had the pleasure of speaking at CIRCUIT 2016 on a new architecture for indexing AEM content and external content using ActiveMQ, Apache Camel and Solr. My slides are available on SlideShare. The demo code for indexing both products and AEM content are available on GitHub

Initially, I had planned for a rather ambitious demo, but ran out of time during the talk. As such, I recorded a fairly lengthy video which is available on Youtube or inline below.

A big thank you to all the attendees and conference coordinators!

AEM Solr Search 2.0.0

We just released AEM Solr Search 2.0.0. This is the first major release since I gave my talk at adaptTo(). Checkout the following links to get you started:

  1. AEM Solr Search Wiki. This is the new source of truth for our documentation.
  2. AEM Solr Search 2.0.0 demo on Youtube.

We hope you enjoy the new release. Drop us a line at aemsolr@headwire.com if you need help with your AEM / Solr integration.

In our next release, expect document processing support and integration with a product catalog. This release will coincide with my talk at CIRCUIT in July:  Advanced AEM Search - Consuming External Content and Enriching Content with Apache Camel.

AEM 6 and Classic UI Mode

Well fellow AEM 6 developers, I have another tiny AEM gem for you. Are you currently working on an AEM 6 project but are only targeting the Classic UI? If so, here are two quick OSGi configuration changes that will keep you within the Classic UI interface.

To configure Classic UI as the default mode for AEM 6, configure the WCM Authoring UI Mode Service in the Felix console. Simply change the default authoring UI mode from TOUCH to CLASSIC

I am not a fan of runtime changes in the Felix console, so I recommend creating a run mode for your application. Your run mode should be define in /apps/<your application>/config/com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.xml and should look as follows:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
    xmlns:jcr="http://www.jcp.org/jcr/1.0"    jcr:primaryType="sling:OsgiConfig"
    authoringUIModeService.default="CLASSIC"
    authoringUIModeService.editorUrl.classic="/cf#"
    authoringUIModeService.editorUrl.touch="/editor.html"
    />

I also recommend changing the default root mapping so that content authors are directed to the Welcome screen following login. As before, create a run mode for your application at /apps/<your application>/config/com.day.cq.commons.servlets.RootMappingServlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
    xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig"
    rootmapping.target="/welcome.html" />

I hope this helps!

AEM 6 and getServiceResourceResolver()

For those of you fortunate to work on an AEM 6 project, I am sure that you are starting to discover those subtle differences between AEM 5.x and 6.x. Well, I discovered my first painful difference while moving from ResourceResolverFactory.getAdministrativeResourceResolver() to ResourceResolverFactory.getServiceResourceResolver(). Other than the new requirement to configure Apache Sling Service User Mapper Service, the big difference is that you can't use the returned ResourceResolver for long running services anymore. If you do, you end up with a ResourceResolver that has a view of the repository at the time when the resource resolver was created. When switching over to ResourceResolverFactory.getServiceResourceResolver(), remember to close your resource resolver as soon as you're finished with it. 

The Javadocs indicate this, but in my experience most developers rarely take the time to read the documentation.

 

AEM/CQ Reverse Engineering Demystified

Have you ever struggled to find out how to implement a particular feature for Adobe AEM/CQ? Did your attempt to find what you needed on Google or discussion groups fail? In your gut, do you know it's possible to implementation the feature since AEM performs a very similar operation? If you answered yes to any of these questions, some degree for reverse engineering may do the trick.

Read More