# Business Logic — KKW02516SF01DBean.getJsflist_op_svc_kei_no() [9 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA16801SF.KKW02516SF01DBean` |
| Layer | View (Data Transfer / Presentation Bean) |
| Module | `KKA16801SF` (Package: `eo.web.webview.KKA16801SF`) |

## 1. Role

### KKW02516SF01DBean.getJsflist_op_svc_kei_no()

This method is a **presentation-layer data transformer** that converts an internal list of optional service contract line items (`op_svc_kei_no_list`) — stored as an X33V `X33VDataTypeList` of `X33VDataTypeStringBean` — into a JSF-friendly `ArrayList<SelectItem>` suitable for rendering as a dropdown or selection list on the web UI. It operates as part of the K-Opticom telecom service provisioning system (module `KKA16801SF`), where service details (`op_svc_kei_no`) represent individual service contract lines associated with a customer order. The method follows a simple **mapping/dispatch pattern**: it iterates over the raw bean list, extracts each string value, and wraps it into a JSF `SelectItem` with a zero-based index as its value and the original string as its label. This enables the JSF `h:selectOneMenu` or similar components to bind to the returned list directly. It is a shared utility method used across **50+ screen beans** throughout the K-Opticom web application (both koptWebA and koptWebB tiers), making it a common pattern for presenting service detail number selections to end users on any screen that deals with service contracts or orders.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getJsflist_op_svc_kei_no()"])
    INIT["Initialize: ArrayList<SelectItem> ary = new ArrayList()"]
    LOOP_START["Loop: for i = 0; i < op_svc_kei_no_list.size()"]
    CAST["Cast: (X33VDataTypeStringBean) op_svc_kei_no_list.get(i)"]
    GET_VALUE["Extract: String itemValue = cast.getValue()"]
    CREATE_ITEM["Create: SelectItem item = new SelectItem(index.toString(), itemValue)"]
    ADD_ITEM["Add: ary.add(item)"]
    LOOP_END["i++"]
    RETURN["Return ary"]
    END_NODE(["Return / Next"])

    START --> INIT
    INIT --> LOOP_START
    LOOP_START --> CAST
    CAST --> GET_VALUE
    GET_VALUE --> CREATE_ITEM
    CREATE_ITEM --> ADD_ITEM
    ADD_ITEM --> LOOP_END
    LOOP_END --> LOOP_START
    LOOP_START -- "size() reached" --> RETURN
    RETURN --> END_NODE
```

**Processing description:**

The method executes a single linear transformation with no conditional branches or external calls:

1. **Initialization**: Creates an empty `ArrayList<SelectItem>` to accumulate the result.
2. **Iteration**: Iterates over the `op_svc_kei_no_list` field (an `X33VDataTypeList`) using a simple index-based for-loop from `0` to `size()-1`.
3. **Type casting**: Each element at index `i` is cast from the generic list value to `X33VDataTypeStringBean`, which is the X33 framework's string data type holder.
4. **Value extraction**: Calls `.getValue()` on the cast bean to retrieve the underlying `String` value — this is the actual service detail number text displayed to the user.
5. **SelectItem construction**: Creates a JSF `SelectItem` where the *value* is the zero-based index (as a String) and the *label* is the extracted service number string. The index-as-value design allows the JSF binding to identify which row was selected by position rather than by the service number string itself.
6. **Accumulation**: Each `SelectItem` is added to the result list.
7. **Return**: The completed list is returned to the caller.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It reads the instance field `op_svc_kei_no_list` directly. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `op_svc_kei_no_list` | `X33VDataTypeList` | List of optional service contract line items — each element is an `X33VDataTypeStringBean` wrapping a string representing an optional service detail number. This field is populated by the screen's data-loading logic before the UI renders the selection dropdown. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `op_svc_kei_no_list.size()` | - | - | Reads the size of the internal service detail number list held in the view bean. |
| R | `op_svc_kei_no_list.get(i)` | - | - | Reads the i-th element (cast to `X33VDataTypeStringBean`) from the service detail number list. |
| R | `X33VDataTypeStringBean.getValue()` | - | - | Extracts the underlying String value from the string-type data holder. |

**Analysis:** This method performs **zero database or service-component operations**. It is a pure in-memory data transformer — it reads from an already-populated view bean list and restructures the data for JSF rendering. There are no SC codes, CBS calls, or entity/table interactions. The data was previously loaded by the screen's initialization logic (e.g., a CBS or SC call that queried the service detail numbers from the database and set them into `op_svc_kei_no_list`).

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen: Various (KKA16801SF) | `KKA16801SFLogic` / `KKW02516SFBean` -> `KKW02516SF01DBean.getJsflist_op_svc_kei_no()` | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 2 | Screen: KKA16401SF (KKW03204SF01DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 3 | Screen: KKA16601SF (KKW00128SF01DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 4 | Screen: KKA17101SF (KKW00828SF05DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 5 | Screen: KKA17001SF (KKW02501SF01DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 6 | Screen: KKA16201SF (KKW02519SF02DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 7 | Screen: KKA14701SF (KKW02407SF01DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 8 | Screen: KKA14201SF (KKW02504SF02DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 9 | Screen: KKA14901SF (KKW02404SF01DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |
| 10 | Screen: KKA14401SF (KKW02510SF01DBean) | Same bean method, different module | `getJsflist_op_svc_kei_no` [R] `op_svc_kei_no_list` (in-memory) |

**Note:** The method `getJsflist_op_svc_kei_no()` is defined identically in **50+ bean classes** across the K-Opticom web application (koptWebA and koptWebB modules). It is a ubiquitous UI helper used on screens that display optional service detail number selections. No callers were found specific to `KKA16801SF`'s instance in the search results, indicating it is called directly from JSF backing bean bindings (e.g., `<h:selectOneMenu value="#{bean.selectedValue}" items="#{bean.jsflist_op_svc_kei_no}" />`), which explains the absence of explicit Java-level callers.

## 6. Per-Branch Detail Blocks

### Block 1 — INIT (L207)

Initialize the result list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ary = new ArrayList<SelectItem>()` // Create empty result list for JSF select items [-> ArrayList] |

### Block 2 — FOR LOOP (L208)

Iterate over each element in `op_svc_kei_no_list` and convert to a `SelectItem`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0` // Loop counter initialized to 0 [-> 0] |
| 2 | COND | `i < op_svc_kei_no_list.size()` // Loop continues while index is within bounds [-> op_svc_kei_no_list.size()] |
| 3 | CAST | `(X33VDataTypeStringBean) op_svc_kei_no_list.get(i)` // Cast generic list element to typed bean [-> X33VDataTypeStringBean] |
| 4 | CALL | `op_svc_kei_no_list.get(i).getValue()` // Extract the String value from the data bean [-> String] |
| 5 | SET | `itemValue = (String) cast.getValue()` // Store the extracted string as the SelectItem label [-> String] |
| 6 | SET | `item = new SelectItem(new Integer(i).toString(), itemValue)` // Create JSF SelectItem with index as value, string as label [-> SelectItem] |
| 7 | CALL | `ary.add(item)` // Add constructed SelectItem to the result list [-> ArrayList] |

### Block 3 — RETURN (L213)

Return the fully constructed list of select items to the caller.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return ary` // Return ArrayList<SelectItem> for JSF dropdown binding [-> ArrayList<SelectItem>] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `op_svc_kei_no` | Field | Optional Service Detail Number — the number identifying a specific optional service line item (e.g., an add-on service) attached to a customer's main service contract. "op" = optional, "svc_kei" = service detail. |
| `op_svc_kei_no_list` | Field | List of optional service detail numbers — an X33V framework `X33VDataTypeList` containing `X33VDataTypeStringBean` elements, each holding one optional service line item number. |
| SelectItem | Class | JSF `javax.faces.model.SelectItem` — the standard JSF component class representing a single option in a dropdown/select menu. The constructor takes `(value, label)` where value is posted back and label is displayed. |
| `X33VDataTypeList` | Class | Fujitsu X33 framework generic list type for holding structured data elements in a view bean. Used as the backing list for indexed data entry screens. |
| `X33VDataTypeStringBean` | Class | Fujitsu X33 framework string-typed data holder. Wraps a Java String with metadata for the X33 validation and data-binding system. |
| JSF | Acronym | JavaServer Faces — the Java EE web component framework used to build the K-Opticom web UI. |
| KKA16801SF | Module | Screen module identifier in the K-Opticom system. SF = Screen Function. This module handles a specific service provisioning screen. |
| koptWebA / koptWebB | Module | Two tiers of the K-Opticom web application. WebA was migrated from WebB per the change history (ANK-2694-00-00, WO7). |
| X33 | Framework | Fujitsu Futurity X33 — the proprietary web application framework used across K-Opticom for view bean management, data binding, and validation. |
