Wednesday, 18 December 2013

Developing AEM OSGi bundles that use Jackrabbit UserManager APIs

You can develop an Adobe Experience Manager (AEM) OSGi bundle that uses Jackrabbit UserManager APIs to perform AEM user operations. This API provides access to both AEM users and groups and is located in the
org.apache.jackrabbit.api.security.user Java package.

Using an OSGi bundle that contains these APIs, you can retrieve AEM user identifier values and perform a task using these values. In this development article, the retrieved AEM user identifier values are written to the Adobe CQ log file.

7.12.2013 17:25:09.689 *INFO* [0:0:0:0:0:0:0:1 [1387319109155] GET /content/Blog.html HTTP/1.1] com.aem.users.SearchUsersImpl Retrieved USER admin
17.12.2013 17:25:09.689 *INFO* [0:0:0:0:0:0:0:1 [1387319109155] GET /content/Blog.html HTTP/1.1] com.aem.users.SearchUsersImpl Retrieved USER replication-receiver
17.12.2013 17:25:09.708 *INFO* [0:0:0:0:0:0:0:1 [1387319109155] GET /content/Blog.html HTTP/1.1] com.aem.users.SearchUsersImpl Retrieved USER anonymous
17.12.2013 17:25:09.709 *INFO* [0:0:0:0:0:0:0:1 [1387319109155] GET /content/Blog.html HTTP/1.1] com.aem.users.SearchUsersImpl Retrieved USER zachary.w.mitchell@spambob.com


To read this development article, click  http://helpx.adobe.com/experience-manager/using/developing-aem-osgi-bundles-jackrabbit.html.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Friday, 13 December 2013

Adobe Experience Manager Community in 2014

As 2013 closes out, it's time to reflect back on the year and what the AEM community team did in 2013. It was a very busy year and we performed many tasks. We launched the new Digital Marketing support communities, created task-based AEM developer articles,  and engaged with the community in different social channels such as Twitter, Facebook groups and Linked in.

Looking ahead to 2014, we have a lot of content planned out. We will be delivering a lot  more AEM 'How To' articles based on your feedback. One area where we are going to spend time on is XType articles. We have heard the community in its request for more how to articles that discuss how to work with XType data types to create advanced AEM components.

NOTE: If there is a certain topic that  you would like to see -- please leave a comment and us know what you want. 

Another exciting thing coming up in 2014 is the annual Digital Marketing summit:



This is an excellent chance to come out, meet with the Digital Marketing community, and learn more about Adobe Digital Marketing.

Another big event in 2014 is the release of the next major version of Adobe Experience Manager. More on that as the date gets closer.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Monday, 2 December 2013

Creating a HTML Parser Service for Adobe Experience Manager

You can create a custom Adobe Experience Manager (AEM) HTML parser service that accepts HTML and parses it. By parsing HTML, you can retrieve HTML tag values. For example, consider the following HTML.

<div><p>Hello JSoup - this is now a CQ service.</p></div>

Once you pass this HTML to the custom AEM HTML parser service, you can get the value of the <p> tag, as shown in the following illustration.

An AEM web page that parses HTML by calling the custom HTML parser service
To create a custom AEM HTML parser service, you can use the JSOUP library. That is, the application logic required to parse HTML is developed by using the JSOUP API. For information about this API, see:

http://jsoup.org/

The Java logic that parses HTML is implemented as an OSGi bundle that is built using Declarative Services (DS) and Maven. The OSGi bundle is a managed component, which means that the OSGi service container creates the OSGi instance. To read this development article, click: http://helpx.adobe.com/experience-manager/using/html-parser-service.html.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Monday, 25 November 2013

Creating a Custom Reporting Service for Adobe Experience Manager

You can create a custom reporting service for Adobe Experience Manager (AEM) that stores AEM data. A benefit of creating a custom service is you can develop it to meet your business requirements and integrate the reporting service to use data queried from an AEM service. For example, you can create an AEM solution that queries enterprise data that a digital marketer is interested in viewing. Then you can write out the data to a report and store the report in the AEM Java Content Repository (JCR).

This development article extends an AEM application that is built by following another AEM development article that queries data from MySQL using a DataSourcePool. Before following this article, create the DataSourcePool application by following this article: Injecting a DataSourcePool Service into an Adobe Experience Manager OSGi bundle.

In this article, an option is added to the web application that lets a user specify if the queried data is written to a custom report. Consider the following AEM web application.


This development article walks you through how to build this custom reporting service. To read this development article, click http://helpx.adobe.com/experience-manager/using/aem-reporting-service.html.

Note: Adobe Experience Manager supports reports without creating a custom reporting service. You can create a report by configuring JCR nodes and properties. For information, see Developing Reports.

Saturday, 9 November 2013

Creating Adobe Experience Manager services that invoke third party Restful web services

You can create an Adobe Experience Manager service that consumes data from a third-party Restful  web service and displays the data in an AEM web page. For example, assume that you have a requirement to create an AEM component that calculates the distance between two cities and displays the results in an AEM web page. In this situation, you can develop an OSGi bundle that contains Java classes located in the org.apache.http package that are able to invoke a third-party Restful service. The following illustration shows data being retrieved from a third-party Restful service and displayed in an AEM web page (JSP).

An AEM OSGi bundle invoking a third-party Restful service


The use case in this article is to calculate the distance between two cities, return the data within JSON, parse the JSON using an AEM page component (using JavaScript), and display the results in an AEM web page.

An AEM page that uses a Restful request to calculate the distance between two cities


To calculate the distance between two cities, the Google Distance Matrix API is used. For information about this API, see:

https://developers.google.com/maps/documentation/distancematrix/

To read this article, click  http://helpx.adobe.com/experience-manager/using/restful-services.html.

Note: For information about creating an AEM OSGi bundle that consumes a third-party WSDL, see http://scottsdigitalcommunity.blogspot.ca/2012/05/creating-adobe-cq-bundles-that-consume.html.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Friday, 8 November 2013

Developing a Java Swing Application that displays Adobe Experience Manager Data

When working with Adobe Experience Manager (AEM), sometimes you need to query data that is located in the AEM JCR and view results. Typically you write an AEM component to display the results within a web application. However, sometimes you want to be able to view the data without writing an AEM component or viewing the data from within an AEM web application. Even our team at Adobe has these requirements. That is, we want to be able to quickly get at data without having to write an AEM web application. For example, consider AEM community members which of course is data stored in the AEM JCR. We want the ability to quickly view community members, scores, and even activity based on date values.

In this situation, a Java Swing application is a good choice to use to build a custom tool that enables you to quickly get at the JCR data and view the result set. You can display the result set in a Swing data type that extends javax.swing.JTable, as shown in this illustration.

A Java Swing application that displays data retrieved from the AEM JCR


For information about javax.swing.JTable, see http://docs.oracle.com/javase/7/docs/api/javax/swing/JTable.html.

This development article walks you through how to build a Java Swing application that queries the AEM JCR and displays the result set. To read this development article, click http://helpx.adobe.com/experience-manager/using/java-swing-applications.html.

.

Sunday, 3 November 2013

Creating an Android PhoneGap 1.x application using IntelliJ IDEA

You can create an Android PhoneGap application by using the Android SDK, the PhoneGap API, and the IntelliJ development environment. The PhoneGap API can be used to develop mobile applications for iPhones, Androids, BlackBerries, and other mobile devices. You can use an IntelliJ Android project to wrap HTML, cascading style sheets (CSS), and JavaScript code to create a mobile application. Also, when developing a PhoneGap application, you can use other  open source APIs like jQuery Mobile to create rich graphical user interfaces (GUIs). You can also make AJAX calls to enterprise servers to send or retrieve mobile data.

Note: Future PhoneGap development articles will illustrate how to develop PhoneGap applications that interact with Adobe Experience Manager (AEM). One use case that you can perform is taking a picture with the mobile device's camera and then sending the photo to the AEM DAM.

Most end to end articles that you find on the web show how to develop a PhoneGap application using Eclipse or the command line (I personally like IDEs much better than command line). While I use the Eclipse IDE in many articles appearing on Scott's Digital Community, in this development article, I am going to use IntelliJ (version 12.6).

This development article walks you through downloading the PhoneGap API, the Android SDK, and then how to use the IntelliJ IDEA to develop a PhoneGap application. The PhoneGap application is deployed to an Android device.

An Android PhoneGap application

To create an Android PhoneGap application by using IntelliJ IDEA, perform these tasks:
  1. Install the Android SDK.
  2. Download the PhoneGap API.
  3. Create the PhoneGap application using Intellij IDEA.

Install the Android SDK

The first step to create an Android PhoneGap application is to install the Android SDK. You use the Android SDK from the IntelliJ IDEA. For information about installing the Android SDK, see the detailed instructions at http://developer.android.com/sdk/index.html.

Install the PhoneGap API

You can download the PhoneGap API from the following URL:


When downloading the PhoneGap API, you have library files for IOS devices, Android devices, Blackberry devices, and so on as shown in this illustration. 

PhoneGap library files

This development article uses the PhoneGap API for Android. Download the PhoneGap ZIP file from the PhoneGap archive section, as shown here.

PhoneGap Download options
In this development article, the PhoneGap 1.8.1 is used. The three files that are used in this development article are cordova-1.8.1.jar, cordova.js, and plugins.xml.

Note: You can also install the PhoneGap API using a command line. However, this development article does not use the command line to install the PhoneGap API. 

Create an Android PhoneGap project using IntelliJ

After you have installed the Android SDK and downloaded the PhoneGap API, you can use IntelliJ IDEA to create an Android PhoneGap application. This development article uses IntelliJ version 12.1.6.

Create an IntelliJ project

The first step is to create an IntelliJ Android project as shown here.

IntelliJ Android New Project

Create an Android PhoneGap project by performing these tasks:
  1. Start IntelliJ IDEA.
  2. Click File, New Project. 
  3. In Project Name, type MyPhoneGap.
  4. In Project Location, specify a location for your project. In this example, C:\PhoneGapFirst is specified. 
  5. In the Project SDK, specify the location to where you downloaded the Android SDK. 
  6. Click Next.
  7. In the application name, specify a name for your application. Specify MyPhoneGap.
  8. In the package field, specify: com.example.PhoneGapFirst.
  9. In the Activity name field, keep the default value: MyActivity.
  10. Click the show device chooser dialog radio button.
  11. Click Finish. 

Add sub folders to your project

After you create the IntelliJ Android project, your project should reflect the following illustration:

Project files generated by IntelliJ

Next, add new folders to your project. In the assets folder, create a sub folder named www. Place the cordova.js in the www folder. 

Place the cordova-1.8.1.jar in the libs folder.  Also add the cordova-1.8.1.jar to your IntelliJ project's class path. Right click on the Project Name ( PhoneGapFirst) and press F4. This action opens the Project Structure dialog.

Select Libraries and then click the little '+' icon near the top of the dialog. Select Java and browse to the cordoba.jar file. Click OK, then click OK again.

Expand the res folder, right click and create a new folder named xml. Copy the plugins.xml file from your PhoneGap installation and add this file to the xml folder.

The following illustration shows the PhoneGap files that you added to your Android IntelliJ project. 

PhoneGap files added to the IntelliJ project 

Modify the Java file

The next step is to modify the MyActivity Java class. Add the following import statement to this file:

import org.apache.cordova.*;

Next change the class that the MyActivity class extends from Activity to DroidGap. This class is the main Android activity that represents a PhoneGap application. For more information, see DroidGap.

The following represents the modified MyActivity class.

package com.example.PhoneGap;

import android.app.Activity;
import android.os.Bundle;
import org.apache.cordova.*;

public class MyActivity extends DroidGap
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
}

Notice that the loadURL method references an HTML file named index.html. This is the HTML file where you can add your PhoneGap JavaScript logic. This PhoneGap JavaScript API is very rich API that lets you interact with most features of your smartphone. This development article simply writes out text. 

Modify the AndroidManifest.xml file

Modify the AndroidManifest XML file located in your IntelliJ project. Copy and paste the following XML to this file between the <uses-sdk.../> and <application.../> tags:

<supports-screens 
    android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:resizeable="true" 
    android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />

The following XML represents the entire XML file. 
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.PhoneGap"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4"/>
    <supports-screens
            android:largeScreens="true"
            android:normalScreens="true"
            android:smallScreens="true"
            android:resizeable="true"
            android:anyDensity="true" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:debuggable="true">
        <activity android:name="MyActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

Notice the bolded line: android:debuggable="true". This lets you write your project to an Android device. 

Add the HTML file that references the  PhoneGap JavaScript file

In the assets/www folder that you created, add a new HTML file named index.html. This is the file where you can place your PhoneGap JavaScript code. However, for this article, the HTML writes text. Add the following HTML to this file.

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    <title>Hello PhoneGap</title>
</head>
<body>
<h2>Hello, this is a very basic Android PhoneGap application!</h2>
</body>
</html>

Notice that the cordova.js file is referenced. This is how you can use the PhoneGap JavaScript API within an Android application. 

Deploy your PhoneGap application to an Android Device

The final task is to deploy the PhoneGap to the Android device. For this to be successful, you have to perform a few tasks:

1. Declare your application as "debuggable" in your Android Manifest. (this is shown in this article). 
2. Enable USB debugging on your device.
3. Configure your computer to detect your device. You may have to install a driver file. 

For information about performing these tasks, see http://developer.android.com/tools/device.html.

Once you are done with these tasks, you can run your Android IntelliJ application. You will be presented with the Choose Device dialog:

The IntelliJ Choose Device dialog that shows a device

Notice that under the Serial Number column, you device is displayed. Also make sure that the Compatiable column displays yes. Ensure that you specify the correct Android OS version in the AndroidManifest XML file. If your device does not match the values that you specified, you will not be able to run your PhoneGap application on your device.

Run your application and choose your device from the Choose Device dialog. Congratulations, you have just developed and deployed your first PhoneGap application using IntilliJ IDEA. 


Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.



Tuesday, 29 October 2013

Creating a Link Rewriter for Adobe Experience Manager

In today’s competitive business environment, a great looking website is just not enough. Focus has shifted towards page loading speeds, cross device compatibility with responsive and adaptive design patterns and also accessibility. When it comes to speed, there are many ways to improve your website’s performance. One of them is to keep resources that change infrequently cached. Using Adobe Experience Manager (AEM), you can cache most content, including images, scripts and HTML/JSP pages.

Not only can you cache these files on the dispatcher server but you can also make use of the visitor’s browser cache. If you allow files to be cached directly in the browser, the amount of load placed on the dispatcher server decreases drastically. You can inform the browser that is actually is okay for it to cache JavaScript and CSS files for a few days or maybe even weeks depending on your release cycle. But what happens when you make a change in these files before they have expired in the visitor’s browser cache? Well, then you have a problem, the user does not receive any changes unless they actually clear their browser cache, which is something that one cannot demand of their visitors.

This article explains a workaround for this issue when using AEM. The basic idea is by using Sling selectors; you can append a version number to the CSS/JavaScript files so that they will change with each release. This affects the actual name of the file so it does not matter if the browser has cached the scripts because it will look for the new file in the browser cache. Because this file does not already exist, it will fetch this new file from the server and the user will receive the latest changes.

You can create a custom Adobe Experience Manager (AEM) Link Rewriter that is based on the Apache Sling Rewriter module. This module is used for rewriting the output generated by the Sling rendering process.

Note: For more information about a Sling Rewriter, see Apache Sling Rewriter.

An Adobe CQ Link Rewriter is implemented as an OSGi bundle that contains a Java class that extends the org.apache.sling.rewriter.Transformer class. For information, see Interface Transformer.

To read this development article, click http://helpx.adobe.com/experience-manager/using/creating-link-rewrite.html.



Friday, 25 October 2013

Earn your copy of Adobe Experience Manager in a Classroom book

During the week of Nov 14, 2013, the AEM community will be running a special promotion. As an AEM professional, you will want to own your own copy of this great book. For TOC details, see: http://scottsdigitalcommunity.blogspot.ca/2013/08/get-your-adobe-experience-manager.html.



Now is your chance to own your own copy. If you solve a forum question on the AEM forums:

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.html

during the week of Nov 14 (Nov 11-15), you'll earn your own copy. It's that easy!!

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


Tuesday, 15 October 2013

Displaying Adobe Experience Manager Data in a Chart

You can create an Adobe Experience Manager component that displays data queried from the Adobe JCR in a chart.  Assume, for example, that you want to display financial data queried from the Adobe CQ JCR in a chart. In this situation, you can create a CQ widget that uses a JQuery chart library that displays result data in a chart.

AEM Data displayed in a chart control

Each data point that is displayed is stored as a customer node's property named revenue, as shown in the following illustration.

Each customer node has a revenue property that is displayed in the chart

In this example, AEM data is queried from the JCR by using the JCR  API within an OSGi bundle. The data is returned to the web page where it is displayed within a chart. This development article walks you through how to develop this AEM component. To read this development article, click:

https://helpx.adobe.com/experience-manager/using/displaying-experience-manager-data-chart.html

Note: Out of the box, Adobe Experience Manager lets you create reports by setting JCR nodes and properties. However, this development article discusses how to develop a custom chart control using Java and JQuery. For information about using the AEM out of the box reporting feature, see Developing Reports.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Saturday, 5 October 2013

Automating the process of uploading multiple digital assets to the Adobe Experience Manager DAM

Adobe Experience Manager contains a Digital Asset Manager (DAM) that stores your organization's digital assets such as image files, video files, and so on. You can create a Java Swing application that lets you upload multiple digital assets (for example, image files) from your organization repository to the AEM DAM. Some organizations have thousands of digital assets and as a result, it is not practical to upload them one at a time using the AEM web client or Curl. For information about using the AEM web client to upload digital assets to the AEM DAM, see How to upload a Digital Asset.


Instead, you can develop a Sling Servlet that uses the AssetManager API. For information, see AssetManager API.

You can post files to the Sling Servlet by developing a Java Swing application. This client application uploads multiple digital assets to the AEM DAM.


I
A Java application that uses the JCR API to upload multiple files to the AEM DAM



To read this development article, click http://helpx.adobe.com/experience-manager/using/multiple-digital-assets.html.

To watch the video, click:



Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Thursday, 3 October 2013

Creating custom AEM workflow steps that send email messages

You can develop a custom Adobe Experience Manager workflow step that sends email messages to users within a workflow. A custom workflow step is implemented as an OSGi bundle that you can build using Maven and the AEM Workflow APIs that belong to the com.adobe.granite.workflow.exec package. For information, see Package com.adobe.granite.workflow.exec.


A custom AEM workflow step


Once you create and deploy the custom step, you can use it to send email messages to users within an AEM workflow. To send email messages, a com.day.cq.mailer.MessageGateway instance is used. For information, see Interface MessageGateway.

To read this development article, click http://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html.

To watch the video, click:





Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author


I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Monday, 30 September 2013

Using the Sling API to retrieve content from the Adobe Experience Manager Repository

Adobe Experience Manager contains a Java Content Repository (JCR) that stores nodes and properties. A node located in the JCR is considered a resource. You can use the JCR API to retrieve resources from the JCR. For information about using the JCR API, see Programmatically Accessing Adobe CQ Content using the JCR API.

However, you can also retrieve content from the JCR using Sling. In fact, a resource is a central part of Sling and it assumes everything in the JCR is a resource. You can use Sling to retrieve a resource from within an OSGi component using the Sling Java API or using a JSP. To use the Sling API from within an OSGi component, you use an org.apache.sling.api.resource.ResourceResolverFactory instance.

The Sling API is used within an OSGi bundle


When using Sling to query the JCR, you have access to helper methods that are not available when using the JCR API. For example, the adaptTo method  converts a resource into an appropriate object representing a certain aspect of this resource. For example to translate a Resource object to the corresponding Node object, you can simply do:

Node node = resource.adaptTo(Node.class);

 This development article guides you through how to build an AEM application that uses Sling to retrieve resources from the JCR. An OSGi bundle is created that locates a resource and retrieves a value. To read this development article, click:

http://helpx.adobe.com/experience-manager/using/using-sling-apis.html

Note: When you want to write content to the JCR, it is recommended that you use the JCR API. For information, see Persisting CQ data in the Java Content Repository.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Friday, 20 September 2013

Creating a custom Adobe Experience Manager PDF service

While helping answer forums for Adobe Experience Manager, an AEM user asked if there is an AEM API to work with PDF documents. See the forum thread: 

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__rrqk-is_there_anapidepl.html

While this is not an out-of-the-box feature, it does not mean that Adobe CQ cannot perform this use case. One of the most powerful features of AEM is the ability to develop custom services.

You can create a custom AEM service that  creates and modifies PDF documents. For example, consider a use case where a user submits data to Adobe CQ. A custom service creates a PDF document, writes the data to the newly created document, and saves the PDF document in the AEM Digital Asset Manager (DAM). 


A custom AEM service persists a newly created PDF document in the DAM


This development article walks you through the process of creating a custom AEM service that is able to perform this use case by using Apache PDF BOX API. For information about this API, see http://pdfbox.apache.org/.

To read this development article, click  http://helpx.adobe.com/experience-manager/using/creating-custom-experience-manager-pdf.html

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

LiveCycle ES SDK/Java Developer articles

In my previous role at Adobe, I was the Senior SDK Technical Content lead for LiveCycle ES. In this role, I developed a lot of Java, .NET, and Flex apps that interacted with LiveCycle. The LiveCycle ES platform is still a powerful enterprise platform.

I have dig up some of my older community articles for the LiveCycle ES that are useful:

1 - Creating enterprise database components.
2 - Displaying LiveCycle ES process data in Flex graphs.
3 - Using Java servlets to invoke LiveCycle ES3 processes.
4 - Creating form rendering ASP.NET applications.
5 - Invoking web services using custom components.

By the way, you can use Adobe Experience Manager and LiveCycle ES as well. See this community article:

Integrating LiveCycle into Adobe CQ applications

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

Thursday, 19 September 2013

Invoking Adobe Experience Manager Workflows using the AEM Java API

You can create a workflow for Adobe Experience Manager. A workflow automates Experience Manager activities and is a series of steps that are executed in a specific order. Each step performs a distinct activity such as activating a page or sending an email message. Workflows can interact with assets in the repository, user accounts, and Experience Manager services. Therefore, workflows can coordinate complicated activities that involve any aspect of Experience Manager.

The AEM workflow user interface
For more information about workflows, see http://dev.day.com/docs/en/cq/current/workflows/wf-overview.html#par_reference.

This article creates a simple workflow and then discusses how to invoke the workflow using the AEM Java API. To read this article, click http://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html.

NOTE: You can create custom workflow steps for AEM. See http://scottsdigitalcommunity.blogspot.ca/2012/09/developing-cq-custom-workflow-steps.html.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


Monday, 16 September 2013

Integrating the custom carousel component with a CQ Dialog

This development article extends a component that was created by following an existing article on this blog: http://scottsdigitalcommunity.blogspot.ca/2013/09/creating-custom-carousel-component-for.html.

In this development article, the custom carousel component is integrated with a CQ Dialog and added to the CQ sidekick. A CQ author will be able to drag and drop the custom carousel component from the sidekick and then use a CQ dialog to define the image description values during design time.


A custom carousel component is integrated with a CQ dialog



To read this development article, click    http://helpx.adobe.com/experience-manager/using/integrating-custom-carousel-component-cq.html.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner

About the Author

I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 16 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked Inhttp://www.linkedin.com/in/scottmacdonald2010
TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.