# Business Logic — FUW02201SFLogic.cfm() [19 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW02201SF.FUW02201SFLogic` |
| Layer | Controller (Web UI business logic — extends `JCCWebBusinessLogic`) |
| Module | `FUW02201SF` (Package: `eo.web.webview.FUW02201SF`) |

## 1. Role

### FUW02201SFLogic.cfm()

This method implements the **confirmation button processing** for the **Mail Virus Check Service Application screen** (メールウイルスチェックサービス申込画面 — a web UI for customers to subscribe to a mail virus protection service). When the user clicks "Confirm" on the application form, `cfm()` performs authorization and redirects to the review screen.

The method follows a **screen navigation delegation pattern**: it first invokes `execute()` with function code `2` to perform common pre-processing (including authorization checks, session validation, and common info population via `getCommonInfoBean()`), then writes two messages into the shared `X31SDataBeanAccess` bean to specify the next screen destination. The first message sets the next screen name to "メールウイルスチェックサービス申込確認" (Mail Virus Check Service Application Confirmation), and the second sets the next screen ID to `FUW02202`. Finally, it returns `true` to signal normal completion, which tells the web framework to render the target confirmation screen.

This method is a **screen-specific entry point** — it is the business logic handler for a single UI action (confirmation button press) and does not implement conditional routing based on input parameters. Its sole responsibility is orchestration: run common processing, set navigation targets, and return success.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["cfm()"])
    CHECK_START{Check result patternID}
    COMMON_INFO["Get common info bean via super.getCommonInfoBean()"]
    EXEC_CALL["execute(commoninfoBean, FUNC_CD_2 = \"2\")"]
    SET_NEXT_NAME["commoninfoBean.sendMessageString(NEXT_SCREEN_NAME = \"遷移先画面名\", DATABEAN_SET_VALUE, SCREEN_NAME_FUW02202 = \"メールウイルスチェックサービス申込確認\")"]
    SET_NEXT_ID["commoninfoBean.sendMessageString(NEXT_SCREEN_ID = \"遷移先画面ID\", DATABEAN_SET_VALUE, SCREEN_ID_FUW02202 = \"FUW02202\")"]
    RETURN_TRUE["return true"]

    START --> CHECK_START
    CHECK_START --> COMMON_INFO
    COMMON_INFO --> EXEC_CALL
    EXEC_CALL --> SET_NEXT_NAME
    SET_NEXT_NAME --> SET_NEXT_ID
    SET_NEXT_ID --> RETURN_TRUE
    RETURN_TRUE --> END_NODE(["Normal End"])
```

**Constant Resolution:**

| Constant | Value | Business Meaning |
|----------|-------|------------------|
| `JPCModelConstant.FUNC_CD_2` | `"2"` | Function code for confirmation-mode processing (distinguishes confirmation from entry/create operations) |
| `CommonInfoCFConst.NEXT_SCREEN_NAME` | `"遷移先画面名"` | Message key for "next screen name" — sets the human-readable label of the destination screen |
| `CommonInfoCFConst.NEXT_SCREEN_ID` | `"遷移先画面ID"` | Message key for "next screen ID" — sets the technical identifier of the destination screen |
| `X31CWebConst.DATABEAN_SET_VALUE` | `"set value"` | Framework constant indicating the value to store in the shared data bean |
| `JFUScreenConst.SCREEN_NAME_FUW02202` | `"メールウイルスチェックサービス申込確認"` | Display name of the confirmation screen (Mail Virus Check Service Application Confirmation) |
| `JFUScreenConst.SCREEN_ID_FUW02202` | `"FUW02202"` | Screen ID of the next confirmation screen |

**Processing Flow:**

1. **Retrieve shared form bean** — Call `super.getCommonInfoBean()` to obtain the `X31SDataBeanAccess` instance that carries common session information (user credentials, authorization status, and cross-screen message data) across the current request lifecycle.

2. **Execute common processing** — Call `execute(commoninfoBean, JPCModelConstant.FUNC_CD_2)` with function code `"2"` (confirmation mode). This inherited method performs authorization checks, session validation, and populates the common info bean with standard data needed for screen navigation. The function code parameter distinguishes this as a confirmation operation versus a create/entry operation.

3. **Set next screen name** — Write a message into the shared bean using the key `NEXT_SCREEN_NAME` ("遷移先画面名"). The value is `SCREEN_NAME_FUW02202` ("メールウイルスチェックサービス申込確認"), which is the human-readable label shown to the user on the next screen.

4. **Set next screen ID** — Write a message into the shared bean using the key `NEXT_SCREEN_ID` ("遷移先画面ID"). The value is `SCREEN_ID_FUW02202` ("FUW02202"), which the web framework uses to route to the correct JSP/screen handler for the confirmation view.

5. **Return success** — Return `true` to signal normal completion. The X31 web framework interprets this as a successful processing result and proceeds to render the screen specified in the navigation messages.

**No error branch exists in this method.** The method unconditionally returns `true` after setting navigation targets. Exception handling is delegated to the X31 framework's outer try-catch — if `execute()` or `sendMessageString()` throws an `Exception`, it propagates uncaught and is handled by the framework's global exception handler.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | *(none)* | - | This method takes no parameters. All input data is read from the shared session/form bean via `getCommonInfoBean()`. |

**Instance fields and external state accessed:**

| Source | Access Type | Business Description |
|--------|-------------|---------------------|
| `super.getCommonInfoBean()` | Read | Retrieves the shared `X31SDataBeanAccess` bean containing common session data (user ID, authorization info, screen navigation messages) inherited from `JCCWebBusinessLogic`. |
| `this` (implicit) | Read | Used as context in `JFUWebCommon.getScreenId(this)` — the current screen context is used to resolve the screen ID for the next screen destination. |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `super.getCommonInfoBean()` | `JCCWebBusinessLogic` | - | Retrieves the shared session/form data bean from the X31 framework. Reads current session state (user ID, authorization, screen info). |
| R | `execute(X31SDataBeanAccess, String)` | `FUW02201SFLogic` | - | Calls inherited common processing with function code `"2"`. Performs authorization checks and populates common info data. No direct DB access — delegates to framework layer. |
| W | `X31SDataBeanAccess.sendMessageString(String, String, String)` | `X31SDataBeanAccess` | - | Writes navigation message data into the shared bean. Sets the next screen name and next screen ID for the framework to use during rendering. |

**CRUD Classification Rationale:**

- **`getCommonInfoBean()` → Read**: Retrieves existing session data from the X31 framework's bean store. No new data is created; existing state is simply exposed to this method.

- **`execute()` → Read**: The `execute` method with `FUNC_CD_2` performs authorization and common processing. This is a read-phase operation — it validates credentials, checks permissions, and populates common info. It does not create, update, or delete records in the database.

- **`sendMessageString()` → Write**: This method writes data into the shared bean. While not a traditional database write, it mutates the in-memory shared state (the data bean) with navigation instructions. The next screen will read these values to determine which view to render.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen: FUW02201 (implicit) | `FUW02201SFLogic.cfm()` | `sendMessageString [W] X31SDataBeanAccess shared bean` |

**Caller analysis:**
- No direct Java callers were found for `FUW02201SFLogic.cfm()` outside its own module. This method is invoked through the **X31 web framework's action dispatch mechanism** — the screen configuration maps the confirmation button on screen `FUW02201` to this method.
- `FUW02201SFChecker` implements `X31SGuiCheckBase` and is the GUI validation class for this screen. Its `checkMethod()` returns `true` unconditionally, meaning no pre-validation gate exists before `cfm()` is called.
- The terminal endpoints from this method are the `sendMessageString` calls that write navigation data into the shared bean. The next screen (`FUW02202`) reads these values to render the confirmation view.

## 6. Per-Branch Detail Blocks

### Block 1 — GET (Retrieve Common Info Bean) (L346)

> Obtain the shared form bean for cross-screen data communication. This bean carries user session data, authorization info, and screen navigation messages throughout the request lifecycle.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `X31SDataBeanAccess commoninfoBean = super.getCommonInfoBean();` // Retrieve shared session form bean from parent class [-> X31SDataBeanAccess instance] |

### Block 2 — EXEC (Execute Common Processing) (L349)

> Invoke the inherited `execute()` method with function code `"2"` (confirmation mode). This performs authorization checks, session validation, and populates common info required for screen navigation. The function code distinguishes this as a confirmation operation.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `execute(commoninfoBean, JPCModelConstant.FUNC_CD_2);` // Call common processing with FUNC_CD_2="2" (confirmation mode) [-> JPCModelConstant.FUNC_CD_2 = "2"] |

### Block 3 — EXEC (Set Next Screen Name) (L351-L352)

> Write the next screen's display name into the shared bean. The value "メールウイルスチェックサービス申込確認" (Mail Virus Check Service Application Confirmation) is the human-readable title shown on the destination screen.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, JFUScreenConst.SCREEN_NAME_FUW02202);` // Set next screen name to "メールウイルスチェックサービス申込確認" [-> CommonInfoCFConst.NEXT_SCREEN_NAME = "遷移先画面名", JFUScreenConst.SCREEN_NAME_FUW02202 = "メールウイルスチェックサービス申込確認"] |

### Block 4 — EXEC (Set Next Screen ID) (L354-L355)

> Write the next screen's technical ID into the shared bean. The value "FUW02202" tells the framework which screen handler to invoke next.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, JFUScreenConst.SCREEN_ID_FUW02202);` // Set next screen ID to "FUW02202" [-> CommonInfoCFConst.NEXT_SCREEN_ID = "遷移先画面ID", JFUScreenConst.SCREEN_ID_FUW02202 = "FUW02202"] |

### Block 5 — RETURN (Return Success) (L357)

> Return `true` to signal normal completion. The X31 framework will render the screen specified by the navigation messages set in Blocks 3 and 4.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true;` // Return success (true = normal end) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `MAIL VIRUS CHECK SERVICE` | Business term | An email security service that scans incoming/outgoing mail for viruses. This module handles customer subscription to the service. |
| `申込画面 (Oshikomi GamEN)` | Field | Application screen — the web form where customers enter their details to subscribe to a service. |
| `確認ボタン (Kakunin BotAN)` | Field | Confirmation button — the UI button the user clicks to submit the application form for review before final submission. |
| `確認 (Kakunin)` | Field | Confirmation — the screen state where submitted data is displayed for review before final commitment. |
| `遷移先画面 (Iten-saki gamEN)` | Field | Next screen / destination screen — the screen to navigate to after processing completes. |
| `FUNC_CD_2` | Constant | Function code `"2"` — distinguishes confirmation-mode processing from entry/create operations within the common `execute()` method. |
| `NEXT_SCREEN_NAME` | Constant | Message key `"遷移先画面名"` — used as the key to store the display name of the next screen in the shared bean. |
| `NEXT_SCREEN_ID` | Constant | Message key `"遷移先画面ID"` — used as the key to store the technical ID of the next screen in the shared bean. |
| `DATABEAN_SET_VALUE` | Constant | Framework constant indicating the operation type for writing values into the shared data bean. |
| `SCREEN_NAME_FUW02202` | Constant | Display name `"メールウイルスチェックサービス申込確認"` — the human-readable label for screen FUW02202. |
| `SCREEN_ID_FUW02202` | Constant | Technical screen ID `"FUW02202"` — the unique identifier of the confirmation screen. |
| `X31SDataBeanAccess` | Framework | The X31 framework's shared data bean — a session-scoped object that carries data (messages, user info, navigation targets) across the request lifecycle and between screens. |
| `JCCWebBusinessLogic` | Framework | The base class for web UI business logic — provides common methods like `getCommonInfoBean()` and `execute()` that all screen-specific logic classes extend. |
| `X31SGuiCheckBase` | Framework | The X31 framework interface for GUI validation — `FUW02201SFChecker` implements this to provide pre-processing validation before `cfm()` is called. |
| `cfm()` | Method | Abbreviation of "confirm" — the X31 framework naming convention for the confirmation button handler method. |
| `FUW02201SF` | Module | "Front" (SF = Screen Front) module for the mail virus check service application flow — handles the application entry and confirmation screens. |
| `FUW02202` | Module | The confirmation review screen — displays submitted data for customer review before final submission of the mail virus check service application. |
| `X31 Framework` | Framework | Fujitsu's proprietary web application framework used across K-Opticom systems. Provides screen navigation, session management, GUI validation, and data bean abstractions. |
