use of io.datarouter.clustersetting.ClusterSettingValidity in project datarouter by hotpads.
the class ClusterSettingService method scanClusterSettingAndValidityWithPrefix.
public Scanner<ClusterSettingAndValidityJspDto> scanClusterSettingAndValidityWithPrefix(String prefix) {
WebappInstance currentWebappInstance = webappInstanceDao.get(webappInstanceService.buildCurrentWebappInstanceKey());
Range<ClusterSettingKey> range = prefix == null ? Range.everything() : KeyRangeTool.forPrefixWithWildcard(prefix, name -> new ClusterSettingKey(name, null, null, null));
return clusterSettingDao.scan(range).map(setting -> {
ClusterSettingValidity validity = getValidityForWebappInstance(setting, currentWebappInstance);
return new ClusterSettingAndValidityJspDto(setting, validity);
});
}
Aggregations