Cloud Manager code quality · Content package rules (OakPAL) · updated

CQBP-84: Customers should not implement or extend Product APIs annotated with @ProviderType

CQBP-84 fires when your code implements or extends an AEM interface annotated @ProviderType; Adobe's example is a class implementing com.day.cq.wcm.api.Page. Stop implementing it: wrap or adapt the product object instead, and keep your own interface for anything custom.

Rule keyCQBP-84
Adobe's rule nameCustomers should not implement or extend Product APIs annotated with @ProviderType
TypeBug
SeverityCritical
Since2018.7.0
Checked byOakPAL scan of your content packages

Why Cloud Manager flags it

In OSGi semantic versioning, @ProviderType means 'only the provider (Adobe) implements this'. Adobe may add methods to such an interface in a minor version, which is fine for code that calls it but breaks code that implements it: your class no longer satisfies the interface and fails to load. On AEM as a Cloud Service the product updates continuously, so this can happen without any change on your side.

Most hits come from test stubs, decorators (a 'SafePage' that implements Page and delegates) and old integrations. Test code compiled only in src/test is usually not deployed, but the rule may still report it depending on how the module is built.

Replacement patterns

Why you implemented itDo this instead
Decorator adding helper methodsA Sling Model adapted from Page or Resource, holding the Page
Fake Page in unit testsAEM Mocks (io.wcm.testing) to create real pages in a mock repository
Custom Page for a non-JCR sourceYour own interface; adapt to Page only where AEM needs it

Example

Non-compliant (as in Adobe's example)

public class CustomPage implements com.day.cq.wcm.api.Page {
  // ... delegates to a real page
}

Compliant: a model that holds the page

@Model(adaptables = Resource.class)
public class PageInfo {
  @ScriptVariable private Page currentPage;
  public String getNavTitle() {
    return Optional.ofNullable(currentPage.getNavigationTitle()).orElse(currentPage.getTitle());
  }
}

How to fix it

  1. List classes that implement com.day.cq.*, com.adobe.* or org.apache.sling.* interfaces; check each interface's package-info or Javadoc for @ProviderType.
  2. Replace decorators with composition (a field holding the product object).
  3. Move test doubles to AEM Mocks.
  4. Rebuild against the latest AEM SDK API JAR to confirm nothing else implements provider types.

Does it stop the pipeline?

A critical bug lowers the Reliability Rating to D. Adobe's critical gate only trips below D, so on its own it does not stop the pipeline, but it is one step away and it shows as an open issue in the report.

If a finding is a genuine false positive, Adobe's code quality page lets you annotate the code with @SuppressWarnings and the rule ID. In a full-stack pipeline, important failures can be overridden by a deployment manager, project manager or business lead; in a code-quality-only pipeline they cannot.

Related pages on this site

Questions

How do I know an interface is @ProviderType?

It is annotated on the interface or in the package's package-info.java (org.osgi.annotation.versioning.ProviderType). The AEM SDK Javadoc shows it.

Are @ConsumerType interfaces fine to implement?

Yes. @ConsumerType interfaces, such as many listener and process interfaces, are meant to be implemented by you.

Does this stop the pipeline?

A critical bug lowers the Reliability Rating to D, the last passing grade, so not by itself. It can stop your site after an AEM update, which is worse.

See the Cloud Service blockers in your code before Cloud Manager shows them. The free Surge Migrate readiness scan reads a repository zip or a Best Practices Analyzer CSV in your browser and lists them with file, fix and effort. Nothing is uploaded.

Sources

Rule key, type, severity and version are as listed on Adobe's page, checked 10 Nov 2026. Explanations and examples are ours unless marked as Adobe's.

Scan, Convert, Verify, Install

How Surge Migrate helps with a move to AEM as a Cloud Service

Surge Migrate moves a website from any CMS to any CMS, and AEM as a Cloud Service is one of the systems it writes. Pages are converted automatically, and you check the result before you install anything.

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page becomes an Edge Delivery document, an AEM Core Component page and import files for 7 other systems. 10 pages free; 500 or 2,000 pages in one paid run.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →

Content packages installed on a local AEM as a Cloud Service SDK. See the worked examples.

On AEM 6.5 code: Scan AEM 6.5 code free. The scan reads a repository zip or a Best Practices Analyzer CSV in your browser and lists Cloud Service blockers with file, fix and effort. Nothing is uploaded.