# Business Logic — JKKEmailInfoAddCfmCC.analyzeRequestParam() [62 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKEmailInfoAddCfmCC` |
| Layer | Common Component (CC) — Shared reusable component in the `com.fujitsu.futurity.bp.custom.common` package |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKEmailInfoAddCfmCC.analyzeRequestParam()

This method serves as the **request parameter extraction and transformation** method for the Email Information Registration Confirmation (E-Mail Info Add Confirmation) business screen (KKSV0002). It is invoked from the `execute()` method of `JKKEmailInfoAddCfmCC` as the first processing step before any downstream service component calls are dispatched.

The method retrieves a pre-populated data map (`rootData`) from the request parameter object under the key `KKSV000201CC` — which corresponds to the parent screen's data context — and constructs a new, flattened `HashMap<String, Object>` (`paramData`) by selectively copying and transforming fields from the root data. The transformation includes: (1) a bulk copy of operational and service metadata fields, (2) a nested-to-flat-list conversion of movement reason code entries (`IDO_RSN_LIST`), where each original element containing both a reason code and a free-text memo is decomposed into two parallel lists (`idoRsnList` and `idoRsnMemoList`), and (3) the inclusion of additional fields that were progressively added across multiple development iterations (2011-09-26, 2012-02-20, 2012-03-15).

The method implements a **data mapping/transfer** pattern — it does not perform any business validation, CRUD operations, or external service calls. Instead, it acts as a pure data transformer, reshaping the request parameter structure into a format suitable for downstream processing by other common components and service components. It is a private helper method, called exclusively from the `execute()` method of its own class, making it a tightly-scoped utility within the email registration confirmation screen's workflow.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["analyzeRequestParam(params)"])
    INIT["Initialize paramData, idoRsnList, idoRsnMemoList"]
    GET_ROOT["rootData = param.getData(KKSV000201CC)"]
    COPY_1["Copy basic fields:
FUNC_CODE_KEY, UNYO_YMD, UNYO_DTM, OP_SVC_CD,
SVC_KEI_NO, SYSID, SHK_CAPA, IDO_DIV, IDO_STAT,
SBOP_SVC_CD, MSKM_SBT_CD, RSV_APLY_CD,
JKKEMAILINFOADDCFMCCLIST"]
    COPY_2["Copy additional fields (2011-09-26):
SEIKY_KEI_NO (Billing Contract No),
RULE0059_AUTO_APLY (Auto Application)"]
    TRANSFER_LIST["Transfer and transform IDO_RSN_LIST:
For each element:
  - extract IDO_RSN_LIST_ELEMENT
  - extract IDO_RSN_MEMO_LIST_ELEMENT"]
    PUT_LIST["paramData.put(IDO_RSN_LIST, idoRsnList)
paramData.put(IDO_RSN_MEMO_LIST, idoRsnMemoList)"]
    COPY_3["Copy additional fields (2012-02-20):
IDO_DTM, MSKM_NO, MSKMSHO_NO, MSKM_YMD,
EX_MSKM_UPD_DTM"]
    COPY_4["Copy FAMILY_PACK (2012-03-15)"]
    RETURN["Return paramData"]

    START --> INIT --> GET_ROOT --> COPY_1 --> COPY_2 --> TRANSFER_LIST --> PUT_LIST --> COPY_3 --> COPY_4 --> RETURN
```

**Processing Flow Summary:**

The method follows a strict linear data-transformation pipeline:

1. **Initialization** — Creates the destination `paramData` map and empty `ArrayList`s for reason codes and memos.
2. **Root Data Retrieval** — Fetches the parent screen's data map from the parameter object using the key `KKSV000201CC` (resolved to `"KKSV000201CC"`).
3. **Field Copy Phase 1** — Copies core operational/service metadata fields: function code, operation date/time, service codes, service contract number, system ID, initial capacity, movement division and status, sub-operation code, application type code, and the email info registration confirmation list.
4. **Field Copy Phase 2 (2011-09-26)** — Copies billing contract number (`SEIKY_KEI_NO`) and business procedure manual automatic application flag (`RULE0059_AUTO_APLY`).
5. **List Transformation** — Iterates over the nested `IDO_RSN_LIST` (an ArrayList of HashMaps), extracting each element's movement reason code and memo into two parallel flat lists.
6. **List Registration** — Puts the transformed lists into `paramData` under the keys `IDO_RSN_LIST` and `IDO_RSN_MEMO_LIST`.
7. **Field Copy Phase 3 (2012-02-20, ST2-2012-0000185)** — Copies movement datetime, machine number, machine shop number, machine date, and extended machine update datetime.
8. **Field Copy Phase 4 (2012-03-15, ST2-2012-0000379)** — Copies the family pack presence flag.
9. **Return** — Returns the assembled `paramData` HashMap.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object that carries the model group and control map data from the upstream screen (KKSV0002 / KKSV000201CC). It contains the root data map with all fields needed for the email information registration confirmation processing, including service contract details, movement reason codes, machine information, and the email info list. |

**Instance fields / external state read by this method:**

This method does **not** read any instance fields or external state beyond the `param` argument. All field keys (e.g., `UNYO_YMD`, `OP_SVC_CD`, `IDO_RSN_LIST`) are `private static final String` constants defined in the same class and resolved to string literals at compile time. No mutation of external state occurs.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and **no service component calls**. It is a pure data transformation method. The only interaction with external state is reading data from the `IRequestParameterReadWrite` parameter object via `param.getData(KKSV000201CC)` — which is an in-memory data retrieval from the request context, not a database or SC call.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `param.getData(KKSV000201CC)` | N/A | Request Context (in-memory HashMap) | Retrieves the parent screen's data map containing all pre-populated request parameters from KKSV000201CC |

**No terminal SC/CBS/Entity operations are invoked from this method.**

## 5. Dependency Trace

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

Direct callers found: 1 methods.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class: `JKKEmailInfoAddCfmCC` | `JKKEmailInfoAddCfmCC.execute()` → `JKKEmailInfoAddCfmCC.analyzeRequestParam(param)` | `param.getData [R] Request Context (KKSV000201CC HashMap)` |

**Notes:**
- This method is private and called only from within its own class (`JKKEmailInfoAddCfmCC.execute()`).
- `execute()` is the entry point method for the KKSV0002 screen's email information registration confirmation flow.
- Terminal operations from this method: `getData [R]` (request context retrieval).
- No SC, CBS, or database calls are reached from this method.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Local Variable Initialization (L427-L429)

> Initializes destination data structures before any data processing begins.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramData = null` | // Destination HashMap for transformed data |
| 2 | SET | `rootData = null` | // Source HashMap retrieved from request parameter |
| 3 | SET | `idoRsnList = null` | // Destination list for movement reason codes (flat) |
| 4 | SET | `idoRsnMemoList = null` | // Destination list for movement reason memos (flat) |
| 5 | SET | `paramIdoRsnList = null` | // Temporary holder for source IDO_RSN_LIST |
| 6 | SET | `paramIdoRsnElement = null` | // Temporary holder for each IDO_RSN_LIST element |

**Block 2** — [SET] HashMap and ArrayList Construction (L431-L433)

> Allocates the concrete data structures for processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramData = new HashMap<String, Object>()` | // Creates the destination map |
| 2 | SET | `idoRsnList = new ArrayList<String>()` | // Creates the reason code list |
| 3 | SET | `idoRsnMemoList = new ArrayList<String>()` | // Creates the reason memo list |

**Block 3** — [EXEC] Root Data Retrieval (L435-L437)
> Retrieve the base element — parent screen's data map

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `rootData = (HashMap<String, Object>)param.getData(KKSV000201CC)` | // Retrieves root data map from request parameter using key "KKSV000201CC" |

**Block 4** — [SET] Copy Basic Fields — Phase 1 (L439-L450)

> Copies core operational metadata and service contract information from the root data map to the parameter data map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramData.put(JCMConstants.FUNC_CODE_KEY, rootData.get(JCMConstants.FUNC_CODE_KEY))` | // Function code |
| 2 | SET | `paramData.put(UNYO_YMD, rootData.get(UNYO_YMD))` | [-> UNYO_YMD="unyo_ymd"] Operation date (year/month/day) |
| 3 | SET | `paramData.put(UNYO_DTM, rootData.get(UNYO_DTM))` | [-> UNYO_DTM="unyo_dtm"] Operation date/time (year/month/day + time) |
| 4 | SET | `paramData.put(OP_SVC_CD, rootData.get(OP_SVC_CD))` | [-> OP_SVC_CD="op_svc_cd"] Option service code |
| 5 | SET | `paramData.put(SVC_KEI_NO, rootData.get(SVC_KEI_NO))` | [-> SVC_KEI_NO="svc_kei_no"] Service contract number |
| 6 | SET | `paramData.put(SYSID, rootData.get(SYSID))` | [-> SYSID="sysid"] System ID |
| 7 | SET | `paramData.put(SHK_CAPA, rootData.get(SHK_CAPA))` | [-> SHK_CAPA="shk_capa"] Initial capacity |
| 8 | SET | `paramData.put(IDO_DIV, rootData.get(IDO_DIV))` | [-> IDO_DIV="ido_div"] Movement division |
| 9 | SET | `paramData.put(IDO_STAT, rootData.get(IDO_STAT))` | [-> IDO_STAT="ido_stat"] Movement division status |
| 10 | SET | `paramData.put(SBOP_SVC_CD, rootData.get(SBOP_SVC_CD))` | [-> SBOP_SVC_CD="sbop_svc_cd"] Sub-operation service code |
| 11 | SET | `paramData.put(MSKM_SBT_CD, rootData.get(MSKM_SBT_CD))` | [-> MSKM_SBT_CD="mskm_sbt_cd"] Application type code |
| 12 | SET | `paramData.put(RSV_APLY_CD, rootData.get(RSV_APLY_CD))` | [-> RSV_APLY_CD="rsv_aply_cd"] Reservation application code |
| 13 | SET | `paramData.put(JKKEMAILINFOADDCFMCCLIST, rootData.get(JKKEMAILINFOADDCFMCCLIST))` | [-> JKKEMAILINFOADDCFMCCLIST="JKKEmailInfoAddCfmCCList"] Email info registration confirmation list |

**Block 5** — [SET] Copy Additional Fields — Phase 2 (L451-L456) // 2011-09-26 Added

> Adds billing contract number and business procedure manual auto-application flag.

| # | Type | Code |
|---|------|------|
| 1 | SET | `xKey = KKSV0002_KKSV0002OP_KKSV000201CC.SEIKY_KEI_NO` | [-> SEIKY_KEI_NO="seiky_kei_no"] Billing contract number |
| 2 | SET | `paramData.put(xKey, rootData.get(xKey))` | [-> Comment: 請求契約番号] Billing contract number |
| 3 | SET | `xKey = KKSV0002_KKSV0002OP_KKSV000201CC.RULE0059_AUTO_APLY` | [-> RULE0059_AUTO_APLY="rule0059_auto_aply"] Business procedure manual auto-application flag |
| 4 | SET | `paramData.put(xKey, rootData.get(xKey))` | [-> Comment: 事務手順料自動適用要否] Business procedure fee automatic application flag |

**Block 6** — [EXEC] IDO_RSN_LIST Transfer (L458-L461)

> Retrieves the source list of movement reason entries from rootData. Each entry is a HashMap containing a reason code and memo list.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `paramIdoRsnList = (ArrayList)rootData.get(IDO_RSN_LIST)` | [-> IDO_RSN_LIST="ido_rsn_list"] Movement reason code list (source) |

**Block 7** — [FOR] IDO_RSN_LIST Element Transfer (L462-L466)

> Iterates over each element in the movement reason list, extracting the reason code and memo into parallel flat lists. This transforms nested structures (ArrayList of HashMaps) into separate ArrayList<String> collections.

**Block 7.1** — [FOR BODY] For Each Element (L462-L466)

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramIdoRsnElement = (HashMap)paramIdoRsnList.get(i)` | // Cast current list element to HashMap |
| 2 | SET | `idoRsnList.add(paramIdoRsnElement.get(IDO_RSN_LIST_ELEMENT))` | [-> IDO_RSN_LIST_ELEMENT="ido_rsn_cd"] Extract movement reason code and add to flat list |
| 3 | SET | `idoRsnMemoList.add(paramIdoRsnElement.get(IDO_RSN_MEMO_LIST_ELEMENT))` | [-> IDO_RSN_MEMO_LIST_ELEMENT="ido_rsn_memo"] Extract movement reason memo and add to flat list |

**Block 8** — [SET] Put Transformed Lists into paramData (L467-L468)

> Registers the parallel flat lists into the parameter data map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramData.put(IDO_RSN_LIST, idoRsnList)` | [-> IDO_RSN_LIST="ido_rsn_list"] Put transformed reason code list |
| 2 | SET | `paramData.put(IDO_RSN_MEMO_LIST, idoRsnMemoList)` | [-> IDO_RSN_MEMO_LIST="ido_rsn_memo_list"] Put transformed reason memo list |

**Block 9** — [SET] Copy Additional Fields — Phase 3 (L470-L475) // 2012-02-20 Added, ST2-2012-0000185

> Adds movement datetime and machine-related fields for enhanced tracking.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramData.put(IDO_DTM, rootData.get(IDO_DTM))` | [-> IDO_DTM="ido_dtm"] Movement datetime |
| 2 | SET | `paramData.put(MSKM_NO, rootData.get(MSKM_NO))` | [-> MSKM_NO="mskm_no"] Machine number |
| 3 | SET | `paramData.put(MSKMSHO_NO, rootData.get(MSKMSHO_NO))` | [-> MSKMSHO_NO="msksho_no"] Machine shop number |
| 4 | SET | `paramData.put(MSKM_YMD, rootData.get(MSKM_YMD))` | [-> MSKM_YMD="mskm_ymd"] Machine date |
| 5 | SET | `paramData.put(EX_MSKM_UPD_DTM, rootData.get(KK0011_UPD_DTM))` | [-> EX_MSKM_UPD_DTM="ex_mskm_upd_dtm", KK0011_UPD_DTM="kk0011_upd_dtm"] Extended machine update datetime |

**Block 10** — [SET] Copy Additional Fields — Phase 4 (L477-L478) // ST2-2012-0000379, 2012/03/15

> Adds the family pack presence flag (1=present, 2=absent) for bundled service support.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramData.put(FAMILY_PACK, rootData.get(FAMILY_PACK))` | [-> FAMILY_PACK="family_pack"] Family pack presence flag (1=present, 2=absent) |

**Block 11** — [RETURN] Return Transformed Data (L479)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return paramData` | // Returns the fully assembled parameter data map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKSV000201CC` | Constant Key | Parent screen data context key — identifies the data map belonging to screen KKSV000201CC (KKSV0002 step 01), which contains all pre-populated parameters from the upstream screen flow |
| `FUNC_CODE_KEY` | Field | Function code — identifies the specific business function being executed |
| `UNYO_YMD` | Field | Operation date (year/month/day) — the date on which the operation was performed, formatted as YYYY/MM/DD |
| `UNYO_DTM` | Field | Operation datetime (year/month/day + hour/minute/second) — full timestamp of the operation |
| `OP_SVC_CD` | Field | Option service code — identifies optional/add-on services associated with the service contract |
| `SVC_KEI_NO` | Field | Service contract number — the unique identifier for a customer's service contract (e.g., broadband, mail) |
| `SYSID` | Field | System ID — identifies the originating or target system in cross-system processing |
| `SHK_CAPA` | Field | Initial capacity — the initial data capacity allocated to a service (e.g., email box capacity in MB) |
| `IDO_DIV` | Field | Movement division — the classification of a service change operation (e.g., addition, deletion, modification, suspension) |
| `IDO_STAT` | Field | Movement division status — the status code for the movement division, indicating current processing state |
| `IDO_RSN_LIST` | Field | Movement reason code list — a list of HashMaps, each containing a reason code (`ido_rsn_cd`) and memo (`ido_rsn_memo`) describing why a service change was requested |
| `IDO_RSN_LIST_ELEMENT` | Field | Movement reason code (list element key) — the map key `"ido_rsn_cd"` used to extract the reason code from each element in IDO_RSN_LIST |
| `IDO_RSN_MEMO_LIST` | Field | Movement reason memo list — a flat ArrayList of strings containing the memo/freestyle text for each movement reason |
| `IDO_RSN_MEMO_LIST_ELEMENT` | Field | Movement reason memo (list element key) — the map key `"ido_rsn_memo"` used to extract the memo text from each element |
| `IDO_DTM` | Field | Movement datetime — the timestamp when the service change movement was executed |
| `MSKM_NO` | Field | Machine number — the customer's equipment/device number assigned to the service contract |
| `MSKMSHO_NO` | Field | Machine shop number — the shop/store number associated with the customer's equipment |
| `MSKM_YMD` | Field | Machine date — the date associated with the customer's equipment (e.g., manufacturing date or registration date) |
| `EX_MSKM_UPD_DTM` | Field | Extended machine update datetime — the last update timestamp for machine information |
| `SBOP_SVC_CD` | Field | Sub-operation service code — identifies sub-service types within an option service (e.g., D02=mail box capacity, D03=mail virus check) |
| `MSKM_SBT_CD` | Field | Application type code — classifies the type of application being processed (e.g., new subscription, modification, renewal) |
| `RSV_APLY_CD` | Field | Reservation application code — the code representing a reservation-based application type |
| `JKKEMAILINFOADDCFMCCLIST` | Constant Key | Email info registration confirmation list — an ArrayList of HashMaps containing the email addresses to be registered, used in the email registration confirmation workflow |
| `SEIKY_KEI_NO` | Field | Billing contract number — the contract number associated with billing for the service |
| `RULE0059_AUTO_APLY` | Field | Business procedure manual automatic application flag — indicates whether the business procedure fee is automatically applied |
| `FAMILY_PACK` | Field | Family pack presence flag — indicates whether the customer's service is part of a family pack bundle (1=present, 2=absent) |
| `JCMConstants.FUNC_CODE_KEY` | Constant | Function code key — a shared constant from the JCM (Java Common Module) framework defining the standard map key for function code storage |
| `IRequestParameterReadWrite` | Interface | Request parameter read/write interface — the contract for the parameter object passed between screens and components, supporting both data retrieval and data mutation |
| `KKSV0002` | Screen ID | K-Opticom SV Screen 0002 — the main email information registration confirmation screen in the K-Opticom customer base system |
| E-Mail Info Add Conf CC | Domain | Email Information Registration Confirmation Common Component — the business module this class belongs to, handling the confirmation step of email address registration for K-Opticom broadband customers |
| K-Opticom | Domain | K-Opticom — a Japanese ISP providing broadband internet, email, and bundled family service plans |
| CC | Acronym | Common Component — a reusable software component in the K-Opticom system architecture that encapsulates shared business logic across multiple screens |
