Skip to content
merkle-openPublic

About

A developer toolkit engineered to modernize and streamline the development experience on AEM.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

8 watching

Forks

Repository files navigation

AEM Utils

Sonatype Central Version Javadoc SonarQube - Quality Gate SonarQube - Security Rating SonarQube - Reliability Rating SonarQube - Maintainability Rating SonarQube - Code Coverage SonarQube - Vulnerabilities CI SNAPSHOT - Github Action Deploy SNAPSHOT - Github Action

The AEM Utils is a developer toolkit engineered to modernize and streamline the development experience on Adobe Experience Manager.

The library is designed to provide type-safe, functional handling for legacy AEM APIs, transforming traditional JCR and Sling interactions into a more predictable and robust developer experience.

This toolkit provides a foundational set of services and utilities essential for almost all AEM projects. Whether you are building complex search components, handling hierarchical content inheritance, or managing resource lifecycles, these utilities offer the reliable core functionality required for modern AEM implementations.

Features

Utilities

Feature Description
annotations
  • AdaptTo: Custom Sling Models injection annotation that triggers an adaptation via org.apache.sling.api.adapter.Adaptable
  • PageProperty: Custom Sling Models injection annotation for retrieving properties from an com.day.cq.wcm.api.Page
constants
  • CookieNameBuilder: A builder for constructing standardized, namespaced cookie names
  • FileType: Common file types and their associated metadata used within the AEM ecosystem
exceptions
  • ErrorCode: A marker interface for defining unique, domain-specific error codes across the AEM utility framework
  • SystemException: Generic system-level base java.lang.RuntimeException within the AEM utility framework to be extended
java
  • ClassUtil: Common Java reflection and class-handling tasks
  • FunctionalUtil: Provides functional programming utilities to bridge Java APIs with Stream capabilities
jcr
  • PermissionUtil: JCR Access Control, User Management, and Permission checking
link
  • Links: Constants and definitions for URL handling and URI manipulation within AEM
  • LinkExternalizerUtil: Transforming resource paths into absolute, externalized URLs
  • LinkMappingUtil: Applying Sling Resource Mapping to paths
  • LinkUtil: Validating, formatting, and manipulating URLs and JCR paths
query
  • PredicateProperties: Provides predicate property paths used for com.day.cq.search.Query
  • QueryResultHelper: Safe and efficient retrieval of com.day.cq.search.Query results
  • QuerySearch: A builder-style utility to simplify the creation of com.day.cq.search.Query objects
  • QuerySearchUtil: providing static helper methods for com.day.cq.search.Query construction
sling
  • RequestUtil: For common operations related to org.apache.sling.api.SlingHttpServletRequest
  • ResourceUtil: For common org.apache.sling.api.resource.Resource operation focused on retrieval
  • SlingUtil: Provides type-safe shortcuts for object adaptation via org.apache.sling.api.adapter.Adaptable
wcm
  • PageManagerUtil: Shortcuts to interacting with com.day.cq.wcm.api.PageManager
  • PageUtil: Generic com.day.cq.wcm.api.Page operations and content traversion

Services

Feature Description
cronjobs
  • AbstractSlingJobScheduler: Facilitates the registration and management of Scheduled Sling Jobs using the org.apache.sling.event.jobs.JobManager
httpclient
  • HttpClientService: A centralized service for executing HTTP requests with specialized support for AEM security contexts
  • HttpClientUtil: Helper methods for common HTTP client operations
inmemorycache
  • AbstractInMemoryCacheProviderService: Acts as a bridge to the central InMemoryCacheService. By extending this class, specific implementations can provide a simplified, type-safe API for a named cache.
  • InMemoryCacheService: A centralized service providing a simplified abstraction over the com.github.benmanes.caffeine caching library
runmode
  • RunModeService: Service for detecting the current AEM execution environment

Installation

Maven Dependency

Add the aem-utils.all and aem-utils.core-bundle artifact to the <dependencies> section

<dependency>
    <groupId>com.merkle.oss.aem</groupId>
    <artifactId>aem-utils.all</artifactId>
    <version>5.1.2</version>
    <type>zip</type>
</dependency>
<dependency>
    <groupId>com.merkle.oss.aem</groupId>
    <artifactId>aem-utils.core-bundle</artifactId>
    <version>5.1.2</version>
    <scope>provided</scope>
</dependency>

Java support

Embed the package into your core module to make use of the Java API:

<dependency>
    <groupId>com.merkle.oss.aem</groupId>
    <artifactId>aem-utils.core-bundle</artifactId>
</dependency>

Package embedding

Embed the package into your all deployment module using the filevault-package-maven-plugin:

<embedded>
    <groupId>com.merkle.oss.aem</groupId>
    <artifactId>aem-utils.all</artifactId>
    <target>/apps/{your/install/path}/install</target>
</embedded>

Development

Build the full package

    mvn clean install -PautoInstallBundle

Build and deploy the full package to a local AEM Author:

    mvn clean install -PautoInstallPackage

Compatibility & Requirements

AEM Version

This tool requires AEM Version 2026.6.26635.20260611T122956Z-260500 or higher.

Platform Support

  • AEM as a Cloud Service (AEMaaCS): This tool is primarily designed and optimized for AEMaaCS environments.
  • AEM On-Premise / Adobe Managed Services (AMS): While the codebase is compatible with standard AEM On-Premise/AMS installations, please note that it has not been formally tested in these environments.

About

A developer toolkit engineered to modernize and streamline the development experience on AEM.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages