@Transactional(rollbackFor = { Exception.class }) public void deleteGeodesk(Geodesk l) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(l)) { factory.getCurrentSession().delete(l); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Verwijderen Geodesk", securityContext.getUserName()); } }
@Transactional(rollbackFor = { Exception.class }) public void deleteGeodesk(Geodesk l) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(l)) { factory.getCurrentSession().delete(l); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Verwijderen Geodesk", securityContext.getUserName()); } }
public void saveOrUpdateLayerModel(LayerModel lm) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).saveAllowed(lm)) { factory.getCurrentSession().saveOrUpdate(lm); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Save layermodel", securityContext.getUserName()); } }
public void saveOrUpdateLayerModel(LayerModel lm) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).saveAllowed(lm)) { factory.getCurrentSession().saveOrUpdate(lm); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Save layermodel", securityContext.getUserName()); } }
public LayerModel getLayerModelById(String id) throws GeomajasSecurityException { LayerModel l = (LayerModel) factory.getCurrentSession().get(LayerModel.class, id); if (l != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(l)) { return l; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read layermodel", securityContext.getUserName()); } } else { return null; } }
public LayerModel getLayerModelById(String id) throws GeomajasSecurityException { LayerModel l = (LayerModel) factory.getCurrentSession().get(LayerModel.class, id); if (l != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(l)) { return l; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read layermodel", securityContext.getUserName()); } } else { return null; } }
public Geodesk getGeodeskById(String uuid) throws GeomajasSecurityException { Geodesk l = (Geodesk) factory.getCurrentSession().get(Geodesk.class, uuid); if (l != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(l)) { return l; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read Geodesk", securityContext.getUserName()); } } else { return null; } }
public Geodesk getGeodeskById(String uuid) throws GeomajasSecurityException { Geodesk l = (Geodesk) factory.getCurrentSession().get(Geodesk.class, uuid); if (l != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(l)) { return l; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read Geodesk", securityContext.getUserName()); } } else { return null; } }
public void deleteBlueprint(Blueprint bp) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(bp)) { bp.setDeleted(true); factory.getCurrentSession().saveOrUpdate(bp); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Delete blueprint", securityContext.getUserName()); } }
public LayerModel getLayerModelByClientLayerId(String id) throws GeomajasSecurityException { LayerModel l = getLayerModelByClientLayerIdInternal(id); if (l != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(l)) { return l; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read layermodel", securityContext.getUserName()); } } else { return null; } }
public void deleteBlueprint(Blueprint bp) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(bp)) { bp.setDeleted(true); factory.getCurrentSession().saveOrUpdate(bp); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Delete blueprint", securityContext.getUserName()); } }
public void saveOrUpdateBlueprint(Blueprint bp) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).saveAllowed(bp)) { saveOrUpdateBlueprintInternal(bp); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Save blueprint", securityContext.getUserName()); } }
public void saveOrUpdateBlueprint(Blueprint bp) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).saveAllowed(bp)) { saveOrUpdateBlueprintInternal(bp); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Save blueprint", securityContext.getUserName()); } }
public Blueprint getBlueprintById(String uuid) throws GeomajasSecurityException { Blueprint bp = getBlueprintByIdInternal(uuid); if (bp != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(bp)) { return bp; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read blueprint", securityContext.getUserName()); } } else { return null; } }
public LayerModel getLayerModelByClientLayerId(String id) throws GeomajasSecurityException { LayerModel l = getLayerModelByClientLayerIdInternal(id); if (l != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(l)) { return l; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read layermodel", securityContext.getUserName()); } } else { return null; } }
public Blueprint getBlueprintById(String uuid) throws GeomajasSecurityException { Blueprint bp = getBlueprintByIdInternal(uuid); if (bp != null) { if (((DeskmanagerSecurityContext) securityContext).readAllowed(bp)) { return bp; } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Read blueprint", securityContext.getUserName()); } } else { return null; } }
public void deleteLayerModel(LayerModel lm) throws GeomajasSecurityException, HibernateException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(lm)) { if (!isLayerModelInUse(lm.getClientLayerId())) { lm.setDeleted(true); factory.getCurrentSession().update(lm); } else { throw new HibernateException("Layermodel is still in use."); } } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Remove layermodel", securityContext.getUserName()); } }
public void deleteLayerModel(LayerModel lm) throws GeomajasSecurityException, HibernateException { if (((DeskmanagerSecurityContext) securityContext).deleteAllowed(lm)) { if (!isLayerModelInUse(lm.getClientLayerId())) { lm.setDeleted(true); factory.getCurrentSession().update(lm); } else { throw new HibernateException("Layermodel is still in use."); } } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Remove layermodel", securityContext.getUserName()); } }
@Transactional(rollbackFor = { Exception.class }) public void saveOrUpdateGeodesk(Geodesk l) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).saveAllowed(l)) { Date date = new Date(); String fullName = ((DeskmanagerSecurityContext) securityContext).getFullName(); if (l.getCreationBy() == null) { l.setCreationBy(fullName); } if (l.getCreationDate() == null) { l.setCreationDate(date); } l.setLastEditDate(date); l.setLastEditBy(fullName); factory.getCurrentSession().saveOrUpdate(l); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Opslaan Geodesk", securityContext.getUserName()); } }
@Transactional(rollbackFor = { Exception.class }) public void saveOrUpdateGeodesk(Geodesk l) throws GeomajasSecurityException { if (((DeskmanagerSecurityContext) securityContext).saveAllowed(l)) { Date date = new Date(); String fullName = ((DeskmanagerSecurityContext) securityContext).getFullName(); if (l.getCreationBy() == null) { l.setCreationBy(fullName); } if (l.getCreationDate() == null) { l.setCreationDate(date); } l.setLastEditDate(date); l.setLastEditBy(fullName); factory.getCurrentSession().saveOrUpdate(l); } else { throw new GeomajasSecurityException(ExceptionCode.COMMAND_ACCESS_DENIED, "Opslaan Geodesk", securityContext.getUserName()); } }