# Business Logic — KKW02504SFLogic.setMappedKKSV0008() [79 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW02504SF.KKW02504SFLogic` |
| Layer | Controller / Logic (web presentation layer — sits between screen controllers and mapping/DB access) |
| Module | `KKSV0008` (Package: `eo.web.webview.KKW02504SF`) |

## 1. Role

### KKW02504SFLogic.setMappedKKSV0008()

This method performs the complete data-mapping operation for the **My Homepage Information Change Confirmation Service** (Ｍｙホームページ情報変更確認サービス). It is the central data preparation step that populates all form beans and working maps required for the My HP Information Change screen (KKSV0008) before the UI is rendered to the user.

The method implements a **sequential delegate pattern**: it creates a single `KKSV0008_KKSV0008OPDBMapper` instance and invokes a fixed sequence of service component calls, each responsible for mapping a specific subset of business data — from order content approvals, billing views, optional ISP service contracts, email forwarding settings, home page capacity information, access analysis data, to progress tracking details. Every sub-component receives the same `paramBean` (the screen form bean) and `inputMap` (the shared working map), ensuring a consistent data flow through all mapping stages.

It is a **shared utility** called by two screen action methods (`actionFixMyHPInfo` and `actionUpdMyHPInfo`) — one for fixing (viewing) My HP information and one for updating it. The `func_cd` parameter determines which functional branch each sub-mapping method takes internally, enabling this single method to serve both read and write confirmation scenarios without duplicating mapping logic.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setMappedKKSV0008(func_cd)"])
    START --> GETBEAN["Get Service Form Bean"]
    GETBEAN --> INIT["Initialize Mapper & inputMap"]
    INIT --> SC01["setKKSV000801SC - Order Content Approval Registration"]
    SC01 --> SC40["setKKSV000840SC - Billing Forward View (Invoice Contract No / Service Contract No)"]
    SC40 --> SC03["setKKSV000803SC - Optional Service Contract <ISP> Info Change"]
    SC03 --> SC24["setKKSV000824SC - Optional Service Contract <ISP> Start"]
    SC24 --> SC21["setKKSV000821SC - Email Target Registration"]
    SC21 --> SC22["setKKSV000822SC - Email Forward View (Uni-q)"]
    SC22 --> SC23["setKKSV000823SC - Email Target Use End"]
    SC23 --> SC26["setKKSV000826SC - Recovery Period End"]
    SC26 --> SC04["setKKSV000804SC - Home Page Capacity Registration"]
    SC04 --> SC19["setKKSV000819SC - Home Page Capacity Search"]
    SC19 --> SC05["setKKSV000805SC - Home Page Capacity Search Summary"]
    SC05 --> SC06["setKKSV000806SC - Home Page Capacity Use Start"]
    SC06 --> SC09["setKKSV000809SC - Home Page Capacity Change"]
    SC09 --> SC10["setKKSV000810SC - Access Analysis Registration"]
    SC10 --> SC20["setKKSV000820SC - Access Analysis Search"]
    SC20 --> SC11["setKKSV000811SC - Access Analysis Search Summary"]
    SC11 --> SC12["setKKSV000812SC - Access Analysis Use Start"]
    SC12 --> SC25["setKKSV000825SC - Access Analysis Cancel"]
    SC25 --> SC13["setKKSV000813SC - Access Analysis Termination"]
    SC13 --> SC14["setKKSV000814SC - Access Analysis Termination Confirmation"]
    SC14 --> SC27["setKKSV000827SC - Progress Forward View SC"]
    SC27 --> SC17["setKKSV000817SC - Progress Info Registration"]
    SC17 --> SC02["setKKSV000802SC - Order Details Search & Follow-up Work"]
    SC02 --> WORK01["setKKSV0008WORK01 - Execution Condition Preparation"]
    WORK01 --> SODCC["setJKKHakkoSODCC - SODCC Processing"]
    SODCC --> WORK02["setKKSV0008WORK02"]
    WORK02 --> WORK03["setKKSV0008WORK03"]
    WORK03 --> WORK04["setKKSV0008WORK04"]
    WORK04 --> WORK05["setKKSV0008WORK05"]
    WORK05 --> WORK06["setKKSV0008WORK06"]
    WORK06 --> WORK07["setKKSV0008WORK07"]
    WORK07 --> UPD["setUpdMkmScinsprtWkCC - Form Input Support Work Info Update"]
    UPD --> END(["Return"])
```

**Constant Resolution:**
- `JPCModelConstant.FUNC_CD_1 = "1"` — Standard function code used for forward-view (read-only) operations, passed to methods that should not branch on functional mode (billing forward view, progress forward view).

**Processing flow summary:**
The method follows a purely sequential pipeline with no conditional branches of its own. It:
1. Retrieves the current screen form bean and wraps it in an array for pass-by-reference.
2. Initializes a fresh `HashMap` as the shared working map.
3. Delegates to 27 sub-mapping methods in a fixed order, each populating specific data subsets into the form bean and working map.
4. Returns `void` — all results are side-effect mutations on `paramBean[0]` and `inputMap`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `func_cd` | `String` | Function code that identifies the current screen's functional context. Passed through to most sub-mapping methods to let them branch internally (e.g., distinguishing between registration, inquiry, update, or cancellation operations). Typically corresponds to the screen operation type for the My HP Information Change service. |

**Instance fields / external state read:**
| Source | Description |
|--------|-------------|
| `super.getServiceFormBean()` | Retrieves the current screen's form data bean (`X31SDataBeanAccess`), which holds all user-entered and display data for the My HP Info Change screen. |
| `inputMap` | Instance field initialized as a new `HashMap<String, Object>` — the shared working map passed to all sub-mapping methods. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000801SC` | KKSV000801SC | - | Maps Order Content Approval Registration data (上りマップ処理 — upstream mapping) |
| R | `KKSV0008_KKSV0008OPDBMapper.setKKSV000840SC` | KKSV000840SC | - | Maps Billing Forward View — retrieves Invoice Contract No. and Service Contract No. for display |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000803SC` | KKSV000803SC | - | Maps Optional Service Contract <ISP> Information Change data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000824SC` | KKSV000824SC | - | Maps Optional Service Contract <ISP> Start data (IT2-2012-0001756 Add) |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000821SC` | KKSV000821SC | - | Maps Email Target Registration data |
| R | `KKSV0008_KKSV0008OPDBMapper.setKKSV000822SC` | KKSV000822SC | - | Maps Email Forward View (Uni-q) for display |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000823SC` | KKSV000823SC | - | Maps Email Target Use End data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000826SC` | KKSV000826SC | - | Maps Recovery Period End data (IT1-2013-0001261 Add — My HP URL Email対応) |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000804SC` | KKSV000804SC | - | Maps Home Page Capacity Registration data |
| R | `KKSV0008_KKSV0008OPDBMapper.setKKSV000819SC` | KKSV000819SC | - | Maps Home Page Capacity Search data (IT2-2012-0001756 Add) |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000805SC` | KKSV000805SC | - | Maps Home Page Capacity Search Summary data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000806SC` | KKSV000806SC | - | Maps Home Page Capacity Use Start data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000809SC` | KKSV000809SC | - | Maps Home Page Capacity Change data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000810SC` | KKSV000810SC | - | Maps Access Analysis Registration data |
| R | `KKSV0008_KKSV0008OPDBMapper.setKKSV000820SC` | KKSV000820SC | - | Maps Access Analysis Search data (IT2-2012-0001756 Add) |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000811SC` | KKSV000811SC | - | Maps Access Analysis Search Summary data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000812SC` | KKSV000812SC | - | Maps Access Analysis Use Start data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000825SC` | KKSV000825SC | - | Maps Access Analysis Cancel data (IT2-2012-0001756 Add) |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000813SC` | KKSV000813SC | - | Maps Access Analysis Termination data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000814SC` | KKSV000814SC | - | Maps Access Analysis Termination Confirmation data |
| R | `KKSV0008_KKSV0008OPDBMapper.setKKSV000827SC` | KKSV000827SC | - | Maps Progress Forward View SC data (LT-2013-0000012 — Skima date-time discrepancy対応) |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000817SC` | KKSV000817SC | - | Maps Progress Info Registration data |
| U | `KKSV0008_KKSV0008OPDBMapper.setKKSV000802SC` | KKSV000802SC | - | Maps Order Details Search and Follow-up Work data |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK01` | KKSV0008WORK01 | - | Execution condition determination preparation |
| - | `KKSV0008_KKSV0008OPDBMapper.setJKKHakkoSODCC` | JPKKHakkoSODCC | - | Service Order Data (SOD) creation/mapping component |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK02` | KKSV0008WORK02 | - | Work processing step 2 |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK03` | KKSV0008WORK03 | - | Work processing step 3 |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK04` | KKSV0008WORK04 | - | Work processing step 4 |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK05` | KKSV0008WORK05 | - | Work processing step 5 |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK06` | KKSV0008WORK06 | - | Work processing step 6 |
| - | `KKSV0008_KKSV0008OPDBMapper.setKKSV0008WORK07` | KKSV0008WORK07 | - | Work processing step 7 |
| - | `KKSV0008_KKSV0008OPDBMapper.setUpdMkmScinsprtWkCC` | KKSV0008WORK_CC | - | Update My HP screen input support work info (IT1-2013-0000299 Add) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `KKW02504SFLogic.actionFixMyHPInfo` | `actionFixMyHPInfo` → `setMappedKKSV0008` | `setJKKHakkoSODCC` [U] SOD / `setUpdMkmScinsprtWkCC` [U] Work Info |
| 2 | `KKW02504SFLogic.actionUpdMyHPInfo` | `actionUpdMyHPInfo` → `setMappedKKSV0008` | `setJKKHakkoSODCC` [U] SOD / `setUpdMkmScinsprtWkCC` [U] Work Info |

**Terminal operations from this method (deepest reach):**
`setUpdMkmScinsprtWkCC`, `setKKSV0008WORK07`, `setKKSV0008WORK06`, `setKKSV0008WORK05`, `setKKSV0008WORK04`, `setKKSV0008WORK03`, `setKKSV0008WORK02`, `setJKKHakkoSODCC`, `setKKSV000802SC` — all are called via the `KKSV0008_KKSV0008OPDBMapper` delegate and represent the leaf-level service component calls.

## 6. Per-Branch Detail Blocks

### Block 1 — Initialization (L1437)

> Retrieves the screen form bean and initializes the mapper and working map.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `X31SDataBeanAccess bean = super.getServiceFormBean();` // Get current screen form data [-> X31SDataBeanAccess] |
| 2 | SET | `X31SDataBeanAccess[] paramBean = {bean};` // Wrap bean in array for pass-by-reference [-> Bean array] |
| 3 | SET | `KKSV0008_KKSV0008OPDBMapper mapper8 = null;` // Initialize mapper reference [-> BP Mapping Class Object] |
| 4 | SET | `mapper8 = new KKSV0008_KKSV0008OPDBMapper();` // Instantiate mapping object [-> DataBean-BP Mapping Class Object] |
| 5 | SET | `inputMap = new HashMap<String, Object>();` // Create shared working map [-> HashMap] |

### Block 2 — Order Content Approval Registration (L1448)

> Maps the upstream order content approval registration data. This is the first data population step — the "upstream mapping" (上りマップ処理) that connects service item fields to data bean fields.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000801SC(paramBean, inputMap, func_cd);` // Order Content Approval Registration (申請内容承認登録) [KKSV000801SC] |

### Block 3 — Billing Forward View (L1451)

> Retrieves invoice contract number and service contract number for display in the billing forward view (課金先一覧照会). Uses a hardcoded function code.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000840SC(paramBean, inputMap, JPCModelConstant.FUNC_CD_1);` // Billing Forward View — Invoice Contract No./Service Contract No. (課金先一覧照会（請求契約番号／サービス契約番号）（一覧検索）) [-> FUNC_CD_1="1"] |

### Block 4 — Optional Service Contract ISP (L1454-L1458)

> Maps optional service contract <ISP> information change and start data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000803SC(paramBean, inputMap, func_cd);` // Optional Service Contract <ISP> Info Change (オプションサービス契約＜ISP＞情報変更) |
| 2 | CALL | `mapper8.setKKSV000824SC(paramBean, inputMap, func_cd);` // Optional Service Contract <ISP> Start (オプションサービス契約＜ISP＞開始) [IT2-2012-0001756 Add Start/End] |

### Block 5 — Email Forwarding Settings (L1461-L1467)

> Maps email forwarding target registration, view, use end, and recovery period end data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000821SC(paramBean, inputMap, func_cd);` // Email Target Registration (エイジング対象登録) |
| 2 | CALL | `mapper8.setKKSV000822SC(paramBean, inputMap, JPCModelConstant.FUNC_CD_1);` // Email Forward View (Uni-q) (エイジング一覧照会（ユニーク）) [-> FUNC_CD_1="1"] |
| 3 | CALL | `mapper8.setKKSV000823SC(paramBean, inputMap, func_cd);` // Email Target Use End (エイジング対象使用終了) |
| 4 | CALL | `mapper8.setKKSV000826SC(paramBean, inputMap, func_cd);` // Recovery Period End (回復可能期間終了) [IT1-2013-0001261 Add — My HP URL Email対応] |

### Block 6 — Home Page Capacity (L1470-L1477)

> Maps home page capacity registration, search, summary, use start, and change data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000804SC(paramBean, inputMap, func_cd);` // Home Page Capacity Registration (ホームページ容量登録) |
| 2 | CALL | `mapper8.setKKSV000819SC(paramBean, inputMap, func_cd);` // Home Page Capacity Search (ホームページ容量照会) [IT2-2012-0001756 Add Start/End] |
| 3 | CALL | `mapper8.setKKSV000805SC(paramBean, inputMap, func_cd);` // Home Page Capacity Search Summary (ホームページ容量検索締結) |
| 4 | CALL | `mapper8.setKKSV000806SC(paramBean, inputMap, func_cd);` // Home Page Capacity Use Start (ホームページ容量使用開始) |
| 5 | CALL | `mapper8.setKKSV000809SC(paramBean, inputMap, func_cd);` // Home Page Capacity Change (ホームページ容量変更) |

### Block 7 — Access Analysis (L1480-L1491)

> Maps access analysis registration, search, summary, use start, cancel, termination, and termination confirmation data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000810SC(paramBean, inputMap, func_cd);` // Access Analysis Registration (アクセス分析登録) |
| 2 | CALL | `mapper8.setKKSV000820SC(paramBean, inputMap, func_cd);` // Access Analysis Search (アクセス分析検索) [IT2-2012-0001756 Add Start/End] |
| 3 | CALL | `mapper8.setKKSV000811SC(paramBean, inputMap, func_cd);` // Access Analysis Search Summary (アクセス分析検索締結) |
| 4 | CALL | `mapper8.setKKSV000812SC(paramBean, inputMap, func_cd);` // Access Analysis Use Start (アクセス分析使用開始) |
| 5 | CALL | `mapper8.setKKSV000825SC(paramBean, inputMap, func_cd);` // Access Analysis Cancel (アクセス分析キャンセル) [IT2-2012-0001756 Add Start/End] |
| 6 | CALL | `mapper8.setKKSV000813SC(paramBean, inputMap, func_cd);` // Access Analysis Termination (アクセス分析解約) |
| 7 | CALL | `mapper8.setKKSV000814SC(paramBean, inputMap, func_cd);` // Access Analysis Termination Confirmation (アクセス分析解約確定) |

### Block 8 — Progress Info (L1494-L1498)

> Maps progress tracking data including the forward view and registration.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV000827SC(paramBean, inputMap, JPCModelConstant.FUNC_CD_1);` // Progress Forward View SC (進捗一覧照会SC) [LT-2013-0000012 — Skima date-time discrepancy対応] [-> FUNC_CD_1="1"] |
| 2 | CALL | `mapper8.setKKSV000817SC(paramBean, inputMap, func_cd);` // Progress Info Registration (進捗情報登録) |
| 3 | CALL | `mapper8.setKKSV000802SC(paramBean, inputMap, func_cd);` // Order Details Search & Follow-up Work (申請詳細照会・後続業務依頼) |

### Block 9 — SODCC & Work Processing (L1501-L1510)

> Sets execution condition preparation variables, processes the Service Order Data (SOD) component, and runs work processing steps.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setKKSV0008WORK01(paramBean, inputMap, "");` // Execution Condition Determination Preparation (実行条件判定用) |
| 2 | CALL | `mapper8.setJKKHakkoSODCC(paramBean, inputMap, func_cd);` // SODCC processing (SODCC) — Service Order Data creation/mapping |
| 3 | CALL | `mapper8.setKKSV0008WORK02(paramBean, inputMap, "");` // Work processing step 2 |
| 4 | CALL | `mapper8.setKKSV0008WORK03(paramBean, inputMap, "");` // Work processing step 3 |
| 5 | CALL | `mapper8.setKKSV0008WORK04(paramBean, inputMap, "");` // Work processing step 4 |
| 6 | CALL | `mapper8.setKKSV0008WORK05(paramBean, inputMap, "");` // Work processing step 5 |
| 7 | CALL | `mapper8.setKKSV0008WORK06(paramBean, inputMap, "");` // Work processing step 6 |
| 8 | CALL | `mapper8.setKKSV0008WORK07(paramBean, inputMap, "");` // Work processing step 7 |

### Block 10 — Form Input Support Update (L1513-L1514)

> Updates the screen input support work information. This is the final processing step.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper8.setUpdMkmScinsprtWkCC(paramBean, inputMap, func_cd);` // Form Input Support Work Info Update (申請画面入力支援ワーク情報更新呼出対応) [IT1-2013-0000299 Add Start/End] |
| 2 | RETURN | `return;` // Void return — all data mapped via side effects on paramBean and inputMap |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `func_cd` | Parameter | Function Code — identifies the current screen's operational context (e.g., inquiry, registration, update, cancellation) |
| `paramBean` | Internal | Service Form Bean array — holds the screen's form data passed by reference to all mapping methods |
| `inputMap` | Internal | Shared working HashMap — carries intermediate data between mapping method calls |
| `mapper8` | Internal | KKSV0008 OPDBMapper — the mapping/delegate object that routes data between the form bean and service components |
| X31SDataBeanAccess | Class | The screen's data access bean — holds all display and input fields for the My HP Information Change screen |
| KKSV0008 | Module | My Homepage Information Change Confirmation Service module — handles screen logic for displaying and confirming My HP-related service changes |
| KKW02504SF | Screen | My HP Information Change Confirmation screen — the web screen users interact with to review and confirm My HP information changes |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity representing a service order record |
| SODCC | Component | Service Order Data Creation Component — handles SOD record creation/mapping operations |
| ISP | Business term | Internet Service Provider — refers to ISP-related optional service contracts in the telecom domain |
| UP (上りマップ処理) | Comment | Upstream Mapping Processing — the process of mapping service item data to data bean fields for screen display |
| FUNC_CD_1 | Constant | Function Code "1" — standard code for forward-view (read-only/lookup) operations |
| SC | Acronym | Service Component — a service-layer class that encapsulates business logic and data access for a specific operation |
| WORK | Internal | Work processing — intermediate data preparation steps used for execution condition determination and supporting calculations |
| Uni-q | Business term | UNI-Q — NTT's fiber-to-the-home service brand; "Email Forward View (Uni-q)" refers to email forwarding settings for UNI-Q customers |
| エイジング (Eizingu) | Japanese term | Aging — in this context, refers to email aging/forwarding target management (registration, view, use end) |
| 進捗 (Shinseki) | Japanese term | Progress — refers to progress tracking information for service orders and contract workflows |
| 課金先一覧照会 (Kakin-saki Ichiran Shoukai) | Japanese term | Billing Forward View — displays invoice contract numbers and service contract numbers for billing purposes |
| 申請内容承認登録 (Shinai Naiyou Shounin Touroku) | Japanese term | Order Content Approval Registration — registers and maps the order content approval data |
| 後続業務依頼 (Kouzoku Gigou Irai) | Japanese term | Follow-up Work Request — triggers follow-up business processes after order details are mapped |
| 入力支援ワーク (Nyuuryoku Shien Work) | Japanese term | Input Support Work — screen input support data that helps guide user data entry |
