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 functionality to break in unexpected ways. Customers could also extend AEM components through inheritance by way of sling:resourceSuperType
, or simply reference a component in /libs directly by way of sling:resourceType. Similar upgrade issues could occur with reference and override use cases.
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 be overlaid, inherited (
sling:resourceSuperType
) or used directly (sling:resourceType
). Nodes beneath /libs marked as Public are safe to upgrade with the addition of a Compatibility Package. In general, customers should only use nodes marked as Public. -
Abstract (granite:AbstractArea) - Defines a node as abstract. Nodes can be overlaid or inherited (
sling:resourceSupertype
) but not used directly (sling:resourceType
). -
Final (granite:FinalArea) - Defines a node as final. Nodes classified as final ideally should not be overlaid or inherited. Final nodes can be used directly by way of
sling:resourceType
. Subnodes under final node are considered internal by default. -
Internal (granite:InternalArea) *- *Defines a node as internal. Nodes classified as internal ideally should not 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 hierarchy. The / root is by default Public. Nodes with a parent classified as Internal or Final are also to be treated as Internal.
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.