Class RunModeUtil

java.lang.Object
com.day.cq.commons.RunModeUtil

@Deprecated public class RunModeUtil extends Object
Deprecated.
RunMode utilities. Instead of directly using the run mode service, it is better to make the component in question require a configuration (see OSGI Declarative Services Spec: configuration policy). In this case, a component gets only active if a configuration is available. Such a configuration can be put into the repository for the specific run mode.
  • Field Details

    • RUN_MODES_PROPERTY

      public static final String RUN_MODES_PROPERTY
      Deprecated.
      Name to use for the property that configures the run modes of a component
      See Also:
  • Constructor Details

    • RunModeUtil

      public RunModeUtil()
      Deprecated.
  • Method Details

    • disableIfNoRunModeActive

      public static boolean disableIfNoRunModeActive(RunMode rm, String[] componentRunModes, ComponentContext ctx, Logger log)
      Deprecated.
      Use this to disable a component if none of its run modes are active
      Parameters:
      rm - RunMode
      componentRunModes - component run modes
      ctx - component context
      log - logger
      Returns:
      true if component was disabled