Content Classifications

AEM has long used the principal of overlays and Sling Resource Merger to allow customers to extend and customize AEM functionality. Predefined functionality that powers the AEM consoles and UI are stored in /libs. Customers are never to modify anything beneath /libs but could add additional content beneath /apps to overlay and extend the functionality defined in /libs (See Developing with Overlays for more information). This still caused numerous issues when upgrading AEM as the content in /libs might change causing the overlay funcationlity to break in unexpected ways. Customers could also extend AEM components through inheritance via sling:resourceSuperType, or simply reference a component in /libs directly via sling:resourceType. Similar upgrade issues could occur with reference and override use cases.

In order to make it safer and easier for customers to understand what areas of /libs are safe to use and overlay the content in /libs has been classified with the following mixins:

  • Public (granite:PublicArea) - Defines a node as public so that it can overlaid, inherited ( sling:resourceSuperType) or used directly ( sling:resourceType). Nodes beneath /libs marked as Public will be safe to upgrade with the addition of a Compatibility Package. In general customers should only leverage nodes marked as Public.

  • Abstract (granite:AbstractArea) - Defines a node as abstract. Nodes can be overlaid or inherited ( sling:resourceSupertype) but must not be used directly ( sling:resourceType).

  • Final (granite:FinalArea) - Defines a node as final. Nodes classified as final cannot be overlaid or inherited. Final nodes can be used directly via sling:resourceType. Subnodes under final node are considered internal by default

  • Internal (granite:InternalArea) - Defines a node as internal. Nodes classified as internal cannot be overlaid, inherited, or used directly. These nodes are meant only for internal functionality of AEM

  • No Annotation - Nodes inherit classification based on the tree hierachy. The / root is by default Public. Nodes with a parent classified as Internal or Final are also to be treated as Internal.

NOTE
These policies are only enforced against Sling search path based mechanisms. Other areas of /libs like a client-side library may be marked as Internal, but could still be used with standard clientlib inclusion. It is important that a customer continues to respect the Internal classification in these cases.