Posts

Use cases of ModifiableValueMap in AEM

The  ModifiableValueMap  is an extension of the  ValueMap  which allows to modify and persist properties.  All changes to this map are stored in the transient layer of the resource resolver or more precisely in the transient layer of the resource provider managing this resource. Use cases  in AEM :: Mandatory step -       1. Get the resource resolver.      2. Get ModifiableValueMap interface -                  ModifiableValueMap mvp = resolver.adaptTo(ModifiableValueMap.class); 1. Get SINGLE value property of a node:      String value =  mvp .get("multivalue", String.class);  2. Get MULTI value property of a node:     String[] value =  mvp .get("multivalue", String[].class);  3. Add SINGLE value property to a node:     String val = "single";     a.  mvp.put("singlevalue", val);     b.   mvp.putIfAbsent("singlevalue", val);   4. Add MULTI value property to a node:      String[] val = {"test1","test2"};     mvp .put(&q

Run modes in AEM

Image
Run modes allow you to configure AEM instances for specific purpose.  Two types of run modes in AEM- 1. Standard Run modes: Run modes provided by AEM. They cannot be changed once AEM instance is installed. Mainly they are Author and Publish. 2. Custom Run modes: Along with standard run modes we can add our custom run modes. Custom run modes can be environment specific. Mainly they are development, QA, staging and production. They can be changed on every instance re-start. Examples :      1. author, dev     2. publish, test Problem:: How to check active run mode of AEM instance? Solution::      Step 1 - Goto  http://localhost:4502/aem/start.html     Step  2 -  Goto Tools section.     Step 3 - Goto Operation and then System Overview as below screenshot. There you can find active run mode details under instance  section along with other system details. Problem:: How to utilize these run modes in AEM development? Solution::      We can utilize these run modes to do any development spec

A Simple Example of Sling Pipes in AEM

Image
With Sling Pipes it's very easy to update the AEM content. It is a tool for executing CURD operations over resources in AEM repository. Hope this will be helpful. Plumber is OSGi service and it has  newPipe method in which we need to pass resourceResolver . After that we can call several pipes or methods to achieve our objective. Some of them are- echo(path) - to retrieve the root resource of the path. write(config) - to write/update properties of a resource. run() - to execute the code. Use case: To update property of a node using Sling Pipe OSGi service.  Dependencies required-  1.  Sling Query (org.apache.sling.query-4.0.0)-  Maven Repository: org.apache.sling » org.apache.sling.query » 4.0.0 (mvnrepository.com) 2, Sling Pipes (org.apache.sling.pipes-3.1.0)-  Maven Repository: org.apache.sling » org.apache.sling.pipes » 3.1.0 (mvnrepository.com) Either install the bundle of respective dependency in console or add them in the project's pom.xml System user -   1. Create a

Asset drag and drop issue in the AEM dialog

Issue: In latest AEM versions when we open the dialog to author the field which allows drag and drop of the assets, the backdrop hides sidebar and because of   that we are not able to open the sidebar to drag and drop assets in the dialog field. Solution: To avoid this issue, open sidebar first and then open dialog to author. By this way backdrop will   not hide the sidebar.

Install more then one AEM instance

To install more than one AEM instance in a system. Mandatory requirement -  Sufficient Hard disk space in system. Sufficient Ram space in system. Make sure to use different port for each instance. PORT-  Even ports for Author instances (ex. 4502,4504). Odd ports for Publish instances (ex. 4503,4505). 

Ways to install AEM

 AEM Jar file- Mandatory requirements - Java JDK Double click on Jar file to install. AEM War file- Mandatory requirement - Java JDK,  Application server(ex. Tomcat. Weblogic etc. ) Install application server and deploy war file.

Full form's in AEM

CMS - Content Management System WCM - Web Content Management AEM - Adobe Experience Manager CQ - Communique JCR - Java Content Repository CRX - Content Repository Extreme OSGi - Open Service Gateway Initiative DAM - Digital Asset Manager AMC - Adobe Marketing Cloud MSM - Multi Site Management SDI - Sling Dynamic Include UX - User Experience HTTP - Hyper Text Transfer Protocol REST - Representational State Transfer SOAP - Simple Object Acess Protocol HTML - Hyper Text Markup Language OOTB - Out of the box CSS - Cascade Style Sheet JS - JavaScript JSP - Java Server Pages CI - Continuous Integration CD - Continuous Development