CustomElementSetsListResponse exec() throws Exception {
SettingManager sm = jeevesApplicationContext.getBean(SettingManager.class);
boolean cswEnabled = sm.getValueAsBool("system/csw/enable");
CustomElementSetsListResponse response = new CustomElementSetsListResponse();
List<String> xpaths = new ArrayList<String>();
if(cswEnabled) {
List<CustomElementSet> records = customElementSetRepository.findAll();
for(CustomElementSet record : records) {
xpaths.add(record.getXpath());
}
}
response.setXpaths(xpaths);
response.setCswEnabled(cswEnabled);
//if(Log.isDebugEnabled(Geonet.CUSTOM_ELEMENTSET))
// Log.debug(Geonet.CUSTOM_ELEMENTSET, "get customelementset:\n" + Xml.getString(result));
return response;