Skip to content

Commit

Permalink
cosmetic: update code formatting to latest checkstyle ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Dec 4, 2024
1 parent 3000159 commit 9a41e7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import static io.wcm.caconfig.extensions.persistence.impl.PersistenceUtils.ensureContainingPage;
import static io.wcm.caconfig.extensions.persistence.impl.PersistenceUtils.ensurePageIfNotContainingPage;
import static io.wcm.caconfig.extensions.persistence.impl.PersistenceUtils.getOrCreateResource;
import static io.wcm.caconfig.extensions.persistence.impl.PersistenceUtils.isItemModifiedOrNewlyAdded;
import static io.wcm.caconfig.extensions.persistence.impl.PersistenceUtils.replaceProperties;
import static io.wcm.caconfig.extensions.persistence.impl.PersistenceUtils.updatePageLastMod;

Expand Down Expand Up @@ -56,6 +57,7 @@
/**
* AEM-specific persistence strategy that has higher precedence than the default strategy from Sling,
* but lower precedence that the persistence strategy that is part of AEM since version 6.3.
*
* <p>
* It supports reading configurations from cq:Page nodes in /conf, the configuration is read from the jcr:content child
* node. Unlike the persistence strategy in AEM 6.3 this also supports writing configuration to /conf.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
import com.day.cq.wcm.api.reference.ReferenceProvider;

/**
* <p>
* This implementation of {@link ReferenceProvider} allows to resolve references of a given {@link Resource} to
* context-aware configurations.
* </p>
*
* <p>
* This is for example used by ActivationReferenceSearchServlet to resolve referenced content of pages during activation
* of a page using AEM sites. Returning the configurations allows the editor to activate them along with the page
* referring to them.
* </p>
*
* <p>
* This component can be disabled by configuration, but its enabled by default.
* </p>
Expand Down Expand Up @@ -130,7 +130,8 @@ public List<com.day.cq.wcm.api.reference.Reference> findReferences(Resource reso
Set<String> configurationBuckets = new LinkedHashSet<>(configurationResourceResolverConfig.configBucketNames());

for (String configurationName : configurationMetadatas.keySet()) {
Iterator<Resource> configurationInheritanceChain = configurationResourceResolvingStrategy.getResourceInheritanceChain(resource, configurationBuckets, configurationName);
Iterator<Resource> configurationInheritanceChain = configurationResourceResolvingStrategy.getResourceInheritanceChain(resource, configurationBuckets,
configurationName);
Map<String, Page> referencePages = new LinkedHashMap<>();

while (configurationInheritanceChain != null && configurationInheritanceChain.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@
* to the core components. It implements a much simplified logic compared to {@link ConfigurationReferenceProvider}
* and does not properly detect the last modification date if one of the wcm.io persistence strategies
* is used which stores the configuration in AEM pages that can be properly activated.
*
* <p>
* To avoid conflicts with the two implementations trying to achieve the same, this services checks if
* the Core Component reference provider is present, and deactivates it.
* </p>
*
* <p>
* Unfortunately there is no better way, as the Core Component reference provider does not support to be disabled via
* OSGi configuration, and the AEM WCM Core implementation does not sort the reference providers by service ranking.
* If both reference providers are active at the same time it's a matter of luck who "wins".
* </p>
*
* <p>
* The implementation of this service is heavily inspired by the "Component Disabler" of ACS AEM Commons.
* </p>
Expand Down

0 comments on commit 9a41e7b

Please sign in to comment.