private void setVisibilityAndOverrides(String serviceName, List<QuickLinksConfigurationInfo> serviceQuickLinks) {
    QuickLinkVisibilityController visibilityController = getManagementController().getQuicklinkVisibilityController();

    for(QuickLinksConfigurationInfo configurationInfo: serviceQuickLinks) {
      for (QuickLinks links: configurationInfo.getQuickLinksConfigurationMap().values()) {
        for(Link link: links.getQuickLinksConfiguration().getLinks()) {
          link.setVisible(visibilityController.isVisible(serviceName, link));
          visibilityController.getUrlOverride(serviceName, link).ifPresent(link::setUrl);
        }
      }
    }
  }
Sets the visibility flag of the links based on the actual quicklinks profile (if exists).
@param serviceName the name of the service
@param serviceQuickLinks the links
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/QuickLinkArtifactResourceProvider.java