public String buildQuickLinksProfile(@Nullable Object globalFiltersRaw, @Nullable Object serviceFiltersRaw) throws QuickLinksProfileEvaluationException {
    try {
      List<Filter> globalFilters = buildQuickLinkFilters(globalFiltersRaw);
      List<Service> services = buildServices(serviceFiltersRaw);
      QuickLinksProfile profile = QuickLinksProfile.create(globalFilters, services);
      // sanity check: this should throw QuickLinksProfileEvaluationException if the profile is invalid
      new DefaultQuickLinkVisibilityController(profile);
      return new QuickLinksProfileParser().encode(profile);
    }
    catch (QuickLinksProfileEvaluationException ex) {
      throw ex;
    }
    catch (Exception ex) {
      throw new QuickLinksProfileEvaluationException("Error interpreting quicklinks profile data", ex);
    }
  }
@param globalFiltersRaw The data in the request belonging to the "quicklinks_profile/filters" key.
@param serviceFiltersRaw The data in the request belonging to "quicklinks_profile/services"
@return The quicklinks profile as Json encoded string.
@throws QuickLinksProfileEvaluationException when the received data defines an invalid profile. This can be of various
   reasons: the received data is has invalid structure, critical data is missing or there are contradicting filter
   rules in the profile
ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilder.java