# Business Logic — KKW00810SFLogic.action_Cfm() [22 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00810SF.KKW00810SFLogic` |
| Layer | Controller / Screen Logic (Web view layer — screen business logic) |
| Module | `KKW00810SF` (Package: `eo.web.webview.KKW00810SF`) |

## 1. Role

### KKW00810SFLogic.action_Cfm()

This method serves as the **confirmation-screen entry handler** for the **Fixed Global IP Address Information Registration** screen (KKW00810). When the user presses the "Register" button on the fixed global IP address registration screen, this method is invoked to perform final item validation and orchestrate the registration workflow before transitioning to the next screen (KKW00811, the confirmation screen).

Specifically, it first delegates the core IP address option registration logic to `doRegistFixedIPAddressOption()` with function code `2` (indicating a non-immediate/standard registration function, as opposed to function code `1` used for immediate application). This ensures that all related service contract mappings, option contract registrations, and fixed IP address calculations are persisted into the service form bean before the confirmation step.

After the registration delegate completes, the method prepares the navigation payload: it retrieves the shared common info bean, sets the next screen identifier and screen name to `KKW00811` (Fixed Global IP Address Information Registration Confirmation Screen), and posts a user-facing status message — "固定グローバルIPアドレスの登録" ("Fixed Global IP Address Registration") — using the screen message framework. Finally, it performs a data bean dump for diagnostic logging and unconditionally returns `true` to signal successful processing and trigger navigation to the confirmation screen.

This method implements the **command handler** pattern: it is the screen-logic equivalent of a POST handler, accepting user input, delegating to a business service method, preparing navigation state, and returning a success indicator.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["action_Cfm Entry"])

    CALL_REG["doRegistFixedIPAddressOption FUNC_CD_2"]

    GET_COMMON["getCommonInfoBean"]

    SET_NEXT_ID["sendMessageString NEXT_SCREEN_ID set SCREEN_ID_KKW00811"]

    SET_NEXT_NAME["sendMessageString NEXT_SCREEN_NAME set SCREEN_NAME_KKW00811"]

    MSG_TITLE["Set message array: 固定グローバルIPアドレスの登録"]

    SET_MSG["JCCWebCommon.setMessageInfo EKB0370--I"]

    LOG_DUMP["JSYwebLog.println DataBean_Dump dumpDatabean"]

    RETURN(["Return true"])

    START --> CALL_REG
    CALL_REG --> GET_COMMON
    GET_COMMON --> SET_NEXT_ID
    SET_NEXT_ID --> SET_NEXT_NAME
    SET_NEXT_NAME --> MSG_TITLE
    MSG_TITLE --> SET_MSG
    SET_MSG --> LOG_DUMP
    LOG_DUMP --> RETURN
```

**Processing flow:**

1. **Registration delegation** — Calls `doRegistFixedIPAddressOption` with function code `2` (`FUNC_CD_2 = "2"` [-> FUNC_CD_2="2"] (JPCModelConstant.java:32)). This internal method (at lines 424+) performs the heavy lifting: it accesses the service form bean, configures it, builds parameter maps, creates the `KKSV0023_KKSV0023OPDBMapper`, and invokes a series of data bean mapping operations (service contract mapping, customer agreement mapping, order content admission registration, option service contract <ISP> registration, option contract start mapping, order details / post-processing delegation, fixed IP address calculation, progress information registration, order condition registration, and order information creation work registration) to persist the fixed global IP address option data.

2. **Common info bean acquisition** — Calls `getCommonInfoBean()` (inherited from `JCCWebBusinessLogic`) to obtain the shared `X31SDataBeanAccess` for cross-screen state transfer.

3. **Navigation setup** — Sends the next screen ID (`KKW00811` [-> SCREEN_ID_KKW00811]) and next screen name (`KKW00811` [-> SCREEN_NAME_KKW00811]) to the common info bean via `sendMessageString` with `DATABEAN_SET_VALUE`, telling the framework which screen to navigate to next.

4. **Message display preparation** — Creates a string array containing the message title "固定グローバルIPアドレスの登録" ("Fixed Global IP Address Registration") and passes it to `JCCWebCommon.setMessageInfo()` with message key `EKB0370--I` [-> EKB0370__I="EKB0370--I"] (JPCOnlineMessageConstant.java:143) to display a confirmation/status message on the next screen.

5. **Diagnostic logging** — Dumps the current state of the data bean to the diagnostic log via `JSYwebLog.println()` with `DataBean_Dump` level, passing `getClass()` and the result of `dumpDatabean()`.

6. **Return** — Returns `true` to indicate successful processing, triggering the framework to navigate to the KKW00811 confirmation screen.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It operates entirely on instance state and framework-provided context (service form bean, common info bean) that are accessible through inherited base class methods. |
| 1 | (implicit) | `X31SDataBeanAccess` | Service form bean — contains the fixed global IP address option data entered on the previous screen (KKW00810 registration input), retrieved internally via `getServiceFormBean()`. |
| 2 | (implicit) | `X31SDataBeanAccess` | Common info bean — shared data bean used for cross-screen navigation state (next screen ID, screen name), retrieved internally via `getCommonInfoBean()`. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `doRegistFixedIPAddressOption(func_code)` | KKW00810SFLogic (internal) | - | Delegates fixed global IP address option registration. The invoked method calls `configServiceFormBean()`, creates a `KKSV0023_KKSV0023OPDBMapper`, and invokes mapping methods: `setKKSV002201CC` (fixed IP address calculation), `setKKSV002303SC` (service contract agreement mapping), `setKKSV002304SC` (customer agreement mapping), `setKKSV002308SC` (order content admission registration), `setKKSV002309SC` (option service contract ISP registration), `setKKSV002310SC` (option contract start mapping), `setKKSV002311SC` (order details / post-processing delegation), `setKKSV002312SC` (fixed IP address calculation), `setKKSV002313SC` (progress information registration), `setKKSV002314SC` (order condition registration), `setKKSV002315SC` (order information creation work registration). Note: several mapper calls are commented out in v7.00+. |
| - | `JCCWebCommon.setMessageInfo` | JCCWebCommon | - | Sets a user-visible screen message (registration status) to be displayed after processing. |
| - | `X31SDataBeanAccess.sendMessageString` | X31SDataBeanAccess | - | Writes navigation metadata (next screen ID, screen name) to the shared common info data bean for framework navigation. |
| - | `JSYwebLog.println` | JSYwebLog | - | Writes diagnostic log output (data bean dump) for debugging/troubleshooting purposes. |

**CRUD Analysis (for the inner `doRegistFixedIPAddressOption` method):**

The `doRegistFixedIPAddressOption(String func_code)` method (lines 424+) performs **Create** operations by invoking mapper methods that write fixed global IP address option data and related service contract data into the system. The mapper `KKSV0023_KKSV0023OPDBMapper` calls SC methods (`setKKSV0023xxSC`, `setKKSV002201CC`) which ultimately execute database inserts/updates against service contract and IP address assignment tables.

The `action_Cfm()` method itself does not perform direct database CRUD operations — it delegates to `doRegistFixedIPAddressOption` and then prepares navigation.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `KKSV0023xxSC set*` (via mapper) | KKSV0023xxSC | Service contract / IP address tables (inferred from mapper context) | Creates/updates fixed global IP address option entries and related service contract mappings via mapper delegates. |
| - | `JCCWebCommon.setMessageInfo` | JCCWebCommon | - | Sets display message on screen message list. |
| - | `sendMessageString` | X31SDataBeanAccess | - | Sets navigation state (next screen ID, next screen name) in shared common info bean. |
| - | `JSYwebLog.println` | JSYwebLog | - | Logs data bean dump for diagnostic purposes. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00810 | `KKW00810` (registration input screen) -> framework dispatch -> `KKW00810SFLogic.action_Cfm()` | `doRegistFixedIPAddressOption` -> mapper `setKKSV0023xxSC` (C) service contract/IP tables |

**Notes on call chain:** This method is the action handler for the **KKW00810 Fixed Global IP Address Information Registration** screen. When the user presses the register button on the input screen, the framework's screen dispatcher calls `action_Cfm()`. The subsequent method `KKW00811` (confirmation screen) is the next screen in the flow. The `KKW00810SFLogic` class is also referenced by `KKW00810SFChecker` (validation logic) and `KKW00810SFConst` (constant definitions), but these are supporting classes, not callers of `action_Cfm()`.

## 6. Per-Branch Detail Blocks

### Block 1 — CALL (Registration delegation) (L367)

> Delegates to the fixed global IP address option registration method with function code "2" (standard registration, not immediate application).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `doRegistFixedIPAddressOption(JPCModelConstant.FUNC_CD_2)` // Delegates fixed global IP address option registration [-> FUNC_CD_2="2"] (JPCModelConstant.java:32) |

### Block 2 — CALL (Common info bean acquisition) (L370)

> Retrieves the shared common info bean used for cross-screen state transfer.

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess commonInfoBean = super.getCommonInfoBean()` // Get shared bean for cross-screen access |

### Block 3 — SET (Next screen ID) (L373)

> Sets the next screen identifier in the common info bean so the framework knows to navigate to the confirmation screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_ID_KKW00811)` // Set next screen ID = KKW00811 (confirmation screen) |

### Block 4 — SET (Next screen name) (L374)

> Sets the next screen name in the common info bean for display purposes.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commonInfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_NAME_KKW00811)` // Set next screen name = KKW00811 |

### Block 5 — SET + CALL (Message display) (L377–L378)

> Creates a user-visible status message ("固定グローバルIPアドレスの登録" = "Fixed Global IP Address Registration") and registers it with the screen message framework for display on the next screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String[] str = { "固定グローバルIPアドレスの登録" }` // Message title array [-> English: "Fixed Global IP Address Registration"] |
| 2 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0370__I, str)` // Set message on screen [-> EKB0370__I="EKB0370--I"] (JPCOnlineMessageConstant.java:143) |

### Block 6 — CALL (Diagnostic logging) (L381)

> Dumps the current data bean state to the diagnostic log for debugging/troubleshooting.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // DataBean dump logging |

### Block 7 — RETURN (Success) (L383)

> Returns `true` to indicate successful processing and trigger navigation to the confirmation screen.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true` // Success — framework navigates to next screen (KKW00811) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKW00810` | Screen ID | Fixed Global IP Address Information Registration screen — the input screen where users enter fixed global IP address options. |
| `KKW00811` | Screen ID | Fixed Global IP Address Information Registration Confirmation screen — the screen displayed after successful registration for user review. |
| Fixed Global IP Address | Business term | A static (non-dynamic) public IP address assigned to a customer's service contract line, as opposed to dynamically allocated IP addresses. |
| `FUNC_CD_2` | Constant | Function code "2" — indicates standard (non-immediate) registration mode, as opposed to `FUNC_CD_1` which is used for immediate application with same-day start. |
| `FUNC_CD_1` | Constant | Function code "1" — indicates immediate application mode (service start date is same day). Used in other registration methods. |
| `EKB0370--I` | Message key | System message key for registration confirmation status display. |
| `NEXT_SCREEN_ID` | Constant key | Common info bean key for specifying the next screen to navigate to. |
| `NEXT_SCREEN_NAME` | Constant key | Common info bean key for specifying the next screen's display name. |
| `DATABEAN_SET_VALUE` | Constant key | Databean operation mode indicating a write/set operation. |
| `SCREEN_ID_KKW00811` | Constant | The screen ID string for the KKW00811 confirmation screen. |
| `SCREEN_NAME_KKW00811` | Constant | The screen name string for the KKW00811 confirmation screen. |
| `X31SDataBeanAccess` | Class | Shared data bean access class for passing data between screens and components. |
| `X31BBusinessLogic` | Class | Base business logic class providing common methods like `getServiceFormBean()` and `getCommonInfoBean()`. |
| `JCCWebBusinessLogic` | Class | Web-tier base business logic class that `KKW00810SFLogic` extends. |
| `JCCWebCommon` | Class | Web-common utility class providing screen-level operations like message setting. |
| `KKSV0023_KKSV0023OPDBMapper` | Class | Data bean mapping class for KKSV0023 (service contract) — maps web data to service component parameters. |
| `JSYwebLog` | Class | Diagnostic logging class for web-tier debugging output. |
| `DataBean_Dump` | Log level | Log level indicating a full data bean state dump for debugging. |
| `KKW00810SFLogic` | Class | Screen business logic class for KKW00810 Fixed Global IP Address Information Registration. |
| `KKW00810SFChecker` | Class | Screen validation logic class implementing `X31SGuiCheckBase` for field-level validation. |
| `KKW00810SFBean` | Class | Screen data bean class aggregating multiple detail bean types for the KKW00810 screen. |
