private void deleteCategory(Map<String, Object> jsonrpc2Params) throws Exception {

        Map<String, Object> params = getParams(jsonrpc2Params,
                Constants.Param.Name.TYPE,
                Constants.Param.Name.CATEGORY_ID);

        String type = (String) params.get(Constants.Param.Name.TYPE);
        int categoryId = (Integer) params.get(Constants.Param.Name.CATEGORY_ID);
        Object category = null;

        if(type.equals(Constants.Param.Value.PUBLIC)){
            category = em.find(Category.class, categoryId);
        } else if(type.equals(Constants.Param.Value.PRIVATE)){
            category = em.find(PrivateCategory.class, categoryId);
        }else{
            throwJSONRPC2Error(JSONRPC2Error.INVALID_PARAMS, Constants.Errors.PARAM_VALUE_NOT_ALLOWED, "Type: " + type);
        }
        if(category == null){
            responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.OBJECT_NOT_FOUND);
        }else{
            removeObjects(category);
            responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.SUCCESS);
        }
    }