use of org.jboss.pnc.client.GenericSettingClient in project bacon by project-ncl.
the class PncClientHelper method printBannerIfNecessary.
private static void printBannerIfNecessary(Configuration configuration) {
if (!bannerChecked) {
try (GenericSettingClient genericSettingClient = new GenericSettingClient(configuration)) {
String banner = genericSettingClient.getAnnouncementBanner().getBanner();
if (banner != null && !banner.isEmpty()) {
log.warn("***********************");
log.warn("Announcement: {}", banner);
log.warn("***********************");
}
} catch (RemoteResourceException e) {
log.error(e.getMessage());
}
bannerChecked = true;
}
}
Aggregations