# Business Logic — FUW00954SFBean.listKoumokuIds() [17 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00954SF.FUW00954SFBean` |
| Layer | Web / View Bean (Framework: Fujitsu Futurity X33) |
| Module | `FUW00954SF` (Package: `eo.web.webview.FUW00954SF`) |

## 1. Role

### FUW00954SFBean.listKoumokuIds()

This method is a **view-level property key enumeration utility** that serves as the UI framework's gateway for discovering what form fields (項目名 / "item names") are available on the FUW00954SF screen. It is called by the Futurity X33 view framework during screen initialization and dynamic binding to determine which editable fields to render or validate.

The method implements a **conditional dispatch pattern** with three branches: (1) if the `key` parameter is null, it returns a list containing the single display label "確認の種類" (Confirmation Type), which represents the confirmation-type selector field on the screen; (2) if the key is a child-path reference starting with "/" and longer than 2 characters, it delegates to the parent class `X33VViewBaseBean.listKoumokuIds()` to resolve inherited field metadata; (3) for any other key value, it returns an empty list, effectively signaling that no matching field exists.

This method plays a central role in the **screen binding layer** — it does not perform any business logic, database access, or service calls beyond the delegation to the framework's base bean. Its purpose is purely to answer the framework's query "what fields exist under this key" so the UI engine can render the correct form controls.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["Start: listKoumokuIds(key)"])
    CHECK_NULL{"key == null?"}
    BRANCH_NULL(["Create List with item: 確認の種類<br/>(Confirmation Type)"])
    BRANCH_NULL_RETURN(["Return List"])
    CHECK_PATH{"key starts with /<br/>AND key.length() > 2?"}
    CALL_SUPER(["super.listKoumokuIds(key)"])
    BRANCH_DEFAULT(["Return new empty ArrayList"])
    END_NODE(["Return / End"])

    START --> CHECK_NULL
    CHECK_NULL -->|True| BRANCH_NULL
    BRANCH_NULL --> BRANCH_NULL_RETURN
    BRANCH_NULL_RETURN --> END_NODE
    CHECK_NULL -->|False| CHECK_PATH
    CHECK_PATH -->|True| CALL_SUPER
    CALL_SUPER --> END_NODE
    CHECK_PATH -->|False| BRANCH_DEFAULT
    BRANCH_DEFAULT --> END_NODE
```

**Branch Summary:**

- **Branch 1 (L258–L263):** When `key` is null — returns the full set of item names for the service form, which currently contains one entry: the confirmation type field ("確認の種類").
- **Branch 2 (L266–L267):** When `key` is a child-path reference (starts with "/" and length > 2) — delegates to the parent class `X33VViewBaseBean.listKoumokuIds()` to resolve the metadata for that specific child field path.
- **Branch 3 (L270):** Default — for any unrecognized key, returns an empty list, meaning no fields match the requested key.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The field identifier used to query which form items are available. When `null`, the method returns all item names for the current service form. When it starts with "/" and has more than 2 characters, it refers to a nested child field path resolved by the parent framework class. Any other value is treated as unrecognized, and an empty list is returned. |

**Instance fields / external state read by this method:**
- `super.listKoumokuIds(key)` — delegates to `X33VViewBaseBean.listKoumokuIds()`, which reads the base bean's field metadata registry (configured by the Futurity X33 Web Client tool based on the screen definition).

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `FUW00954SFBean.listKoumokuIds` | FUW00954SFBean | - | Calls `listKoumokuIds` in `FUW00954SFBean` |

### Internal method calls analysis:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `X33VViewBaseBean.listKoumokuIds` | X33 Framework | - | Reads field metadata from the framework's base bean registry for child field resolution |

**Classification:** This method performs only **Read (R)** operations. There are no Create, Update, or Delete operations. It does not interact with any database tables or CBS (Common Business Service) components. The only external call is to the parent class framework method, which resolves view field metadata from the X33 framework's internal configuration.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | FUW00954SFBean | `FUW00954SFBean.listKoumokuIds` | `super.listKoumokuIds [R] X33VViewBaseBean` |

**Notes:**
- The pre-extracted call graph shows `FUW00954SFBean.listKoumokuIds()` as both the method itself and its direct caller, which indicates the method may be called recursively by the framework or invoked from within the same bean's other methods.
- The method is primarily called by the **Futurity X33 view framework** during screen property resolution, not by explicit business logic callers. It is part of the standard bean lifecycle methods (`listKoumokuIds`, `getTypeInfo`, etc.) that the X33 framework auto-invokes.

## 6. Per-Branch Detail Blocks

### Block 1 — IF `(key == null)` (L258)

> When `key` is null, the method returns the full list of item names for the service form. Currently, this list contains a single entry representing the confirmation-type field on the screen ("確認の種類" — "Confirmation Type").

| # | Type | Code |
|---|------|------|
| 1 | SET | `koumokuList = new ArrayList<String>()` // Create a new ArrayList for item names |
| 2 | SET | `koumokuList.add("確認の種類")` // Add the confirmation type field label [-> "確認の種類" = "Confirmation Type"] |
| 3 | RETURN | `return koumokuList;` // Return the list containing the single item |

---

### Block 2 — ELSE-IF `(key.indexOf("/") == 0 && key.length() > 2)` (L266)

> When `key` is a child-path reference (starts with "/" and has length greater than 2), delegate to the parent class to resolve the metadata for that specific field path. This handles nested or scoped field queries within the X33 framework's property model.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return super.listKoumokuIds(key);` // Delegate to X33VViewBaseBean for child field resolution [-> reads framework metadata] |

---

### Block 3 — ELSE (default) (L270)

> For any key that does not match the null condition or the child-path pattern, return an empty list. This signals to the framework that no fields match the requested key.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return new ArrayList<String>();` // Return an empty list — no matching fields for this key |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `key` | Parameter | Field identifier — used by the X33 view framework to look up available form fields (項目名) for screen rendering |
| `koumokuList` | Variable | Item name list — an ArrayList of String field labels to be presented to the UI |
| `kakunin_shurui` | Field | Confirmation type — the field label "確認の種類" refers to a field that determines what type of confirmation is displayed on the screen |
| `X33VViewBaseBean` | Class | Base bean class from the Futurity X33 framework — provides default implementations for screen field metadata queries |
| `X33VListedBeanInterface` | Interface | X33 framework interface indicating this bean supports listed/iterative data rendering |
| `X31CBaseBean` | Interface | X33 framework base bean interface — provides common web bean functionality |
| Futurity X33 | Framework | Fujitsu's enterprise web application framework (X33) — a view-level MVC framework used for building JavaServer Faces (JSF) applications |
| 項目名 (koumokumei) | Domain term | Item name / field name — the label or identifier of a form field on the screen |
| 確認の種類 (kakunin_shurui) | Domain term | Confirmation type — a screen field that specifies the type of confirmation displayed to the user |
