Posted in Developer

Using XMLBeans in Adobe CQ

Apache XMLBeans is a powerful tool for reading, writing and updating XML files.  XMLBeans dynamically creates Java classes based on an XSD Schema.  This makes it powerful and easy to use, however can make it more complicated to integrate into OSGi based applications, such as Adobe CQ, as the XML Element to Java Class mapping uses the Java Classloader.
This guide shows you how to integrate XMLBeans in your Adobe CQ application.

Step 1: Install XMLBeans Bundle
Download and install org.apache.servicemix.bundles.xmlbeans-2.4.0_5.jar.  This JAR was created by the Apache ServiceMix project to wrap XMLBeans in a OSGi Bundle.  The easiest way to automatically deploy the jar into Adobe CQ is to include it in the install folder of your application.  You can also use the Felix console to deploy …

CQ Project Planning: Development Strategy

Several questions come up to me consistently while I move from client to client as a technical PM or solution architect. I felt compelled to list my responses to these questions so that you ask yourself the same questions every time you approach a new CQ5 project. MY response questions often lead to longer brainstorming sessions. Here are a few situations.

Components

Initial Topic:

What gets “componentized” versus consumed, integrated or remain separated with regard to CQ5?

My Response:

How reusable is this functionality?
What is the current life-cycle of this development? How frequently is it changed?
How modular does this need to be?
Will this functionality be replaced by another CQ effort running in parallel?
Do authors need to interact with it and set parameters and variables that customize it for that given …

Creating OSGi bundles for the Adobe Digital Marketing Suite using CRXDE

You can create an OSGi bundle that can be used within the Adobe Digital Marketing Suite by using CDXDE. An OSGi bundle is essentially a Java module that contains application logic that meets your business requirements. An OSGi bundle lets you dynamical…

Unit Testing in Adobe/Day/CQ5

There are a two approaches to effectively test your code in CQ5 – either outside of CQ5 using standard unit tests instantiated from your build tool (i.e. maven). While this approach will cover most simple functionality, the need will quickly arise to execute unit tests within CQ5/Sling/OSGi. Testing outside of CQ5 In addition to your […]

Integrating the JQuery Framework into DAY CQ

You can integrate the JQuery Framework into DAY CQ (5.4) thereby enabling you to build components that take advantage of the JQuery framework. The JQuery framework is a popular JavaScript library that simplifies the creation of powerful components. For…

Escaping xpath queries

node name in xpath query cannot start with numbers:
https://issues.apache.org/jira/browse/JCR-579

So, use org.apache.jackrabbit.util.ISO9075 as shown in:
http://wiki.apache.org/jackrabbit/EncodingAndEscaping

Example xpath servlet (/apps/sandbox/xpath…

Programmatically Accessing Adobe CQ Content using the JCR API

You can programmatically modify nodes and properties located within the Adobe CQ 5.5 repository, which is part of the Adobe Digital Marketing Suite. To access the CQ repository, you use the Java Content Repository (JCR) API. You can use the Java JCR AP…


Copyright © 2012 Adobe Systems Incorporated. All rights reserved.
Terms of Use | Privacy Policy and Cookies (Updated)