@Test(expected = ActionDeniedException.class) public void testHandleDeleteLoggedIn() throws Exception { ActionParameters params = createActionParams(createDummyLocale(), getLoggedInUser()); handler.handleDelete(params); fail("Should have thrown denied exception"); }
public void handleDelete(ActionParameters params) throws ActionException { params.requireAdminUser(); final int groupId = params.getRequiredParamInt(PARAM_ID); final Object deleteLayers = params.getHttpParam(PARAM_DELETE_LAYERS); final MaplayerGroup maplayerGroup = oskariMapLayerGroupService.find(groupId); if (deleteLayers != null) { handleDelete(params, maplayerGroup, deleteLayers); } else { handleDeleteLegacy(params, maplayerGroup); } }
MapLayerGroupsHandler extends RestActionHandler { public void handleDelete(ActionParameters params) throws ActionException { params.requireAdminUser(); final int groupId = params.getRequiredParamInt(PARAM_ID); final Object deleteLayers = params.getHttpParam(PARAM_DELETE_LAYERS); final MaplayerGroup maplayerGroup = oskariMapLayerGroupService.find(groupId); if (deleteLayers != null) { handleDelete(params, maplayerGroup, deleteLayers); } else { handleDeleteLegacy(params, maplayerGroup); } } }
MapLayerGroupsHandler extends RestActionHandler { public void handleDelete(ActionParameters params) throws ActionException { params.requireAdminUser(); final int groupId = params.getRequiredParamInt(PARAM_ID); final Object deleteLayers = params.getHttpParam(PARAM_DELETE_LAYERS); final MaplayerGroup maplayerGroup = oskariMapLayerGroupService.find(groupId); if (deleteLayers != null) { handleDelete(params, maplayerGroup, deleteLayers); } else { handleDeleteLegacy(params, maplayerGroup); } }  }
MapLayerGroupsHandler extends RestActionHandler { public void handleDelete(ActionParameters params) throws ActionException { params.requireAdminUser(); final int groupId = params.getRequiredParamInt(PARAM_ID); final Object deleteLayers = params.getHttpParam(PARAM_DELETE_LAYERS); final MaplayerGroup maplayerGroup = oskariMapLayerGroupService.find(groupId); if (deleteLayers != null) { handleDelete(params, maplayerGroup, deleteLayers); } else { handleDeleteLegacy(params, maplayerGroup); } }  void setOskariMapLayerGroupService(final OskariMapLayerGroupService service); void setLinkService(OskariLayerGroupLinkService linkService); void init(); void handleGet(ActionParameters params); void handlePut(ActionParameters params); void handlePost(ActionParameters params); void handleDelete(ActionParameters params); }
MapLayerGroupsHandler extends RestActionHandler { public void handleDelete(ActionParameters params) throws ActionException { params.requireAdminUser(); final int groupId = params.getRequiredParamInt(PARAM_ID); final Object deleteLayers = params.getHttpParam(PARAM_DELETE_LAYERS); final MaplayerGroup maplayerGroup = oskariMapLayerGroupService.find(groupId); if (deleteLayers != null) { handleDelete(params, maplayerGroup, deleteLayers); } else { handleDeleteLegacy(params, maplayerGroup); } }  void setOskariMapLayerGroupService(final OskariMapLayerGroupService service); void setLinkService(OskariLayerGroupLinkService linkService); void init(); void handleGet(ActionParameters params); void handlePut(ActionParameters params); void handlePost(ActionParameters params); void handleDelete(ActionParameters params);  }