@ProviderType @Deprecated public final class RunMode extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AUTHOR
Deprecated.
Runmode for author instance
|
static String |
PUBLISH
Deprecated.
Runmode for publish instance
|
Modifier and Type | Method and Description |
---|---|
static boolean |
disableIfNoRunModeActive(Set<String> runModes,
String[] allowedRunModes,
org.osgi.service.component.ComponentContext componentContext,
org.slf4j.Logger log)
Deprecated.
Use this to disable a component if none of its run modes are active.
|
static boolean |
disableIfNotAuthor(Set<String> runModes,
org.osgi.service.component.ComponentContext componentContext,
org.slf4j.Logger log)
Deprecated.
Use this to disable a component if the runmode "author" is not active.
|
static boolean |
disableIfNotPublish(Set<String> runModes,
org.osgi.service.component.ComponentContext componentContext,
org.slf4j.Logger log)
Deprecated.
Use this to disable a component if the runmode "publish" is not active.
|
static boolean |
is(Set<String> runModes,
String... expectedRunModes)
Deprecated.
Checks if given run mode is active.
|
static boolean |
isAuthor(Set<String> runModes)
Deprecated.
Checks if context is running on author instance.
|
static boolean |
isPublish(Set<String> runModes)
Deprecated.
Checks if context is running on publish instance.
|
public static final String AUTHOR
public static final String PUBLISH
public static boolean is(Set<String> runModes, String... expectedRunModes)
runModes
- Run modes for current instanceexpectedRunModes
- Run mode(s) to check forpublic static boolean isAuthor(Set<String> runModes)
runModes
- Run modespublic static boolean isPublish(Set<String> runModes)
runModes
- Run modespublic static boolean disableIfNoRunModeActive(Set<String> runModes, String[] allowedRunModes, org.osgi.service.component.ComponentContext componentContext, org.slf4j.Logger log)
com.day.cq.commons.RunModeUtil#disableIfNoRunModeActive(RunMode, String[], ComponentContext, Logger)
method which is deprecated.runModes
- Run modesallowedRunModes
- Allowed run modescomponentContext
- OSGI component contextlog
- Loggerpublic static boolean disableIfNotAuthor(Set<String> runModes, org.osgi.service.component.ComponentContext componentContext, org.slf4j.Logger log)
com.day.cq.commons.RunModeUtil#disableIfNoRunModeActive(RunMode, String[], ComponentContext, Logger)
method which is deprecated.runModes
- Run modescomponentContext
- OSGI component contextlog
- Loggerpublic static boolean disableIfNotPublish(Set<String> runModes, org.osgi.service.component.ComponentContext componentContext, org.slf4j.Logger log)
com.day.cq.commons.RunModeUtil#disableIfNoRunModeActive(RunMode, String[], ComponentContext, Logger)
method which is deprecated.runModes
- Run modescomponentContext
- OSGI component contextlog
- LoggerCopyright © 2014–2017 wcm.io. All rights reserved.