protected static Object getQueryParameterValue(String queryParameterId, Predicate predicate) {

    Object result = null;

    if (predicate instanceof EqualsPredicate) {
      EqualsPredicate equalsPredicate = (EqualsPredicate) predicate;
      if (queryParameterId.equals(equalsPredicate.getPropertyId())) {
        return equalsPredicate.getValue();
      }
    } else if (predicate instanceof ArrayPredicate) {
      ArrayPredicate arrayPredicate  = (ArrayPredicate) predicate;
      for (Predicate predicateItem : arrayPredicate.getPredicates()) {
        result = getQueryParameterValue(queryParameterId, predicateItem);
        if (result != null) {
          return result;
        }
      }

    }
    return result;
  }
Extracting given query_parameter value from the predicate
@param queryParameterId  query parameter id
@param predicate         predicate
@return the query parameter
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java