Package io.wcm.wcm.commons.instancetype
Interface InstanceTypeService
@ProviderType
public interface InstanceTypeService
Allows to detect if the current AEM instance is an author or publish instance.
This service does not rely in SlingSettingServices which is deprecated and subject to removal in latest
AEM versions.
Instead, it is based on a OSGi configuration which should be configured properly for author and publish instances.
If not configured, it "guesses" the instance type from other OSGi configs and writes a warning in the logs.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a set with a single "author" or "publish" run mode string.booleanisAuthor()Returns true if code is running on AEM author instance.booleanReturns true if code is running on AEM publish instance.
-
Method Details
-
isAuthor
boolean isAuthor()Returns true if code is running on AEM author instance.- Returns:
- true if AEM author instance.
-
isPublish
boolean isPublish()Returns true if code is running on AEM publish instance.- Returns:
- true if AEM publish instance.
-
getRunModes
Returns a set with a single "author" or "publish" run mode string. This method is provided for for compatibility with code relying on sets of run modes formerly provided bySlingSettingsService.- Returns:
- Set with a single element: Either "author" or "publish".
-