# Business Logic — JKKMltiseInfoAddCfmCC.editEKK0021C060ErrorInfo() [106 LOC]

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

## 1. Role

### JKKMltiseInfoAddCfmCC.editEKK0021C060ErrorInfo()

This method is responsible for **mapping error information** returned from the service contract line item detail inquiry service interface (S-IF, service contract line item breakdown list inquiry S-IF) from template messages into a business data HashMap for downstream consumption by UI screens. After the `editEKK0021C060ResultRP` method executes the service call and produces a `CAANMsg` template array with potential error fields, this method extracts the first template (`templates[0]`), configures control metadata via `setControlMap`, and then iteratively transfers 14 distinct error-related fields from the template into an error information HashMap stored within the `param` object under the key identified by `fixedText`. It implements a **guarded copy pattern**: each error field is only copied into the HashMap if the template's `isNull()` check returns false (indicating the field has a value), and if the target HashMap does not already contain the key (to prevent overwriting existing data). This method is a shared utility called exclusively by `editEKK0021C060ResultRP` within the same class, serving as the error-handling bridge between service execution and screen display for the service contract line item breakdown inquiry flow.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editEKK0021C060ErrorInfo param, templates, returnCode, fixedText"])
    EXTRACT["Extract template = templates[0]"]
    SET_CONTROL["setControlMap param, templates, returnCode, STATUS"]
    GET_DATA["inHash = param.getData fixedText"]
    CHECK_NULL{inHash == null?}
    INIT_MAP["inHash = new HashMap"]
    SET_DATA["param.setData fixedText, inHash"]
    MAP_ERROR["Map error info from template to inHash: mskm_dtl_no_err, rrk_jiko_add_dtm_err, unyo_ymd_err, rrk_jiko_err, upd_dtm_err, ido_div_err, telno_err, daihyo_telno_err, telno_use_place_no_err, sip_user_id_del_zumi_flg_err, tel_bas_host_id_err, n_050_op_telno_err, kiki_ninsho_id_err, kiki_ninsho_id_pwd_err"]
    RETURN["Return param"]

    START --> EXTRACT
    EXTRACT --> SET_CONTROL
    SET_CONTROL --> GET_DATA
    GET_DATA --> CHECK_NULL
    CHECK_NULL -->|true| INIT_MAP
    INIT_MAP --> SET_DATA
    SET_DATA --> MAP_ERROR
    CHECK_NULL -->|false| MAP_ERROR
    MAP_ERROR --> RETURN
```

The processing flow consists of:

1. **Extract** the first element from the `templates` array (`CAANMsg[]`) into a local `template` variable.
2. **Configure control metadata** by calling `setControlMap(param, templates, returnCode, EKK0021C060CBSMsg.STATUS)` to populate page/control state information for the screen.
3. **Retrieve error HashMap** from `param` using the key specified by `fixedText`. If the result is `null`, initialize a new `HashMap` and store it back into `param` under the same key.
4. **Map error fields**: Iterate through 14 error fields from the CBS response template. For each field:
   - If `template.isNull(fieldName)` returns `false` (the field has a value) AND `inHash` does not already contain the target key, copy the value from the template into `inHash` using `put()`.
5. **Return** the modified `param` object, now containing the error information HashMap.

No SC (Service Component) or CBS (Component-Based System) calls are made directly by this method. It operates purely on in-memory data structures (CAANMsg templates and HashMaps).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The primary business data carrier holding application-level state. It contains the error information HashMap retrieved/stored via `getData(fixedText)` / `setData(fixedText, inHash)`. Modified in-place to embed mapped error data. |
| 2 | `templates` | `CAANMsg[]` | An array of CBS response message objects produced by the `editEKK0021C060ResultRP` service call. `templates[0]` is used as the source of error field values. Each `CAANMsg` holds error-specific fields (e.g., `MSKM_DTL_NO_ERR`, `RRK_JIKO_ADD_DTM_ERR`, `TELNO_ERR`) that correspond to service contract line item detail fields. |
| 3 | `returnCode` | `int` | The return code from the prior CBS invocation. Passed through to `setControlMap` to set control metadata (e.g., status, error indicators) for the screen's control panel. |
| 4 | `fixedText` | `String` | The key used to store/retrieve the error information HashMap within the `param` object. Acts as the map key in `param.getData(fixedText)` and `param.setData(fixedText, inHash)`. The value is the name of the calling method (`editEKK0021C060ResultRP`), ensuring namespace separation between different processing stages. |

**External state / instance fields read:**
- None directly. The method is stateless and operates entirely on parameters and local variables.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `setControlMap` | JKKMltiseInfoAddCfmCC | - | Sets control metadata (status, error flags) into the param object's control map. No DB/SC interaction. |
| R | `IRequestParameterReadWrite.getData` | - | - | Reads the error information HashMap from param using `fixedText` as the key. |
| - | `IRequestParameterReadWrite.setData` | - | - | Stores the (possibly initialized) error HashMap back into param using `fixedText` as the key. |
| - | `CAANMsg.isNull` | CAANMsg | - | Checks whether a template field contains a null/empty value (used as guard for all 14 error fields). |
| R | `CAANMsg.getString` | - | - | Reads the string value of a template error field (executed 14 times for each mapped error field). |

This method performs **no database operations** (no C/R/U/D against any entity or table). It is a pure in-memory data transformation layer that bridges the CBS response message format (`CAANMsg[]`) into the application's HashMap-based error handling structure.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-], `isNull` [-]  # NOSONAR

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC: JKKMltiseInfoAddCfmCC.editEKK0021C060ResultRP() | `editEKK0021C060ResultRP` -> `editEKK0021C060ErrorInfo` | `CAANMsg.getString(14 fields)`, `CAANMsg.isNull(14 checks)` |

**Call chain detail:** `editEKK0021C060ResultRP` is the sole caller of this method. It is a Common Component (CC) method within the same class. No Screen (KKSV*) or Batch entry points exist within 8 hops of this method. The method is a leaf in the call hierarchy — its terminal operations are exclusively `CAANMsg.isNull()` guards and `CAANMsg.getString()` reads from the CBS response template.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(template extraction) (L3202)`

The method extracts the first element from the templates array.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = templates[0]` // Extract the first CBS response template |

**Block 2** — [EXEC] `(control map setup) (L3204)`

Invokes `setControlMap` to populate page/control metadata with the status indicator.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setControlMap(param, templates, returnCode, EKK0021C060CBSMsg.STATUS)` // Error common section setup — configure control status |

**Block 3** — [IF] `(null-safe HashMap initialization) (L3212–L3217)`

Ensures the error information HashMap exists in `param` before populating it.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inHash = (HashMap) param.getData(fixedText)` // Retrieve existing error info HashMap |
| 2 | IF | `inHash == null` |

**Block 3.1** — [ELSE — if null] `(L3213–L3216)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `inHash = new HashMap()` // Initialize empty error info HashMap |
| 2 | EXEC | `param.setData(fixedText, inHash)` // Store initialized HashMap back into param |

**Block 4** — [FOR-EACH] `(error field mapping — 14 fields) (L3219–L3299)`

Maps each CBS error field from the template into the inHash, guarded by `isNull()` and `containsKey()` checks. The 14 error fields and their business meanings are:

| # | Target Key (HashMap) | Template Field (CAANMsg) | Business Meaning (Japanese to English) |
|---|---------------------|-------------------------|--------------------------------------|
| 1 | `mskm_dtl_no_err` | `MSKM_DTL_NO_ERR` | 申請明細照會・後続業務マップ.申請明細番号 to 申請明細番号のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Application Detail Number to Application Detail Number error info) |
| 2 | `rrk_jiko_add_dtm_err` | `RRK_JIKO_ADD_DTM_ERR` | 申請明細照會・後続業務マップ.連関事項登録年月日時分秒 to 連関事項登録年月日時分秒のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Related Item Registration Year/Month/Day/Time/Second to Related Item Registration timestamp error info) |
| 3 | `unyo_ymd_err` | `KZKWRK_REQYMD_ERR` | 申請明細照會・後続業務マップ.運用年月日 to 後続業務依頼年月日のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Operation Year/Month/Day to Subsequent Business Request Year/Month/Day error info) |
| 4 | `rrk_jiko_err` | `RRK_JIKO_ERR` | 申請明細照會・後続業務マップ.連関事項 to 連関事項のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Related Item to Related Item error info) |
| 5 | `upd_dtm_err` | `UPD_DTM_BF_ERR` | 申請明細照會・後続業務マップ.更新年月日時分秒 to 更新年月日時分秒(更新前)のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Update Year/Month/Day/Time/Second to Update timestamp pre-update error info) |
| 6 | `ido_div_err` | `IDO_DIV_ERR` | 申請明細照會・後続業務マップ.異動区分 to 異動区分のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Movement Classification to Movement Classification error info) |
| 7 | `telno_err` | `TELNO_ERR` | 申請明細照會・後続業務マップ.電話番号 to 電話番号のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Phone Number to Phone Number error info) |
| 8 | `daihyo_telno_err` | `DAIHYO_TELNO_ERR` | 申請明細照會・後続業務マップ.代表電話番号 to 代表電話番号のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Representative Phone Number to Representative Phone Number error info) |
| 9 | `telno_use_place_no_err` | `TELNO_USE_PLACE_NO_ERR` | 申請明細照會・後続業務マップ.電話番号使用箇所番号 to 電話番号使用箇所番号のエラー情報 (Application Detail Inquiry/Subsequent Business Map. Phone Number Usage Location Number to Phone Number Usage Location Number error info) |
| 10 | `sip_user_id_del_zumi_flg_err` | `SIP_USER_ID_DEL_ZUMI_FLG_ERR` | 申請明細照會・後続業務マップ.SIPユーザID消去済フラグ to SIPユーザID消去済フラグのエラー情報 (Application Detail Inquiry/Subsequent Business Map. SIP User ID Deletion Complete Flag to SIP User ID Deletion Complete Flag error info) |
| 11 | `tel_bas_host_id_err` | `TEL_BAS_HOST_ID_ERR` | 申請明細照會・後続業務マップ.電話BASホストID to 電話BASホストIDのエラー情報 (Application Detail Inquiry/Subsequent Business Map. Telephone BAS Host ID to Telephone BAS Host ID error info) |
| 12 | `n_050_op_telno_err` | `N_050_OP_TELNO_ERR` | 申請明細照會・後続業務マップ.050オプション電話番号 to 050オプション電話番号のエラー情報 (Application Detail Inquiry/Subsequent Business Map. 050 Option Phone Number to 050 Option Phone Number error info) |
| 13 | `kiki_ninsho_id_err` | `KIKI_NINSHO_ID_ERR` | 申請明細照會・後続業務マップ.機器認証ID to 機器認証IDのエラー情報 (Application Detail Inquiry/Subsequent Business Map. Device Authentication ID to Device Authentication ID error info) |
| 14 | `kiki_ninsho_id_pwd_err` | `KIKI_NINSHO_ID_PWD_ERR` | 申請明細照會・後続業務マップ.機器認証IDパスワード to 機器認証IDパスワードのエラー情報 (Application Detail Inquiry/Subsequent Business Map. Device Authentication ID Password to Device Authentication ID Password error info) |

Each of the 14 fields follows the same block structure. Detail for Block 4.1 (the first field) is shown below; Blocks 4.2 through 4.14 follow the identical pattern.

**Block 4.1** — [IF-IF] `(mskm_dtl_no_err mapping) (L3220–L3224)`

Guarded copy of the Application Detail Number error field.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `template.isNull(EKK0021C060CBSMsg.MSKM_DTL_NO_ERR)` // Check if field has a value |
| 2 | IF | `!isNull` (field is NOT null) |
| 3 | EXEC | `inHash.containsKey("mskm_dtl_no_err")` // Check if key already exists |
| 4 | IF | `!containsKey` (key does NOT already exist) |
| 5 | SET | `inHash.put("mskm_dtl_no_err", template.getString(EKK0021C060CBSMsg.MSKM_DTL_NO_ERR))` // Copy error value to HashMap |

**Blocks 4.2 through 4.14** follow the identical guarded-copy pattern for the remaining 13 fields:

- Block 4.2: `rrk_jiko_add_dtm_err` — Related Item Registration Timestamp
- Block 4.3: `unyo_ymd_err` — Operation Date
- Block 4.4: `rrk_jiko_err` — Related Item
- Block 4.5: `upd_dtm_err` — Update Timestamp (Pre-Update)
- Block 4.6: `ido_div_err` — Movement Classification
- Block 4.7: `telno_err` — Phone Number
- Block 4.8: `daihyo_telno_err` — Representative Phone Number
- Block 4.9: `telno_use_place_no_err` — Phone Number Usage Location Number
- Block 4.10: `sip_user_id_del_zumi_flg_err` — SIP User ID Deletion Complete Flag
- Block 4.11: `tel_bas_host_id_err` — Telephone BAS Host ID
- Block 4.12: `n_050_op_telno_err` — 050 Option Phone Number
- Block 4.13: `kiki_ninsho_id_err` — Device Authentication ID
- Block 4.14: `kiki_ninsho_id_pwd_err` — Device Authentication ID Password

**Block 5** — [RETURN] `(L3300)`

Returns the modified `param` object, now containing the populated error information HashMap under the `fixedText` key.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // Return param with mapped error info |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskm_dtl_no_err` | Field | Application detail number error — error information for the application/inquiry detail number in the service contract line item breakdown |
| `rrk_jiko_add_dtm_err` | Field | Related item registration timestamp error — year/month/day/time/second of when the related item was registered |
| `unyo_ymd_err` | Field | Operation date error — the operational date associated with subsequent business requests |
| `rrk_jiko_err` | Field | Related item error — information about related/linked items in the service contract |
| `upd_dtm_err` | Field | Update timestamp (pre-update) error — the date/time before an update operation was applied |
| `ido_div_err` | Field | Movement classification error — classification code for service movement/transfers (e.g., line porting, service change) |
| `telno_err` | Field | Phone number error — the primary phone number associated with the service contract line item |
| `daihyo_telno_err` | Field | Representative phone number error — the primary/representative phone number for the contract |
| `telno_use_place_no_err` | Field | Phone number usage location number error — identifies the location where the phone number is used |
| `sip_user_id_del_zumi_flg_err` | Field | SIP User ID deletion complete flag error — flag indicating whether a SIP (Session Initiation Protocol) user ID has been deleted |
| `tel_bas_host_id_err` | Field | Telephone BAS Host ID error — the BAS (Broadband Access Service) host identifier for the telephone service |
| `n_050_op_telno_err` | Field | 050 Option phone number error — phone number using the 050 prefix (VoIP option number in Japan) |
| `kiki_ninsho_id_err` | Field | Device authentication ID error — the authentication ID used for device-level authentication/verification |
| `kiki_ninsho_id_pwd_err` | Field | Device authentication ID password error — the password associated with the device authentication ID |
| `EKK0021C060CBSMsg.STATUS` | Constant | CBS message status field — used by `setControlMap` to set the page control status indicator |
| `EKK0021C060CBSMsg` | Class | CBS response message class for EKK0021C060 — holds error/success fields returned from the service contract line item detail inquiry service |
| `CAANMsg` | Class | Fujitsu's message class wrapper for CBS response data — provides `isNull()`, `getString()` methods to access fields |
| `IRequestParameterReadWrite` | Interface | Business data carrier interface — used to pass request/response data between processing stages; supports `getData()` and `setData()` for key-value operations |
| `setControlMap` | Method | Common component method that configures control metadata (status, error flags, navigation state) into the param object |
| `fixedText` | Parameter | The HashMap key name (typically the calling method name) used to namespace error data within the param object |
| 申請明細照會 (Shinsei Meisai Shoukai) | Japanese term | Application Detail Inquiry — the service that retrieves detailed information about a service contract application |
| 後続業務 (Kousoku Gyoumu) | Japanese term | Subsequent Business — follow-up processing tasks triggered after the main inquiry/registration operation |
| マップ (Mappu) | Japanese term | Map — refers to the application detail inquiry and subsequent business data mapping structure |
| エラー情報 (Erajo Jouhou) | Japanese term | Error Information — status/error data returned from CBS response messages |
| 連関事項 (Renkan Jikou) | Japanese term | Related Item — items that are linked/associated with the primary service contract entry |
| 運用年月日 (Unyo Nengetsuubi) | Japanese term | Operation Date — the effective date of the service contract operation |
| 異動区分 (Idou Kubun) | Japanese term | Movement Classification — code indicating the type of service movement (e.g., new installation, transfer, cancellation) |
| 代表電話番号 (Daihyo Denwango) | Japanese term | Representative Phone Number — the primary phone number associated with a contract or account |
| 電話番号使用箇所番号 (Denwango Shiyoushokubango) | Japanese term | Phone Number Usage Location Number — identifies the specific location/location code where a phone number is deployed |
| SIPユーザID消去済フラグ (SIP Yuza ID Kesuzumi Flag) | Japanese term | SIP User ID Deletion Complete Flag — indicates whether a SIP user ID has been previously deleted/revoked |
| 電話BASホストID (Denwa BAS Hosuto ID) | Japanese term | Telephone BAS Host ID — the network host identifier for the Broadband Access Service telephone equipment |
| 050オプション電話番号 (050 Option Phone Number) | Japanese term | 050-prefix phone number — a VoIP virtual phone number using Japan's 050 area code prefix |
| 機器認証ID (Kiki Ninsho ID) | Japanese term | Device Authentication ID — the identifier used for authenticating network-connected devices |
| CC | Acronym | Common Component — a shared business component class in the Fujitsu application framework, typically providing reusable utility methods |
| CBS | Acronym | Component-Based System — the backend service architecture pattern where SC (Service Component) methods are called for data access and processing |
| SC | Acronym | Service Component — a backend component that handles database access and business logic execution |
| S-IF | Acronym | Service Interface — the service contract line item breakdown list inquiry service interface (S-IF = Service Interface) |
| EKK0021C060 | Code | Service contract line item breakdown list inquiry processing code — identifies the specific screen/transaction flow for querying service contract detail lines |
