Posts

Selective Replication: Bulk Content Replication Made Easier

Selective Replication tool, which is one of the tools in the ADX Tools package, simplifies bulk activation, deactivation and delete operations for AEM users.

Selective Replication Tool augments AEM Activation Tree with some useful additional features. AEM Activation Tree is a replication console to activate the entire tree in one action. Selective Replication tool adds to the utilities of bulk activation, deactivation and delete operations. The task gets even simpler when there is an option to selectively choose the root paths to replicate, with an added advantage of selecting the replication agents. To further apply the feature of selectivity, users have the option to include or exclude child node or DAM assets.

Purpose:

To perform bulk activation, deactivation or delete operations on a path-task list uploaded via Excel with the ability to select relevant replication agents.

Implementation:

  1. The simplest part of the tool is its input, which is uploading an Excel file containing the path-task list. A sample excel file can be downloaded using the ‘Sample’ button present in the description.
selectivecreplication

ADX Tools in AEM: Selective Replication

Excel file contains the following fields:

  • Path – root path for operation
  • Include Children – option to include child nodes of content or not
  • Include DAM Assets – option to include DAM assets of content or not
  • Action Type – defining the type of action (Activate, Deactivate, Delete)2. The tool gives an option to select multiple replication agents from the available list.

 

  1. We can get detailed replication logs with the option to export it as an Excel file or pdf.

  1. Users also get the option to see the history of the operations performed by clicking on the history icon present on the top right corner of the tool along with the tool guide.

 

Each of the individual logs can be viewed by clicking on the respective Logs icon. This action will retrieve the history of that particular operation.

 

Key Highlights of the tool:

  • Option to selectively choose the root paths for replication
  • The advantage of choosing relevant replication agents
  • Simple path-task list input via Excel
  • Include or exclude child nodes/DAM assets
  • Detailed replication logs of each root path
  • History of replication actions performed via this tool

 

The video demonstration of the tool can be viewed at:

Related Blogs:

We at Argil DX are dedicated to improving your AEM experience and usability. Get in touch with us to know more about our services and AEM expertise.

To download the ADX Tools package submit a request and we will deliver the package on your email within 15 work days.

 

Dynamic Options values in AEM dialog dropdown Using $PATH

In this post, I will explain a real project use-case, where I need to populate a Dropdown in my component dialog with dynamic values, but the condition are-

1. These values can only be fetched from the current resource or current page object.
2. Another condition is that this dropdown must be auto-populated when the dialog opened.

For example,  The drop down values can be the list of all parent pages of the page where this component was dropped.

Q1). How will you go for it?

You will think about ajax call because the dropdown can be filled with dynamic values using options property.

Q2). Yes, you are right then, what will you call from the options property?

Sling Servlet

If your answer is Sling Servlet then, I have some questions for you-

Q1). How will you get the current resource  or current page object in that servlet?
Q2). If you  are trying to pass the path of current resource then How will you do that?

OK, I think you are well understood what am I trying to say. How to get current resource or current page object into the called Sling Servlet.

Maybe you can do it using some other approach but in this post I will explain, How I complete this task?

In place of servlet I have created a JSP file under same component node with some selector (For ex. options.json). For Ex. My component structure is-

Now, I have set some properties on my drop-down dialog node. These properties are shown in figure-

3

Here you will notice that, I have used $PATH, this will return the path of the component wherever it is dropped. Then I used Sling Script Resolution Principle to call my options.json.jsp file.

For writing this blog, I had created dummy data but in actual, I had created a Sling Service and from one of it’s methods, I was getting the JSON values.

Here, you should follow standard coding practices and should remove these scriptlets from JSP file to some java file. But the key point is that this JSP must return the values in JSON format. If you are using Sightly then same code will work or if you want to use HTML in place of JSP then it will work perfectly fine.

I am also sharing the Git repository link where you can find demo examples for these properties.
Git repository link is –

https://bitbucket.org/accunitysoft/accunity-blog-snippets

Happy Coding..!!

Ankur Chauhan
Tech Lead