use of com.evolveum.midpoint.common.configuration.api.MidpointConfiguration in project midpoint by Evolveum.
the class TaskManagerConfiguration method checkAllowedKeys.
void checkAllowedKeys(MidpointConfiguration masterConfig) throws TaskManagerConfigurationException {
Configuration c = masterConfig.getConfiguration(TASK_MANAGER_CONFIG_SECTION);
checkAllowedKeys(c, KNOWN_KEYS);
}
use of com.evolveum.midpoint.common.configuration.api.MidpointConfiguration in project midpoint by Evolveum.
the class PageAccounts method downloadPerformed.
private void downloadPerformed(AjaxRequestTarget target, String fileName, AjaxDownloadBehaviorFromFile downloadBehavior) {
MidpointConfiguration config = getMidpointConfiguration();
downloadFile = new File(config.getMidpointHome() + "/export/" + fileName);
downloadBehavior.initiate(target);
}
use of com.evolveum.midpoint.common.configuration.api.MidpointConfiguration in project midpoint by Evolveum.
the class PageAccounts method createFilesModel.
private LoadableModel<List<String>> createFilesModel() {
return new LoadableModel<List<String>>(false) {
@Override
protected List<String> load() {
String[] filesArray;
try {
MidpointConfiguration config = getMidpointConfiguration();
File exportFolder = new File(config.getMidpointHome() + "/export");
filesArray = exportFolder.list(new FilenameFilter() {
@Override
public boolean accept(java.io.File dir, String name) {
return name.endsWith("xml");
}
});
} catch (Exception ex) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't list files", ex);
getSession().error("Couldn't list files, reason: " + ex.getMessage());
throw new RestartResponseException(PageDashboard.class);
}
if (filesArray == null) {
return new ArrayList<>();
}
List<String> list = Arrays.asList(filesArray);
Collections.sort(list);
return list;
}
};
}
Aggregations