private Boolean isValidCustomCommand(ActionExecutionContext
      actionExecutionContext, RequestResourceFilter resourceFilter)
      throws AmbariException {

    if (actionExecutionContext.isFutureCommand()) {
      return true;
    }

    String clusterName = actionExecutionContext.getClusterName();
    String serviceName = resourceFilter.getServiceName();
    String componentName = resourceFilter.getComponentName();
    String commandName = actionExecutionContext.getActionName();

    if (componentName == null) {
      return false;
    }

    return isValidCustomCommand(clusterName, serviceName, componentName, commandName);
  }
Helper class containing logic to process custom command execution requests .
This class has special support needed for SERVICE_CHECK and DECOMMISSION.
These commands are not pass through as Ambari has specific persistence requirements.
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java