private void modifyNote(Map<String, Object> jsonrpc2Params) throws Exception {
        Map<String, Object> params = getParams(jsonrpc2Params,
                new NullableExtendedParam(Constants.Param.Name.NOTE_ID, false),
                new NullableExtendedParam(Constants.Param.Name.TEXT, true),
                new NullableExtendedParam(Constants.Param.Name.HEADLINE, true));

        int noteId = (Integer)params.get(Constants.Param.Name.NOTE_ID);
        String text = (String)params.get(Constants.Param.Name.TEXT);
        String headline = (String)params.get(Constants.Param.Name.HEADLINE);
        Note note = em.find(Note.class, noteId);
        if(note == null){
            responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.OBJECT_NOT_FOUND);
            return;
        }
        if(note.getAccount().getId() != accountId){
            throwJSONRPC2Error(JSONRPC2Error.INVALID_PARAMS, Constants.Errors.ACTION_NOT_ALLOWED);
        }
        if(text != null){
            note.setText(text);
        }
        if(headline != null){
            note.setHeadLine(headline);
        }
        persistObjects(note);
        responseParams.put(Constants.Param.Name.NOTE, serialize(note));
        responseParams.put(Constants.Param.Status.STATUS, Constants.Param.Status.SUCCESS);
    }