Skip to main content

Posts

Showing posts from May, 2019

Create a package in AEM from Excel file entries

Hello everyone, welcome to this new post where we will discuss a new utility to create an AEM JCR package from the entries present in an excel file.
Problem Statement Sometimes we are given with the details of content paths in JCR (crx/de) also called filters (the same which we use to create a package in AEM via the package manager). If there are multiple different paths then it becomes tedious to add each content path as a filter one by one. Solution I have been working on a utility in AEM that will read the content paths in the excel file and will create a package in package manager based on that.
This utility contains an interface which lets you fill the package details like the package name, package group and an upload button to upload the excel file. Steps to configure Let's get started with the steps to configure this utility. Step #1 Clone and build the AEM project from here. You may need to change the uber jar version as per your need in the project's parent pom.xml. …

Import XML data into AEM

Hi everyone, in this post, we will see how can we import XML data into AEM.

 Sometimes, we have an XML file in the system from which we need to import or sometimes we have XML data exposed via a URL. We will see both methods.
Design We will be creating the following to make this work -  OSGi configuration - This will capture the location of the XML file and the URL which is exposing the XML data. It will also let us define the location in crx/de, where we want to import the data.Sling Scheduler - This scheduler will run periodically and read both file and URL to fetch the data. You can have more control over this by defining an AEM component etc or a separate console.XML Reader Service - This OSGi service will be invoked by the scheduler and will read/parse the data from file/URL using JAXB (Java Architecture for XML binding) library.XML Writer Service - This OSGi service will make use of JCR Node APIs to write parsed XML data into crx/de at the specified location. XML Data SourceYou …