
# Business Logic — JKKGlobalIpAddCfmCC.chkInMap() [45 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKGlobalIpAddCfmCC` |
| Layer | CC/Common Component |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKGlobalIpAddCfmCC.chkInMap()

The `chkInMap` method serves as the **input data validation and parameter extraction** stage within the Global IP Address Addition Confirmation Component (`JKKGlobalIpAddCfmCC`). Its primary business purpose is to verify that all required input fields are present in the incoming request's internal map (`inMap`) and, if valid, transfer them to the component's working area (`ccWorkMap`) for subsequent processing.

This method acts as a **gatekeeper** for the Global IP Address Addition Confirmation screen (`KKSV0004`), a business process in the K-Opticom customer base system (Japanese telecommunications operator). The screen handles the registration of fixed IP address assignments for ISP service contracts — a critical infrastructure provisioning operation where customers subscribe to fiber-to-the-home (FTTH) or other broadband services requiring a static IP.

The method employs the **delegation design pattern**: it does not process data itself, but instead delegates each individual field extraction to `setterWorkParam`, which validates presence and type before transferring. For list-type parameters (message lists used by downstream CBS operations), it delegates to `setterWorkParamList`. If any required key — particularly those with the `key_` prefix — is missing or blank, the method throws a `CCException`, halting processing and returning control to the caller with an error.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["chkInMap start"]) --> LOG1["printlnEjbLog start"]

    LOG1 --> PARAM["Transfer input parameters to ccWorkMap"]

    PARAM --> S1["setterWorkParam func_cd"]
    PARAM --> S2["setterWorkParam key_svc_kei_no"]
    PARAM --> S3["setterWorkParam key_sysid"]
    PARAM --> S4["setterWorkParam key_rsv_aply_ymd"]
    PARAM --> S5["setterWorkParam mskm_sbt_cd"]
    PARAM --> S6["setterWorkParam mskm_uk_dtm"]
    PARAM --> S7["setterWorkParam consmbesn_mskm_stat_skbt_cd"]
    PARAM --> S8["setterWorkParam op_svc_cd"]
    PARAM --> S9["setterWorkParam pcrs_cd"]
    PARAM --> S10["setterWorkParam pplan_cd"]
    PARAM --> S11["setterWorkParam oya_kei_skbt_cd"]
    PARAM --> S12["setterWorkParam svc_kei_ucwk_no"]
    PARAM --> S13["setterWorkParam svc_use_sta_kibo_ymd"]
    PARAM --> S14["setterWorkParam kotei_ip_ad"]
    PARAM --> S15["setterWorkParam netmask"]
    PARAM --> S16["setterWorkParam seiky_kei_no"]
    PARAM --> S17["setterWorkParam rule0059_auto_aply"]
    PARAM --> S18["setterWorkParam svc_chrg_staymd"]
    PARAM --> S19["setterWorkParam ido_div"]
    PARAM --> S20["setterWorkParam svc_kei_kaisen_ucwk_no"]
    PARAM --> S21["setterWorkParam prg_stat"]
    PARAM --> S22["setterWorkParam prg_tkjk_1"]
    PARAM --> S23["setterWorkParam order_sbt_cd"]
    PARAM --> S24["setterWorkParam svc_order_cd"]
    PARAM --> S25["setterWorkParam yokyu_sbt_cd"]
    PARAM --> S26["setterWorkParam odr_hakko_joken_cd"]
    PARAM --> S27["setterWorkParam odr_naiyo_cd"]
    PARAM --> S28["setterWorkParam kk0161_gene_add_dtm"]
    PARAM --> S29["setterWorkParam fixipad_in"]
    PARAM --> S30["setterWorkParam zm0101_upd_dtm_bf"]
    PARAM --> S31["setterWorkParam use_stat_ymd"]
    PARAM --> S32["setterWorkParam shyakk_chuskk_cd_in"]
    PARAM --> S33["setterWorkParam kotei_ip_stku_sbt_cd_in"]
    PARAM --> S34["setterWorkParam use_cnt_in"]

    S34 --> WL1["setterWorkParamList EKK0011D020CBSMsg1List"]
    WL1 --> WL2["setterWorkParamList EKK1091D010CBSMsg1List"]

    WL2 --> LOG2["printlnEjbLog end"]
    LOG2 --> END(["Return / Next"])

    style START fill:#e1f5fe
    style END fill:#e1f5fe
```

**Processing flow summary:**
1. Log the entry point via `printlnEjbLog("chkInMap start")`.
2. Call `setterWorkParam` for each of the 34 scalar string fields. Each call retrieves the value from `inMap`, validates it, and deposits it into `ccWorkMap`. If validation fails, a `CCException` is thrown and the remaining fields are not processed.
3. Call `setterWorkParamList` for 2 list-type fields (`EKK0011D020CBSMsg1List`, `EKK1091D010CBSMsg1List`). These are message list containers used by downstream CBS operations.
4. Log the exit point via `printlnEjbLog("chkInMap end")` and return.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle — provides the database connection context for any lookup operations required during parameter extraction. Not directly used within this method but passed through to delegated methods. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the incoming HTTP/API request data. Contains the `inMap` (internal map) with all input fields from the screen `KKSV0004`. This object is **read** from, not written to, within this method. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `inMap` | `HashMap<String, Object>` | Internal map holding all input values extracted from the request. This is the source from which `setterWorkParam` retrieves each field. |
| `ccWorkMap` | `Map<String, Object>` | Component working area — the destination where validated parameters are stored for use by subsequent methods in the component. |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

No direct SC/CBS calls, entity reads, or table operations are performed within this method. This method is purely a **parameter extraction and validation** routine — it does not access databases, invoke service components, or produce side effects beyond populating `ccWorkMap`.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKGlobalIpAddCfmCC.printlnEjbLog` | JKKGlobalIpAddCfmCC | - | Logs entry/exit messages to the EJB log for debugging and audit trail |
| - | `JKKGlobalIpAddCfmCC.setterWorkParam` | JKKGlobalIpAddCfmCC | - | Private method: reads from `inMap`, validates, and writes to `ccWorkMap` |
| - | `JKKGlobalIpAddCfmCC.setterWorkParamList` | JKKGlobalIpAddCfmCC | - | Private method: reads ArrayList from `inMap`, validates non-empty, and writes to `ccWorkMap` |
| - | `JKKGlobalIpAddCfmCC.chkInMap` → `setterWorkParam` internal calls | - | - | `JKKStringUtil.isNullBlank(String)` — utility to check for null/blank strings |

## 5. Dependency Trace

### Pre-computed evidence from code analysis graph:

Direct callers found: 1 methods.
Terminal operations from this method: `printlnEjbLog` [-], `setterWorkParamList` [-], `setterWorkParamList` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-], `setterWorkParam` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0004 | `KKSV0004OPOperation.executeOperation()` -> `JKKGlobalIpAddCfmCC.execute(handle, param, fixedText)` -> `JKKGlobalIpAddCfmCC.chkInMap(handle, param)` | `setterWorkParam [R] inMap -> ccWorkMap`, `setterWorkParamList [R] inMap -> ccWorkMap`, `printlnEjbLog [Log] EJB log` |

**Call chain details:**
- The screen entry point is `KKSV0004` (Global IP Address Addition Confirmation screen).
- `KKSV0004OPOperation` is the BPM operation class that orchestrates the screen's workflow.
- It invokes `JKKGlobalIpAddCfmCC.execute(handle, param, fixedText)` which is the main public entry point.
- `execute()` calls `chkInMap(handle, param)` as the **first processing step** (after `initSetUp`), ensuring all input data is valid before proceeding to the main business logic.
- This is a **synchronous validation gate** — if `chkInMap` throws a `CCException`, the entire request fails with an input validation error.

## 6. Per-Branch Detail Blocks

The `chkInMap` method contains **no conditional branches** (no `if`/`else`/`switch` statements within its body). It is a linear sequence of `setterWorkParam` and `setterWorkParamList` calls. However, each `setterWorkParam` call internally branches, so those are analyzed below.

**Block 1** — [LINEAR SEQUENCE] (L659-L701)

> The main body: sequentially extracts 34 scalar parameters and 2 list parameters from `inMap` to `ccWorkMap`.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `printlnEjbLog("chkInMap start")` | Log entry point |
| 2 | CALL | `setterWorkParam("func_cd")` | Feature code — determines processing mode (check-only vs. full execution) |
| 3 | CALL | `setterWorkParam("key_svc_kei_no")` | Service contract number |
| 4 | CALL | `setterWorkParam("key_sysid")` | Customer SYSID |
| 5 | CALL | `setterWorkParam("key_rsv_aply_ymd")` | Reservation application date |
| 6 | CALL | `setterWorkParam("mskm_sbt_cd")` | Application type code |
| 7 | CALL | `setterWorkParam("mskm_uk_dtm")` | Operation datetime (YYYYMMDDHHMMSS) |
| 8 | CALL | `setterWorkParam("consmbsn_mskm_stat_skbt_cd")` | Consumer sales application status identifier code |
| 9 | CALL | `setterWorkParam("op_svc_cd")` | Option service code |
| 10 | CALL | `setterWorkParam("pcrs_cd")` | Option service code (PCRS) |
| 11 | CALL | `setterWorkParam("pplan_cd")` | Price plan code |
| 12 | CALL | `setterWorkParam("oya_kei_skbt_cd")` | Parent contract identifier code |
| 13 | CALL | `setterWorkParam("svc_kei_ucwk_no")` | Service contract line item number |
| 14 | CALL | `setterWorkParam("svc_use_sta_kibo_ymd")` | Service start date requested |
| 15 | CALL | `setterWorkParam("kotei_ip_ad")` | Fixed IP address |
| 16 | CALL | `setterWorkParam("netmask")` | Subnet mask |
| 17 | CALL | `setterWorkParam("seiky_kei_no")` | Billing contract number |
| 18 | CALL | `setterWorkParam("rule0059_auto_aply")` | Whether procedural fees are automatically applied |
| 19 | CALL | `setterWorkParam("svc_chrg_staymd")` | Billing start date |
| 20 | CALL | `setterWorkParam("ido_div")` | Transfer/migration classification |
| 21 | CALL | `setterWorkParam("svc_kei_kaisen_ucwk_no")` | Service contract circuit line item number |
| 22 | CALL | `setterWorkParam("prg_stat")` | Progress status |
| 23 | CALL | `setterWorkParam("prg_tkjk_1")` | Progress special item 1 |
| 24 | CALL | `setterWorkParam("order_sbt_cd")` | Order type code |
| 25 | CALL | `setterWorkParam("svc_order_cd")` | Service order code |
| 26 | CALL | `setterWorkParam("yokyu_sbt_cd")` | Request type code |
| 27 | CALL | `setterWorkParam("odr_hakko_joken_cd")` | Order issuance condition code |
| 28 | CALL | `setterWorkParam("odr_naiyo_cd")` | Order content code |
| 29 | CALL | `setterWorkParam("kk0161_gene_add_dtm")` | Generation registration datetime |
| 30 | CALL | `setterWorkParam("fixipad_in")` | Fixed IP address (input) |
| 31 | CALL | `setterWorkParam("zm0101_upd_dtm_bf")` | Update datetime (before) |
| 32 | CALL | `setterWorkParam("use_stat_ymd")` | Service start date |
| 33 | CALL | `setterWorkParam("shyakk_chuskk_cd_in")` | Aggregation bureau code |
| 34 | CALL | `setterWorkParam("kotei_ip_stku_sbt_cd_in")` | Fixed IP acquisition type code |
| 35 | CALL | `setterWorkParam("use_cnt_in")` | Usage count |
| 36 | CALL | `setterWorkParamList("EKK0011D020CBSMsg1List")` | Customer approval acceptance registration message list |
| 37 | CALL | `setterWorkParamList("EKK1091D010CBSMsg1List")` | Option service registration message list |
| 38 | EXEC | `printlnEjbLog("chkInMap end")` | Log exit point |

### Block 1.1 — [NESTED: setterWorkParam internal logic] (L715-L729)

> Each scalar parameter call invokes `setterWorkParam(String key)`, which contains branching logic:

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `obj = (String) this.inMap.get(key)` | Retrieve value from input map by key |
| 2 | IF | `!JKKStringUtil.isNullBlank(obj)` | **Condition:** Value is present and non-blank |
| 2.1 | EXEC | `printlnEjbLog(key + "=" + obj)` | Log the found value |
| 2.2 | SET | `this.ccWorkMap.put(key, obj)` | Transfer to working area |
| 3 | ELSE-IF | `!key.substring(0,4).equals("key_")` | **Condition:** Value is null/blank AND key does NOT start with "key_" prefix |
| 3.1 | EXEC | `printlnEjbLog(key + "=" + obj)` | Log the null value |
| 3.2 | SET | `this.ccWorkMap.put(key, obj)` | Transfer null value (non-critical fields can be absent) |
| 4 | ELSE | **Default:** Value is null/blank AND key starts with "key_" prefix |
| 4.1 | EXEC | `printlnEjbLog(key + "=NULL")` | Log the missing critical field |
| 4.2 | EXEC | `throw new CCException(key + "=NULL", new Exception())` | **CRITICAL:** Throw validation error — halt all processing |

**Business rules embedded in `setterWorkParam`:**
- Fields with `key_` prefix (e.g., `key_svc_kei_no`, `key_sysid`) are **mandatory**. If missing, a `CCException` is thrown.
- Fields without `key_` prefix (e.g., `func_cd`, `order_sbt_cd`) are **optional** — if absent, a null value is stored and processing continues.

### Block 1.2 — [NESTED: setterWorkParamList internal logic] (L747-L758)

> Each list parameter call invokes `setterWorkParamList(String key)`, which validates non-null and non-empty:

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `obj = (ArrayList) this.inMap.get(key)` | Retrieve list from input map by key |
| 2 | IF | `obj == null || obj.size() == 0` | **Condition:** List is null or empty |
| 2.1 | EXEC | `printlnEjbLog(key + "=NULL")` | Log the missing list |
| 2.2 | EXEC | `throw new CCException(key + "=NULL", new Exception())` | **CRITICAL:** Throw validation error |
| 3 | ELSE | List is present and non-empty |
| 3.1 | EXEC | `printlnEjbLog(key + "=" + obj)` | Log the found list |
| 3.2 | SET | `this.ccWorkMap.put(key, obj)` | Transfer list to working area |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `func_cd` | Field | Function code — determines processing mode: `"1"` = full execution, `"2"` = check-only (validation only) |
| `svc_kei_no` | Field | Service contract number — the unique identifier for a customer's service contract line |
| `key_sysid` | Field | Customer SYSID — the customer's system identification number in the telecom billing system |
| `key_rsv_aply_ymd` | Field | Reservation application date — the date when a reservation is applied |
| `mskm_sbt_cd` | Field | Application type code — classifies the type of application (new, change, cancellation, etc.) |
| `mskm_uk_dtm` | Field | Operation datetime — the YYYYMMDDHHMMSS timestamp of the operation |
| `consmbsn_mskm_stat_skbt_cd` | Field | Consumer sales application status identifier code — identifies the current processing status of a consumer application |
| `op_svc_cd` | Field | Option service code — identifies optional services attached to the base service contract |
| `pcrs_cd` | Field | Option service code (PCRS) — Plan/Contract/Rate Selection service code for optional service tiers |
| `pplan_cd` | Field | Price plan code — identifies the billing/price plan selected for the service |
| `oya_kei_skbt_cd` | Field | Parent contract identifier code — links this service line to its parent/master contract |
| `svc_kei_ucwk_no` | Field | Service contract line item number — internal tracking ID for a specific service contract detail |
| `svc_use_sta_kibo_ymd` | Field | Service start date requested — the date from which the customer requests service activation |
| `kotei_ip_ad` | Field | Fixed IP address — a static IPv4 address assigned to the customer's broadband connection |
| `netmask` | Field | Subnet mask — the network mask applied to the fixed IP address |
| `seiky_kei_no` | Field | Billing contract number — the contract number used for invoicing/billing |
| `rule0059_auto_aply` | Field | Whether procedural fees are automatically applied — flag for auto-applying a specific fee rule (Rule 0059) |
| `svc_chrg_staymd` | Field | Billing start date — the date from which billing commences for the service |
| `ido_div` | Field | Transfer/migration classification — indicates whether this is a new connection, transfer, or migration |
| `svc_kei_kaisen_ucwk_no` | Field | Service contract circuit line item number — tracking ID for the circuit-specific line item |
| `prg_stat` | Field | Progress status — tracks the current stage of the contract processing workflow |
| `prg_tkjk_1` | Field | Progress special item 1 — an additional flag field for tracking special processing conditions |
| `order_sbt_cd` | Field | Order type code — classifies the type of order being processed |
| `svc_order_cd` | Field | Service order code — identifies the specific service order within the fulfillment system |
| `yokyu_sbt_cd` | Field | Request type code — classifies the type of customer request |
| `odr_hakko_joken_cd` | Field | Order issuance condition code — determines conditions under which orders are issued |
| `odr_naiyo_cd` | Field | Order content code — specifies the content/type of the order (e.g., FTTH registration, mail change) |
| `kk0161_gene_add_dtm` | Field | Generation registration datetime — the timestamp when this service version/generation was registered |
| `fixipad_in` | Field | Fixed IP address (input) — the fixed IP address provided as an input parameter |
| `zm0101_upd_dtm_bf` | Field | Update datetime (before) — the timestamp of the previous update, used for optimistic locking |
| `use_stat_ymd` | Field | Service start date — the actual date when service utilization begins |
| `shyakk_chuskk_cd_in` | Field | Aggregation bureau code — the regional aggregation office (bureau) responsible for the customer |
| `kotei_ip_stku_sbt_cd_in` | Field | Fixed IP acquisition type code — indicates how the fixed IP was obtained (allocated, borrowed, etc.) |
| `use_cnt_in` | Field | Usage count — the number of times this service has been used/activated |
| `CCException` | Exception | Common Component Exception — the standard exception thrown by CC-layer methods for validation errors |
| `inMap` | Data structure | Internal HashMap holding raw input values from the request before validation |
| `ccWorkMap` | Data structure | Component Working Area — a Map where validated parameters are stored for downstream processing |
| `KKSV0004` | Screen | Global IP Address Addition Confirmation screen — the UI/screen for registering fixed IP addresses for ISP contracts |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| CBS | Acronym | Call Back System — the service component layer that handles enterprise business logic and database operations |
| `EKK0011D020CBSMsg1List` | Data entity | Message list from Customer Approval Acceptance Registration CBS — contains approval confirmation data |
| `EKK1091D010CBSMsg1List` | Data entity | Message list from Option Service Registration CBS — contains option service registration data |

---
