CQ Tips and Tricks #2 – Handy Urls

This is by no means an exhaustive list of all the handy URL’s found in the CQ 5.5 – 5.6 platform.  This is my short list of clipboard handy URLS.

URLS

/crx/explorer/index.jsp  – CRX explorer

/crx/de/index.jsp – CRXDE Lite url

/libs/cq/search/content/querydebug.html – Query debug tool

/libs/granite/security/content/admin.html – New user manager standalone ui  [5.6 only?]

/libs/cq/contentsync/content/console.html – Content sync console

/system/console/bundles – Felix web admin console

/system/console/jmx/com.adobe.granite.workflow%3Atype%3DMaintenance – Felix web admin console JMX / Workflow maintenance tasks

/system/console/jmx/com.adobe.granite%3Atype%3DRepository – Felix web admin console JMX / Repository maintenance tasks

/system/console/depfinder – This new 5.6 tool will help you figure out what package exports a class and also prints a Maven Dependency for the class.

/libs/granite/ui/content/dumplibs.rebuild.html?rebuild=true – Helpful link for debugging caching problems. Wipes the clientlibs and designs and forces it to rebuild it. Thanks to Mark Ellis for this link.

/system/console/adapters – This link shows you the Adapters are registered in the system. This helps you figure out what you can adaptTo() from resource to resource.

/libs/cq/compat/components/ntupgrade.html – This link allows you to update Node Types in the system. Thanks Tamer.

https://www.adobeaemcloud.com/content/packageshare.html – Link to the external interface for the CQ Package Share.

http://localhost:4502/crx/explorer/diagnostic/prof.jsp – Shows you the built in profiler

http://localhost:4502/system/console/profiler – Shows you the built in profiler

Params

wcmmode=DISABLED – This handy publisher parameter turns off CQ authoring features so you can preview a page cleanly
debugClientLibs=true – This will help to debug clientLibs includes

If you have more handy URL’s and or parameters that you think others should know about please comment on this blog entry and I will add them to the list.

CQ Tips and Tricks #1 – How to define a SlingServlet [CQ5.5-5.6]

There are many ways to define an OSGI service.
This is the preferred coding style for CQ version 5.5-5.6 that we follow on our team.

Registering the servlet by path

import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;

import javax.servlet.ServletException;
import java.io.IOException;

@SlingServlet(
    paths={"/services/unicom/v1/"}
)
@Properties({
    @Property(name="service.pid", value="com.adobe.unicom.v1.servlets.OmnnitureLoggingServlet",propertyPrivate=false),
    @Property(name="service.description",value="Omniture service call logging servlet", propertyPrivate=false),
    @Property(name="service.vendor",value="Adobe Systems Incorporated - Adobe@Adobe Team", propertyPrivate=false)
})
public class OmnnitureLoggingServlet extends SlingAllMethodsServlet
{
    @Override
    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException
    {
        //Do something fun here
    }

    @Override
    protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException
    {
        //Do something fun here
    }
}

OR  registering the servlet by resource type and extension

import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;

import javax.servlet.ServletException;
import java.io.IOException;

@SlingServlet(
    resourceTypes = {"rep:User"},
    methods = {"GET", "POST"}
)
@Properties({
    @Property(name="service.pid", value="com.adobe.unicom.v1.servlets.OmnnitureLoggingServlet",propertyPrivate=false),
    @Property(name="service.description",value="Omniture service call logging servlet", propertyPrivate=false),
    @Property(name="service.vendor",value="Adobe Systems Incorporated - Adobe@Adobe Team", propertyPrivate=false)
})
public class OmnnitureLoggingServlet extends SlingAllMethodsServlet
{
    @Override
    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException
    {
        //Do something fun here
    }

    @Override
    protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException
    {
        //Do something fun here
    }
}

To handle all requests and filter on selector you can change the example above to read something like this.

import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;

import javax.servlet.ServletException;
import java.io.IOException;

@SlingServlet(
    resourceTypes = {"sling/servlet/default"},
    methods = {"GET"},
    selectors = {"report"},
    extensions = {"json"}
)
@Properties({
    @Property(name="service.pid", value="com.adobe.unicom.v1.servlets.OmnnitureLoggingServlet",propertyPrivate=false),
    @Property(name="service.description",value="Omniture service call logging servlet", propertyPrivate=false),
    @Property(name="service.vendor",value="Adobe Systems Incorporated - Adobe@Adobe Team", propertyPrivate=false)
})
public class OmnnitureLoggingServlet extends SlingAllMethodsServlet
{
........

To handle all requests for a Page with a special selector.
IE http://www.fake.com/content/page.mycustomselector.html

import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;

import javax.servlet.ServletException;
import java.io.IOException;

@SlingServlet(
    resourceTypes = {"cq:Page"},
    methods = {"GET"},
    selectors = {"mycustomselector"}
)
@Properties({
    @Property(name="service.pid", value="com.adobe.unicom.v1.servlets.OmnnitureLoggingServlet",propertyPrivate=false),
    @Property(name="service.description",value="Omniture service call logging servlet", propertyPrivate=false),
    @Property(name="service.vendor",value="Adobe Systems Incorporated - Adobe@Adobe Team", propertyPrivate=false)
})
public class OmnnitureLoggingServlet extends SlingAllMethodsServlet
{
........

To handle all requests for a Page with a special extension.
IE http://www.fake.com/content/page.myfakeext

import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;

import javax.servlet.ServletException;
import java.io.IOException;

@SlingServlet(
    resourceTypes = {"cq:Page"},
    methods = {"GET"},
    extensions = {"myfakeext"}
)
@Properties({
    @Property(name="service.pid", value="com.adobe.unicom.v1.servlets.OmnnitureLoggingServlet",propertyPrivate=false),
    @Property(name="service.description",value="Omniture service call logging servlet", propertyPrivate=false),
    @Property(name="service.vendor",value="Adobe Systems Incorporated - Adobe@Adobe Team", propertyPrivate=false)
})
public class OmnnitureLoggingServlet extends SlingAllMethodsServlet
{
........

For more details on the Felix Annotations see

Introducing the new CQ Typekit integration component

After it was announced that we were acquiring Typekit I had to go see what we were buying. I was pleased to find a great new tool for my web toolbox. Over the years I have had the displeasure of having to reject comp from designers because of their use of beautiful fonts. In some cases I had to cut up comps into a million pieces to try to perserve the intergerty of the design. Over all non standard web fonts have been a real pain to deal with. Yes, there have been other solutions to help me deal with custom fonts overtime but none I really liked. I really like Typekit and the website itself is a work of art.
I am going over the top a bit but its a great platform and I am glad we acquired the company.

Now that I have found a new friend in Typekit, I needed to introduce it to my best friend CQ. After my first integration I thought “Wouldn’t it be cool if an author could do this without any coding or IT help?”. So I went off and created a simple page property extension that allows a author to bind a page and its children to a Typekit kit ID.

The following is a video I shot demoing our new integration component which can be found on the CQ package share. Please forgive my lack of enthusiasm in the video. I was very tired on the day of the shoot.

Our customer package share recently underwent a major upgrade. While I am working on getting this package re-hosted in the package share here is a link to the current version.

Adobe’s social media strategy + Adobe Digital Marketing Suite = Awesome ROI

As a leader in digital marketing and digital media software, Adobe doesn’t have to turn far to find the products and technology that it needs to create, deploy, measure, and optimize digital marketing campaigns. For the launch of Adobe Creative Suite 6 and Adobe Creative Cloud, Adobe took the opportunity to showcase its robust social media initiatives and Adobe Digital Marketing Suite.

“We wanted to engage customers and drive solid business results through social media, so we had to clearly understand the impact of all our strategies,” says Maria Poveromo, director of social media for Adobe. “We not only set out to generate as much buzz as possible, but we also wanted to continually adapt our strategies along the way and see the returns.” Continue reading…

How to delete a Folder/Node in CQ repository from a JSP component

Problem:

In one of my projects I needed to show some content nodes in Tree structure in my JSP and then need to delete few of them with inline editing without leaving the page i.e. asynchronously. So I started looking for possible solutions.

Solution:

This blog is about all those findings.

There are two most common ways to manipulate a Node in CQ repository and so for deletion of a node.
Continue reading…

SxSW Interactive 2012 Memories

Opening days.
At first, this year’s South by Southwest seemed like a bust, it is one of the biggest design, new media, social media, technology, and film and media conferences in the world. Gray skies, relentless rain, a labyrinthine of taxis and registration lines and traffic jams put a damper on the start of the show. But a few days in, after the sun came out in a blaze of glory, people pulled off their rain suits and started to mingle. After that, the conference was in full swing — dozens of panels, hundreds of sessions, some awesome barbecue and many cameos and keynotes by some of interactive’ s famous, the whirlwind week ended just as quickly as it began. Here are some of my crucial takeaways from the week. Continue reading…

Enabling Chat (XMPP) communication in Enterprise from outside Corporate Network

Lately Chat has become one of the most convenient and fastest way of  engagement among employees in large corporations. In fact it has become part of our lives and have changed the way we even imagine to contact someone. I heard one of our senior executives saying

“In late 90’s and early 21st century, employees used to use Email for exchange of information and Print Outs / letters for storing / sharing something important stuff. But lately people have started using chat communication (& other social tools) for exchanging ideas and email is primarily used for safe storage or reference kind of stuff”.

There are many situations when employees working for Large corporations are not in office but still wants to engage in Chat communication with another employee (may be for some work related issues or informing about absence from office etc).
Continue reading…

Social Engagement Index – An experiment in collecting social data & making sense of it

Background

Problem : To understand, evaluate and respond to social engagement activities by rival organizations to better engage with customer / potential customer base.

Who would want this? : All organizations with active social media plan.

How would it work? : The system would analyze open data in real-time and present info graphics to the marketing team.

Why would anyone want this? : To keep effective check measures against your competition and to actively improve your social base, and eventually your customer base.

 

Experiment

Phase 1 : Identify few interesting data sources
Continue reading…

“Krishna Aur Kans” powered by Adobe Technologies

Adobe India arranged a movie show for its employees on August 8 & 9. What was special about this movie, “Krishna aur Kans”, is that it was an animated feature film powered by Adobe technologies including Adobe Flash Professional, Adobe Premiere Pro, After Effects and Photoshop. While most of the global releases (in Hindi, English, Tamil and Telugu) were in stereoscopic format, the film will also be released in 2D. The film is presented by Reliance Animation.

Adobe Flash technology was at the core of the movie’s production pipeline and utilized two amazing features: ‘Shape Tweens’ and ‘Motion Tweens’, enabling the creative team to create magical effects in the movie.
The animation in the film has been done primarily using Adobe Flash software, crafting a magnum opus canvas to help viewers relive the time of Krishna. The team also used Adobe Premiere Pro as one of the key software in their workflow for offline editing.

Krishna aur Kans a film presented by Reliance Animation, is undisputedly a visual delight (especially in 3D) with psychedelic and vibrant colours.

EchoSign @ Adobe

EchoSign is Adobe’s electronic signature service that “just works.” Or rather it just ROCKS! You simply login to their web site, enter the signer’s email, add a document and bam! The recipient gets an email they can sign immediately, forward to the correct person or return to the sender for changes. A recipient can even sign from their mobile device!

Continue reading…