# Business Logic — JFUDslOpSvcKeiCC.setInMapMskmNaiyoShoninAdd() [69 LOC]

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

## 1. Role

### JFUDslOpSvcKeiCC.setInMapMskmNaiyoShoninAdd()

This method performs **upstream mapping item setting for Application Content Approval Registration** (uprighthands mapping item setting / 申込内容承認登録). It serves as a data-mapping helper within the eo Light Television Option Service contract/resolution component, preparing the CBS (Call Back Service) message payload that will be sent to downstream service components during the subscription approval registration flow.

Specifically, the method retrieves an existing map from the request parameter (using the `fixedText` service message key as the lookup key), enriches it with system-level metadata fields (SYSID, application type code, timestamps, and consumer business submission status code), and then constructs a child detail record — a single-element list of `HashMap<String, String>` — where all submission detail fields are initialized to `null` except for the application form code which is set to `"01"`. The populated child list is then attached to the parent map under a template detail key.

The method follows a **builder/delegation pattern**: it does not contain conditional branching or external service calls, but rather systematically assembles a structured data structure expected by the CBS message schema (`EKK0011D020CBSMsg` and its nested `EKK0011D020CBSMsg1List`). It acts as a shared utility called by the primary entry method `dslOpSvcKei()`, which handles the broader DSL operation service contract processing workflow. All 39+ child detail fields are initialized to `null` as placeholders, allowing later stages of the processing chain to populate them with actual business data before the message is ultimately dispatched to external service interfaces.

The method was introduced in v1.00.00 (2011-10-04) and has been extended across multiple versions (v3.00, v4.00, v5.00) to accommodate new fields for service IF integration, dispute reasons, progress supplementation, and system date settings in exception handling scenarios.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setInMapMskmNaiyoShoninAdd"])
    STEP1["Get inMap from param.getData"]
    STEP2["Set SYSID from local CC_SYSID"]
    STEP3["Set MSKM_SBT_CD to 00026"]
    STEP4["Set MSKM_UK_DTM to system datetime"]
    STEP5["Set MSKM_YMD to system date"]
    STEP6["Set CONSMBSN_MSKM_STAT_SKBT_CD to 04"]
    STEP7["Create inList and childMap"]
    STEP9["Set MSKM_FORM_CD to 01"]
    STEP10["Set 39 child fields to null"]
    STEP11["Add childMap to inList"]
    STEP12["Set TEMPLATE_ID_DETAIL in inMap"]
    END_NODE(["Return / Next"])

    START --> STEP1
    STEP1 --> STEP2
    STEP2 --> STEP3
    STEP3 --> STEP4
    STEP4 --> STEP5
    STEP5 --> STEP6
    STEP6 --> STEP7
    STEP7 --> STEP9
    STEP9 --> STEP10
    STEP10 --> STEP11
    STEP11 --> STEP12
    STEP12 --> END_NODE
```

**CRITICAL — Constant Resolution:**

| Constant Name | Resolved Value | Business Meaning | Source |
|---------------|---------------|-----------------|--------|
| `CC_SYSID` | `"cc_sysid"` | Local key for system ID in the request parameter map | JFUDslOpSvcKeiCC.java:L68 |
| `KK0971_MSKM_SBT_CD_00026` | `"00026"` | Application type code — identifies this as a specific subscription application type | JFUStrConst.java:L8436 |
| `CD00760_04` | `"04"` | Consumer business submission status identification code | JFUStrConst.java:L5298 |
| `CD00591_01` | `"01"` | Application form code — standard paperless/web application form type | JFUStrConst.java:L4122 |
| `TEMPLATE_ID_DETAIL_MSKM_NAIYO_SHONIN_ADD` | `EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST` | Template key for the nested detail list in the CBS message | JFUDslOpSvcKeiCC.java:L99 |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter container carrying the workflow state — specifically the map associated with the `fixedText` key which holds the CBS message payload being built. This map serves as the shared data structure across the DSL operation processing chain. |
| 2 | `fixedText` | `String` | Service message key used to retrieve the pre-existing CBS message map from the parameter container. Acts as the lookup key identifying which message context this method should operate on. |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `CC_SYSID` | `private static final String` | Local constant key `"cc_sysid"` for accessing system ID from the parent map |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `param.getData(fixedText)` | - | - | Retrieves the CBS message map from the request parameter by service message key |
| R | `JFUBPCommon.getOpeDateTimeStamp(null)` | JFUBPCommon | - | Retrieves the current system date-time stamp for the submission timestamp field |
| R | `JFUBPCommon.getOpeDate(null)` | JFUBPCommon | - | Retrieves the current system date for the submission date field |

### Analysis Summary

This method performs **zero database operations** and **zero external service calls**. It is a purely in-memory data preparation method that:
- Reads from the `IRequestParameterReadWrite` parameter object to obtain the existing message map (R)
- Reads from `JFUBPCommon` utility methods to fetch system timestamps (R)
- Writes exclusively to local data structures (`inMap`, `inList`, `childMap`)

The method acts as a **data assembler / builder** that constructs the CBS message structure expected by the `EKK0011D020CBSMsg` schema. The actual Create/Update operations against the database are performed by other methods in the processing chain (such as the `executeSC` call in the parent method `dslOpSvcKei()`) that use the message map assembled here.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JFUDslOpSvcKeiCC | `dslOpSvcKei()` -> `setInMapMskmNaiyoShoninAdd()` | `param.getData [R]`, `getOpeDate [R]`, `getOpeDateTimeStamp [R]` |

**Caller details:**
- The method is called from `JFUDslOpSvcKeiCC.dslOpSvcKei()`, which is the primary entry point for DSL operation service contract processing within the `JFUDslOpSvcKeiCC` class itself.
- No screen (KKSV*) or batch entry points were found within 8 hops. This method is a private helper used internally by the DSL operation processing flow.

**Terminal operations from this method:**

| Terminal Operation | Type | Description |
|-------------------|------|-------------|
| `param.getData(fixedText)` | R | Retrieves message map from request parameter |
| `JFUBPCommon.getOpeDateTimeStamp(null)` | R | Retrieves system date-time stamp |
| `JFUBPCommon.getOpeDate(null)` | R | Retrieves system date |

## 6. Per-Branch Detail Blocks

> This method has no conditional branches (no if/else, switch, loop, or try/catch). All processing is sequential.

**Block 1** — [PROCESS] `(Sequential data assembly, L295)`

> Retrieves the CBS message map from the request parameter and populates top-level system fields.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `HashMap inMap = (HashMap)param.getData(fixedText);` // Retrieve user data map from request parameter [-> fixedText parameter] |
| 2 | SET | `inMap.put(EKK0011D020CBSMsg.SYSID, inMap.get(CC_SYSID));` // Set SYSID field from local map key [-> CC_SYSID="cc_sysid" (JFUDslOpSvcKeiCC.java:L68)] |
| 3 | SET | `inMap.put(EKK0011D020CBSMsg.MSKM_SBT_CD, JFUStrConst.KK0971_MSKM_SBT_CD_00026);` // Set application type code [-> KK0971_MSKM_SBT_CD_00026="00026" (JFUStrConst.java:L8436)] |
| 4 | SET | `inMap.put(EKK0011D020CBSMsg.MSKM_UK_DTM, JFUBPCommon.getOpeDateTimeStamp(null));` // Set submission received datetime to system timestamp [JFUBPCommon.getOpeDateTimeStamp()] |
| 5 | SET | `inMap.put(EKK0011D020CBSMsg.MSKM_YMD, JFUBPCommon.getOpeDate(null));` // Set submission date to system date [JFUBPCommon.getOpeDate()] |
| 6 | SET | `inMap.put(EKK0011D020CBSMsg.CONSMBSN_MSKM_STAT_SKBT_CD, JFUStrConst.CD00760_04);` // Set consumer business submission status identification code [-> CD00760_04="04" (JFUStrConst.java:L5298)] |

**Block 2** — [PROCESS] `(Create containers, L314)`

> Initializes the list and child map structures for detail records.

| # | Type | Code |
|---|------|------|
| 1 | SET | `List<HashMap> inList = new ArrayList();` // Create list to hold child detail maps |
| 2 | SET | `HashMap<String, String> childMap = new HashMap();` // Create child detail map |

**Block 3** — [PROCESS] `(Set application form code, L317)`

> Sets the application form code — the only non-null child field initialized at this stage.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKM_FORM_CD, JFUStrConst.CD00591_01);` // Set application form code [-> CD00591_01="01" (JFUStrConst.java:L4122)] |

**Block 4** — [PROCESS] `(Initialize child detail fields to null, L319-L360)`

> Sets all child detail fields to null as placeholders. These fields will be populated by upstream processing stages before the message is dispatched. Includes fields added in v3.00 updates (KEI_HUKA_CD, MANSSBSYS_RNKI_YO_KIJIRAN, MANSION_ID, CATID, MKM_UK_SBT_CD, MSKMSHO_TRAT_IF_TNTSHA_NM, MSKMSHO_TRAT_IF_TELNO).

| # | Type | Code |
|---|------|------|
| 1 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKMSHO_NO, null);` // Submission document number |
| 2 | SET | `childMap.put(EKK0011D020CBSMsg1List.WEB_UK_NO, null);` // WEB submission number |
| 3 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKM_DTL_SBT_CD, null);` // Submission detail type code |
| 4 | SET | `childMap.put(EKK0011D020CBSMsg1List.RRKS_KTAI_TELNO, null);` // Contact mobile phone number |
| 5 | SET | `childMap.put(EKK0011D020CBSMsg1List.RRKS_OFFC_NM, null);` // Contact office name |
| 6 | SET | `childMap.put(EKK0011D020CBSMsg1List.DT_RRKS_TELNO, null);` // Daytime contact phone number |
| 7 | SET | `childMap.put(EKK0011D020CBSMsg1List.NEW_MSKM_SBT_CD, null);` // New application type code |
| 8 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKM_OPTNTY_CD, null);` // Submission opportunity code |
| 9 | SET | `childMap.put(EKK0011D020CBSMsg1List.TAKCHO_KIBO_APO_KIGEN_YMD, null);` // Home inspection desired appointment deadline date |
| 10 | SET | `childMap.put(EKK0011D020CBSMsg1List.KOJI_APO_RRKS_SHITEI_CD, null);` // Work appointment contact designation code |
| 11 | SET | `childMap.put(EKK0011D020CBSMsg1List.KOJI_APO_RRKS_TELNO, null);` // Work appointment contact phone number |
| 12 | SET | `childMap.put(EKK0011D020CBSMsg1List.RRK_JIKO_ADD_DTM, null);` // Contact item registration datetime |
| 13 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKM_RRKS_MLAD, null);` // Submission contact email address |
| 14 | SET | `childMap.put(EKK0011D020CBSMsg1List.KOJI_PRG_TCHI_MLAD, null);` // Work progress notification email address |
| 15 | SET | `childMap.put(EKK0011D020CBSMsg1List.RRK_JIKO, null);` // Contact item |
| 16 | SET | `childMap.put(EKK0011D020CBSMsg1List.KJSC_TCH_KTAI_MLAD, null);` // Work progress notification mobile email address |
| 17 | SET | `childMap.put(EKK0011D020CBSMsg1List.ML_SEND_JGI_FLG, null);` // Mail send exclusion flag |
| 18 | SET | `childMap.put(EKK0011D020CBSMsg1List.ML_SEND_JGI_RSN_MEMO, null);` // Mail send exclusion reason memo |
| 19 | SET | `childMap.put(EKK0011D020CBSMsg1List.BMP_MSKM_RRKS_TLN, null);` // Banner application contact phone number |
| 20 | SET | `childMap.put(EKK0011D020CBSMsg1List.OP_SVC_HKTGI_UM, null);` // Option service inheritance flag |
| 21 | SET | `childMap.put(EKK0011D020CBSMsg1List.DSL_ATICLE_SOHU_KIBO_UM, null);` // Contract document send-delivery request flag` |
| 22 | SET | `childMap.put(EKK0011D020CBSMsg1List.RRK_WAY_HOKI, null);` // Contact method supplement |
| 23 | SET | `childMap.put(EKK0011D020CBSMsg1List.NEWCONST_BUKKEN_CD, null);` // New construction building code |
| 24 | SET | `childMap.put(EKK0011D020CBSMsg1List.HUKKAT_ANKEN_FLG, null);` // Reactivation case flag |
| 25 | SET | `childMap.put(EKK0011D020CBSMsg1List.SAME_EQUIP_RE_MSKM_CD, null);` // Same equipment re-application code |
| 26 | SET | `childMap.put(EKK0011D020CBSMsg1List.HNIN_CFM_ATICLE_SBT_CD, null);` // Identity verification document type code |
| 27 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKMSHO_SBT_CD, null);` // Submission document type code |
| 28 | SET | `childMap.put(EKK0011D020CBSMsg1List.KEI_HUKA_CD, null);` // Contract add-on code [v3.00 addition] |
| 29 | SET | `childMap.put(EKK0011D020CBSMsg1List.MAP_TEMP_UM, null);` // Map attachment flag |
| 30 | SET | `childMap.put(EKK0011D020CBSMsg1List.KCN_STB_MSKM_CNT, null);` // KCNSTB application count |
| 31 | SET | `childMap.put(EKK0011D020CBSMsg1List.KCN_STB_KIND_CD, null);` // KCNSTB type code |
| 32 | SET | `childMap.put(EKK0011D020CBSMsg1List.MANSSBSYS_RNKI_YO_KIJIRAN, null);` // Mansion facility system linkage memo [v3.00 addition] |
| 33 | SET | `childMap.put(EKK0011D020CBSMsg1List.MANSION_ID, null);` // Mansion ID [v3.00 addition] |
| 34 | SET | `childMap.put(EKK0011D020CBSMsg1List.CATID, null);` // CAT-ID [v3.00 addition] |
| 35 | SET | `childMap.put(EKK0011D020CBSMsg1List.MKM_UK_SBT_CD, null);` // Submission receipt type code [v3.00 addition] |
| 36 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKMSHO_TRAT_IF_TNTSHA_NM, null);` // Submission document handling information responsible person name [v3.00 addition] |
| 37 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKMSHO_TRAT_IF_TELNO, null);` // Submission document handling information phone number [v3.00 addition] |
| 38 | SET | `childMap.put(EKK0011D020CBSMsg1List.MSKMSHO_DTL_NO, null);` // Submission document detail number |
| 39 | SET | `childMap.put(EKK0011D020CBSMsg1List.HNIN_CFM_ATICLE_NM, null);` // Identity verification document name |

**Block 5** — [PROCESS] `(Attach detail list to parent map, L360-L361)`

> Finalizes the message structure by adding the child detail list to the parent map under the template detail key.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inList.add(childMap);` // Add the populated child map to the detail list |
| 2 | SET | `inMap.put(TEMPLATE_ID_DETAIL_MSKM_NAIYO_SHONIN_ADD, inList);` // Set the detail list under the template key [-> TEMPLATE_ID_DETAIL_MSKM_NAIYO_SHONIN_ADD = EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST (JFUDslOpSvcKeiCC.java:L99)] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mskm` | Abbreviation | 申込 (Moushikomi) — Application / Submission |
| `mskm_sbt_cd` | Field | Application type code — classifies the type of subscription application being processed |
| `mskm_uk_dtm` | Field | Application received date-time stamp — records when the application was received by the system |
| `mskm_ymd` | Field | Application date — the calendar date of the application |
| `consmbsn_mskm_stat_skbt_cd` | Field | Consumer business submission status identification code — indicates the current status of consumer business applications |
| `mskmsho_no` | Field | Application document number — unique identifier for the application submission document |
| `web_uk_no` | Field | WEB application number — reference number for web-based applications |
| `mskm_form_cd` | Field | Application form code — identifies the type of application form (e.g., "01" for standard/paperless form) |
| `mskm_dtl_sbt_cd` | Field | Application detail type code — further classifies the application by detail type |
| `rrks_ktai_telno` | Field | Contact mobile phone number |
| `rrks_offc_nm` | Field | Contact office name |
| `dt_rrks_telno` | Field | Daytime contact phone number |
| `new_mskm_sbt_cd` | Field | New application type code — type code for new subscription applications |
| `mskm_optnty_cd` | Field | Application opportunity code — identifies the business opportunity/channel through which the application was submitted |
| `takcho_kibo_apo_kigen_ymd` | Field | Home inspection desired appointment deadline date — the date by which the customer wishes to schedule a home inspection |
| `koji_apo_rrks_shitei_cd` | Field | Work appointment contact designation code — specifies which party to contact for work appointments |
| `koji_apo_rrks_telno` | Field | Work appointment contact phone number |
| `rrk_jiko_add_dtm` | Field | Contact item registration date-time stamp |
| `mskm_rrks_mlad` | Field | Application contact email address |
| `koji_prg_tchi_mlad` | Field | Work progress notification email address |
| `rrk_jiko` | Field | Contact item — free-text field for customer contact preferences |
| `kjsc_tch_ktai_mlad` | Field | Work progress notification mobile email address |
| `ml_send_jgi_flg` | Field | Mail send exclusion flag — when set, suppresses email notifications |
| `ml_send_jgi_rsn_memo` | Field | Mail send exclusion reason memo — reason why email notifications are suppressed |
| `bmp_mskm_rrks_tln` | Field | Banner application contact phone number |
| `op_svc_hktgi_um` | Field | Option service inheritance flag — indicates whether option services are inherited |
| `dsl_aticle_sohu_kibo_um` | Field | Contract document send-delivery request flag — whether the customer requests delivery of contract documents |
| `rrk_way_hoki` | Field | Contact method supplement — supplementary information about preferred contact methods |
| `newconst_bukken_cd` | Field | New construction building code — identifies new construction buildings |
| `hukkat_anken_flg` | Field | Reactivation case flag — indicates if this is a reactivation (resumption after cancellation) case |
| `same_equip_re_mskm_cd` | Field | Same equipment re-application code — for applications re-submitted for the same equipment |
| `hnin_cfm_aticle_sbt_cd` | Field | Identity verification document type code — type of document used for identity verification |
| `mskmsho_sbt_cd` | Field | Submission document type code |
| `kei_huka_cd` | Field | Contract add-on code — code for additional contract items (added in v3.00) |
| `map_temp_um` | Field | Map attachment flag — indicates whether a map is attached |
| `kcn_stb_mskm_cnt` | Field | KCNSTB application count — number of set-top box applications |
| `kcn_stb_kind_cd` | Field | KCNSTB type code — type code for set-top boxes |
| `manssbsys_rnki_yo_kijiran` | Field | Mansion facility system linkage memo — memo for mansion facility system integration (added in v3.00) |
| `mansion_id` | Field | Mansion ID — identifier for apartment/mansion buildings (added in v3.00) |
| `catid` | Field | CAT-ID — category identifier |
| `mkm_uk_sbt_cd` | Field | Application receipt type code — type of application receipt (added in v3.00) |
| `mskmsho_trat_if_tntsha_nm` | Field | Submission document handling information responsible person name (added in v3.00) |
| `mskmsho_trat_if_telno` | Field | Submission document handling information phone number (added in v3.00) |
| `mskmsho_dtl_no` | Field | Submission document detail number |
| `hnin_cfm_aticle_nm` | Field | Identity verification document name |
| `sysid` | Field | System ID — identifier for the originating system |
| `CC_SYSID` | Field | Customer Context System ID — local key for accessing system ID from the request parameter map |
| `fixedText` | Parameter | Service message key — used to retrieve the CBS message map from the request parameter |
| `IRequestParameterReadWrite` | Type | Request parameter interface — contract for reading/writing request parameters in the BPM framework |
| `EKK0011D020CBSMsg` | Class | CBS message schema — schema definition for Application Content Approval Registration message |
| `EKK0011D020CBSMsg1List` | Class | CBS message child list schema — schema definition for nested detail records in the approval registration message |
| `JFUStrConst` | Class | String constants utility class — centralized constant definitions for string values across the application |
| `JFUBPCommon` | Class | BP Common utility class — provides common utility methods including system date/time retrieval |
| `dslOpSvcKei` | Method | DSL Operation Service Key Info — the parent method that orchestrates the DSL operation service contract processing workflow |
| CBS | Acronym | Call Back Service — Fujitsu middleware component for service-to-service communication |
| CC | Acronym | Common Component — shared utility/service class within the custom.common package |
| BPM | Acronym | Business Process Management — the framework providing IRequestParameterReadWrite and related classes |
| v3.00 | Version | Version 3.00 release — added service IF integration fields for mansion system linkage and related features |
