Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:APIJSON APIJSON Demo DemoFunctionParser BigData

From Leeroopedia
Knowledge Sources
Domains API_Design, Business_Logic
Last Updated 2026-10-14 00:00 GMT

Overview

Concrete tool for remote function invocation with user-session context and comment-cascade deletion in the APIJSON BigData server variant.

Description

The DemoFunctionParser class (BigData variant) extends APIJSONFunctionParser<Long> and provides remotely callable functions: getCurrentUser, getCurrentUserId, getCurrentUserIdAsList, getCurrentContactIdList, verifyIdList, verifyURLList, deleteCommentOfMoment, deleteChildComment (with recursive child comment ID collection), getIdList, and verifyAccess.

Usage

Use these functions in APIJSON request bodies via the "key()":"functionName()" syntax when the BigData server needs server-side business logic.

Code Reference

Source Location

Signature

public class DemoFunctionParser extends APIJSONFunctionParser<Long> {
    public Visitor<Long> getCurrentUser(@NotNull JSONObject current);
    public Long getCurrentUserId(@NotNull JSONObject current);
    public List<Long> getCurrentUserIdAsList(@NotNull JSONObject current);
    public List<Long> getCurrentContactIdList(@NotNull JSONObject current);
    public void verifyIdList(@NotNull JSONObject current, @NotNull String idList) throws Exception;
    public void verifyURLList(@NotNull JSONObject current, @NotNull String urlList) throws Exception;
    public int deleteCommentOfMoment(@NotNull JSONObject current, @NotNull String momentId) throws Exception;
    public int deleteChildComment(@NotNull JSONObject current, @NotNull String toId) throws Exception;
    public JSONArray getIdList(@NotNull JSONObject current);
    public Object verifyAccess(@NotNull JSONObject current) throws Exception;
}

Import

import apijson.demo.DemoFunctionParser;

I/O Contract

See Implementation:APIJSON_APIJSON_Demo_DemoFunctionParser for the I/O contract; the BigData variant provides the same function interface.

Usage Examples

See Implementation:APIJSON_APIJSON_Demo_DemoFunctionParser usage examples.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment