@Test public void testHandleDeleteAdmin() throws Exception { Map<String, String> map = buildParams().put(ActionConstants.PARAM_ID, 1).done(); ActionParameters params = createActionParams(map, getAdminUser()); handler.handleDelete(params); verifyResponseContent(ResourceHelper.readJSONResource("MapLayerGroupsHandlerTest-find-expected.json", this)); }
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);  }