Thursday, August 25, 2016

AEM Template Level Properties

Below table explains the properties & attributes at the AEM template level. 

Name Type Description 
. cq:TemplateCurrent template. A template is of node type cq:Template.
 allowedChildren  String[]Path of a template that is allowed to be a child of this template.
 allowedParents String[]Path of a template that is allowed to be a parent of this template.
 allowedPaths String[]Path of a page that is allowed to be based on this template.
 jcr:created DateDate of creation of the template.
 jcr:description StringDescription of the template.
 jcr:title StringTitle of the template.
 ranking LongRank of the template. Used to display the template in the User Interface.
 jcr:content cq:PageContentNode containing the content of the template.
 thumbnail.png nt:fileThumbnail of the template.
 icon.png nt:fileIcon of the template.

Thursday, August 4, 2016

Java 1.8: Sorting HashMap by value

Here is an simple example how easy sorting map is in Java 1.8
public class SortingMapExample {
   public Map getSortedMap(){
     Map<K,V> sortedMap = inputMap.entrySet().stream()
             .sorted(Map.Entry.comparingByKey(Comparator.reverseOrder()))
             .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
     return sortedMap;
    }
}

AEM Page Manager API: Creating valid & Unique name programatically.

This post has been moved to below link AEM Solution: Creating AEM JCR valid & Unique name programatically https://followcybersecu...