use of com.runwaysdk.dataaccess.cache.DataNotFoundException in project geoprism-registry by terraframe.
the class ListTypeService method removeVersion.
@Request(RequestType.SESSION)
public void removeVersion(String sessionId, String oid) {
try {
ListTypeVersion version = ListTypeVersion.get(oid);
if (version.getWorking()) {
throw new UnsupportedOperationException("Working versions cannot be deleted");
}
this.enforceWritePermissions(version.getEntry().getListType());
version.delete();
((Session) Session.getCurrentSession()).reloadPermissions();
} catch (DataNotFoundException e) {
// Do nothing
}
}
use of com.runwaysdk.dataaccess.cache.DataNotFoundException in project geoprism-registry by terraframe.
the class TaskTest method testDeleteTask.
@Test
@Request
public void testDeleteTask() {
createInstanceData(chineseSession.getSessionId());
JsonObject chinaJO = getTaskByName(TestTaskType.TestGeoObjectSplitOrphanedChildren.getTemplateKey(), TaskService.getTasksForCurrentUser(chineseSession.getSessionId()).get("resultSet").getAsJsonArray());
TaskService.deleteTask(chineseSession.getSessionId(), chinaJO.get("id").getAsString());
try {
Task.get(chinaJO.get("id").getAsString());
Assert.fail();
} catch (DataNotFoundException e) {
}
}
Aggregations