code: @Deprecated
    public static boolean disableIfNotPublish(Set<String> runModes, ComponentContext componentContext, Logger log) {
      return disableIfNoRunModeActive(runModes, new String[] {
          PUBLISH
      }, componentContext, log);
    }
docs: Use this to disable a component if the runmode "publish" is not active. Component activation status is logged
  with DEBUG level.
  This method is a replacement for the
  <code>com.day.cq.commons.RunModeUtil#disableIfNoRunModeActive(RunMode, String[], ComponentContext, Logger)</code>
  method which is deprecated.
  @param runModes Run modes
  @param componentContext OSGI component context
  @param log Logger
  @return true if component was disabled
  @deprecated Instead of directly using the run modes, 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.