* @param directoryModel
* @return
*/
private DirectoryModel saveDirectory(DirectoryModel directoryModel) {
// IDirectory directoryImpl = directoryModelWrapperFactory.unWrap(directoryModel);
DirectoryModel savedDirectoryModel = null;
try {
savedDirectoryModel = (DirectoryModel) ConfigAPIClient.saveDirectory(directoryModel);
if (directoryModel.getDirectory() != null && savedDirectoryModel.getDirectory() != null) {
directoryModel.getDirectory().setTimestamp(
savedDirectoryModel.getDirectory().getTimestamp());
}
savedDirectoryModel.setDirectory(directoryModel.getDirectory());
savedDirectoryModel.setConfigList(directoryModel.getConfigList());
savedDirectoryModel.setSubDirectoriesList(directoryModel.getSubDirectoriesList());
// savedDirectoryModel = directoryModelWrapperFactory.wrap(savedDirectoryImpl);
}
catch (PersistenceException e) {
e.printStackTrace();
applicationController.errorMessage("Error saving directory " + directoryModel.getName()