# Business Logic — KKW00810SFLogic.action_Init() [28 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00810SF.KKW00810SFLogic` |
| Layer | Controller (WebLogic — sits in the web presentation layer, extends `JCCWebBusinessLogic`) |
| Module | `KKW00810SF` (Package: `eo.web.webview.KKW00810SF`) |

## 1. Role

### KKW00810SFLogic.action_Init()

This method serves as the **initial display dispatcher** for the Fixed IP Address Information Registration screen flow (Japanese: 固定グローバルIPアドレス情報登録画面初期表示 — "Fixed Global IP Address Information Registration Screen Initial Display"). It acts as the screen entry-point method, invoked by the framework when the web screen first loads. The method's primary business purpose is to determine which sub-screen within the three-step Fixed IP registration flow the user is entering, and delegate initialization to the appropriate handler.

The method implements a **routing/dispatch design pattern**: it reads the target screen ID from the common information bean and branches into one of three initialization handlers based on that ID:

- **KKW00810 (Registration screen / 固定グローバルIPアドレス情報登録)** — Initializes the main data-entry form for registering a fixed IP address. This is the primary step where fixed IP address details are fetched from the backend, including IP assignment results from the associated KKSV0022 service.
- **KKW00811 (Confirmation screen / 固定グローバルIPアドレス情報登録確認)** — Initializes the confirmation form where the user reviews the registration data before final submission.
- **KKW00812 (Completion screen / 固定グローバルIPアドレス情報登録完了)** — Initializes the completion/confirmation-of-completion form shown after successful registration.

The method has no parameters and no instance fields read, making it a purely stateless routing logic. For the KKW00810 branch specifically, it also configures the navigation context by setting the NEXT_SCREEN_ID and NEXT_SCREEN_NAME in the common info bean, ensuring the framework renders the correct screen title. This method is the entry point for all three screens in the Fixed IP Address Information Registration workflow and is typically invoked by the web framework's screen lifecycle management.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["action_Init"])

    START --> GET_BEAN["Get commonInfoBean from super.getCommonInfoBean"]
    GET_BEAN --> GET_SCREEN["Get screenId from commonInfoBean.sendMessageString(NEXT_SCREEN_ID, DATABEAN_GET_VALUE)"]
    GET_SCREEN --> COND_810{"Is screenId == KKW00810?"}
    COND_810 -->|Yes| INIT_810["Call actionInitKKW00810()"]
    COND_810 -->|No| COND_811{"Is screenId == KKW00811?"}
    COND_811 -->|Yes| INIT_811["Call actionInitKKW00811()"]
    COND_811 -->|No| COND_812{"Is screenId == KKW00812?"}
    COND_812 -->|Yes| INIT_812["Call actionInitKKW00812()"]
    COND_812 -->|No| RETURN["Return true"]
    INIT_810 --> SET_SID["Set NEXT_SCREEN_ID to screenId via commonInfoBean.sendMessageString"]
    SET_SID --> SET_SNAME["Set NEXT_SCREEN_NAME to SCREEN_NAME_KKW00810 via commonInfoBean.sendMessageString"]
    SET_SNAME --> RETURN
    INIT_811 --> RETURN
    INIT_812 --> RETURN
```

**Screen ID Branch Meanings:**

| Condition | Screen ID Value | Business Meaning |
|-----------|----------------|------------------|
| `SCREEN_ID_KKW00810` | `"KKW00810"` | Fixed IP Address Information Registration (main data-entry screen) |
| `SCREEN_ID_KKW00811` | `"KKW00811"` | Fixed IP Address Information Registration Confirmation |
| `SCREEN_ID_KKW00812` | `"KKW00812"` | Fixed IP Address Information Registration Completion |

**Screen Name Constants (for NEXT_SCREEN_NAME):**

| Constant | Value | Source Location |
|----------|-------|-----------------|
| `SCREEN_NAME_KKW00810` | `"固定グローバルIPアドレス情報登録"` | `JKKScreenConst.java:495` |
| `SCREEN_NAME_KKW00811` | `"固定グローバルIPアドレス情報登録確認"` | `JKKScreenConst.java:498` |
| `SCREEN_NAME_KKW00812` | `"固定グローバルIPアドレス情報登録完了"` | `JKKScreenConst.java:501` |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. The screen ID is retrieved from the framework-managed common info bean (`CommonInfoCFConst.NEXT_SCREEN_ID`) which is set by the framework based on navigation from a previous screen. |

**No instance fields or external state are read** by this method directly. All data access goes through the `commonInfoBean` (obtained via `super.getCommonInfoBean()`). The called methods (`actionInitKKW00810/1/2`) read additional instance fields (e.g., `SVC_ID_KKSV0022`, `OP_ID_KKSV0022OP`, `unyo_ymd`) and service beans internally.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Reads `NEXT_SCREEN_ID` from common info bean to determine target screen |
| - | `KKW00810SFLogic.actionInitKKW00810` | KKW00810SFLogic | - | Delegates to initialization handler for registration screen (KKW00810) |
| - | `KKW00810SFLogic.actionInitKKW00811` | KKW00810SFLogic | - | Delegates to initialization handler for confirmation screen (KKW00811) |
| - | `KKW00810SFLogic.actionInitKKW00812` | KKW00810SFLogic | - | Delegates to initialization handler for completion screen (KKW00812) |
| R | `KKW00810SFLogic.actionInitKKW00810` | KKW00810SFLogic | `KK_T_FIXIPAD` (via KKSV0022 service) | Reads fixed IP address data from backend; invokes KKSV0022 use case to fetch IP assignment results; calls `KKSV0022_KKSV0022OPDBMapper.setKKSV002201CC` to map data |
| R | `KKW00810SFLogic.actionInitKKW00811` | KKW00810SFLogic | - | Reads data needed for confirmation screen display |
| R | `KKW00810SFLogic.actionInitKKW00812` | KKW00810SFLogic | - | Reads data needed for completion screen display |

**Notes on SC Codes and Entities:**
- `actionInitKKW00810` invokes the `KKSV0022` use case (telegram info `SVC_ID_KKSV0022`, `OP_ID_KKSV0022OP`) via `invokeService`. This use case is the backend service that fetches fixed IP address assignment results from the database (entity: `KK_T_FIXIPAD` — fixed IP address table).
- The `KKSV0022_KKSV0022OPDBMapper` handles data mapping between the service form bean and the backend service layer.
- The `actionInitKKW00811` and `actionInitKKW00812` methods are similarly structured (private initialization handlers) but are not detailed in the source range of this document — their role is to prepare confirmation and completion screen data respectively.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00810 | Framework (JCCWebBusinessLogic) → `action_Init` → `actionInitKKW00810` → `invokeService(SVC_ID_KKSV0022)` → `KKSV0022` CBS/SC → `KK_T_FIXIPAD` | `invokeService(SVC_ID_KKSV0022) [R] KK_T_FIXIPAD` |
| 2 | Screen:KKW00811 | Framework (JCCWebBusinessLogic) → `action_Init` → `actionInitKKW00811` | _(delegated init handler — confirmation screen data)_ |
| 3 | Screen:KKW00812 | Framework (JCCWebBusinessLogic) → `action_Init` → `actionInitKKW00812` | _(delegated init handler — completion screen data)_ |

**Notes:**
- This method is the standard screen initialization entry point, called by the X31 framework's web MVC lifecycle when the screen loads. It is not directly called by other business logic methods.
- The `action_Syuse` method in the same class sets `NEXT_SCREEN_ID` back to `KKW00810`, enabling navigation to return to this initial screen.
- The KKSV0022 service use case is the terminal backend service, which interacts with the fixed IP address database.

## 6. Per-Branch Detail Blocks

### Block 1 — GET (L168)

> Retrieves the common information bean from the framework base class.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commonInfoBean = super.getCommonInfoBean()` // Get commonInfoBean — framework-managed shared data bean |

### Block 2 — GET (L171)

> Retrieves the target screen ID from the common info bean to determine which sub-screen initialization to perform. Japanese comment: 遷移先画面IDを取得 — "Get the destination screen ID".

| # | Type | Code |
|---|------|------|
| 1 | SET | `screenId = commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_GET_VALUE)` // Get next screen ID |

### Block 3 — IF (condition: `JKKScreenConst.SCREEN_ID_KKW00810.equals(screenId)`) `[SCREEN_ID_KKW00810="KKW00810"]` (L173)

> Japanese comment: 遷移先画面IDから、行う表示処理を決定 — "Determine the display processing to perform from the destination screen ID". Branch: Fixed IP Address Information Registration (main data-entry screen).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `actionInitKKW00810()` // Initialize registration screen — fetches fixed IP address data, invokes KKSV0022 service |

#### Block 3.1 — EXEC (L177)

> Japanese comment: 自画面を表示する — "Display this screen". Sets the navigation context so the framework knows which screen to render.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, screenId)` // Set NEXT_SCREEN_ID for current screen |
| 2 | EXEC | `commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_NAME_KKW00810)` // Set screen name — [-> SCREEN_NAME_KKW00810="固定グローバルIPアドレス情報登録" (JKKScreenConst.java:495)] |

### Block 4 — ELSE-IF (condition: `JKKScreenConst.SCREEN_ID_KKW00811.equals(screenId)`) `[SCREEN_ID_KKW00811="KKW00811"]` (L183)

> Japanese comment: 固定グローバルIPアドレス情報登録確認画面 — "Fixed IP Address Information Registration Confirmation Screen". Branch: Confirmation screen initialization.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `actionInitKKW00811()` // Initialize confirmation screen |

### Block 5 — ELSE-IF (condition: `JKKScreenConst.SCREEN_ID_KKW00812.equals(screenId)`) `[SCREEN_ID_KKW00812="KKW00812"]` (L187)

> Japanese comment: 固定グローバルIPアドレス情報登録完了画面 — "Fixed IP Address Information Registration Completion Screen". Branch: Completion screen initialization.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `actionInitKKW00812()` // Initialize completion screen |

### Block 6 — RETURN (L192)

> Returns `true` to indicate successful initialization. This is the default return path for all branches, including when the screen ID does not match any known value (implicit fall-through).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true;` // Initialization completed successfully |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKW00810` | Screen ID | Fixed Global IP Address Information Registration — main data-entry screen for registering a static/fixed IP address for a customer |
| `KKW00811` | Screen ID | Fixed Global IP Address Information Registration Confirmation — review screen showing registration data before submission |
| `KKW00812` | Screen ID | Fixed Global IP Address Information Registration Completion — success/completion screen after registration is finished |
| `KKSV0022` | Use Case ID | Service use case for fixed IP address data retrieval — backend service that queries fixed IP assignment data |
| `KKSV0022OP` | Operation ID | Operation identifier for the KKSV0022 use case operation |
| `KKSV0022OPDBMapper` | Mapper Class | Data mapping class between the service form bean and the KKSV0022 backend service input/output |
| `NEXT_SCREEN_ID` | Constant | Common info bean key (`CommonInfoCFConst.NEXT_SCREEN_ID`) — holds the target screen ID for navigation |
| `NEXT_SCREEN_NAME` | Constant | Common info bean key (`CommonInfoCFConst.NEXT_SCREEN_NAME`) — holds the display name of the target screen |
| `SCREEN_NAME_KKW00810` | Constant | `"固定グローバルIPアドレス情報登録"` — Screen display title for registration screen |
| `DATABEAN_GET_VALUE` | Constant | `X31CWebConst.DATABEAN_GET_VALUE` — Flag to retrieve a value from a data bean |
| `DATABEAN_SET_VALUE` | Constant | `X31CWebConst.DATABEAN_SET_VALUE` — Flag to set a value in a data bean |
| `commonInfoBean` | Field | `X31SDataBeanAccess` — Framework-managed shared data bean holding common screen information (e.g., next screen ID, screen name, user info) |
| `svcFormBean` | Field | `X31SDataBeanAccess` — Service form data bean holding screen-specific form data and data bean arrays |
| `invokeService` | Method | Framework method that invokes a backend use case (SC/CBS) by use case ID, with input/output maps for data transfer |
| `FIXIPAD_HRADSI_LIST` | Constant | Fixed IP address assignment result list — data bean array containing fixed IP address assignment results returned from the backend |
| `KOTEI_IP_AD` | Constant | `"固定IPアドレス"` — Fixed IP address field ID |
| `SUBNET_MASK` | Constant | `"サブネットマスク"` — Subnet mask field ID |
| `USE_STAYMD_YEAR/MON/DAY` | Constants | `"/利用開始日（年）"`, `"/利用開始日（月）"`, `"/利用開始日（日）"` — Service start date split into year/month/day fields |
| `SVC_KEI_KAISEN_UCWK_NO` | Constant | Service contract detail work number — internal tracking ID for service contract line items |
| `SVC_KEI_UCWK_NO` | Constant | Service contract internal work number — another form of service contract tracking ID |
| `unyo_ymd` | Field | Service start date string (8 digits: YYYYMMDD) — instance field used by `editServiceFormBean` to split the date into year/month/day |
| `JCCWebBusinessLogic` | Class | Base class for CC-layer web business logic — provides common services like `getCommonInfoBean()`, `getServiceFormBean()`, `invokeService()` |
| `X31SDataBeanAccess` | Class | Framework data bean access class — provides `sendMessageString` for get/set values and `getDataBeanArray` for array-type beans |
| `JCCWebCommon` | Class | Common web utility class — provides `getScreenInfo` (inherit item data) and `getSearchErrFlg` (search error flag retrieval) |
| `SCREEN_ID_KKW00810` | Constant | `"KKW00810"` — Screen identifier constant for the registration screen [-> JKKScreenConst.java:493] |
| `SCREEN_ID_KKW00811` | Constant | `"KKW00811"` — Screen identifier constant for the confirmation screen [-> JKKScreenConst.java:496] |
| `SCREEN_ID_KKW00812` | Constant | `"KKW00812"` — Screen identifier constant for the completion screen [-> JKKScreenConst.java:499] |
| `JPCOnlineMessageConstant.EKB5470_KW` | Constant | Error message key for fixed IP address search error display |
| `TELEGRAM_INFO_USECASE_ID` | Constant | Key for the use case ID in the parameter map passed to `invokeService` |
| `TELEGRAM_INFO_OPERATION_ID` | Constant | Key for the operation ID in the parameter map passed to `invokeService` |
| `TELEGRAM_INFO_OPERATE_DATETIME` | Constant | Key for the operation timestamp in the parameter map |
| `KK_T_FIXIPAD` | Entity | Fixed IP address database table — stores fixed IP address assignment data (inferred from context of KKSV0022 service) |
