# Business Logic — JKKUseFailMapperCC.getContents() [79 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKUseFailMapperCC` |
| Layer | CC/Common Component (Package: `com.fujitsu.futurity.bp.custom.common`) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKUseFailMapperCC.getContents()

This method serves as the central routing/dispatch hub for retrieving field definition arrays across all Service/Interface (S/IF) templates in the KKK (telecom order fulfillment) system. It implements a **template-based dispatch pattern**: given a `templateId` (a service IF identifier), the method instantiates a dedicated `CBSMsg` or `CBSMsg1List` helper class specific to that template and delegates to its `getContents()` method to obtain an `Object[][]` array describing the row/column structure (field metadata) for the corresponding S/IF. The method handles **17 distinct template IDs**, organized into CBS and CBSMsg1List variants, with ANK-ticket-marked extensions for ANK-1306-00-00 (added 2013/01/24) and ANK-1421-00-00 (added 2013/02/07).

It plays the role of a **shared utility** consumed via reflection by parameter-handling classes (`JSCTelSvcScParamHenshu`, `JCNDslScParamHenshu`, `JCKPmpScParamHenshu`) and directly by numerous mapping entry methods (e.g., `mappingEKK0341A010SCInMsg`, `mappingEKK0961A010SCInMsg`). The returned `Object[][]` structure defines which fields the S/IF carries, enabling downstream code to dynamically configure form layouts, validate incoming parameters, and map data between screens and service components. When no matching template ID is found, it returns `null`, signaling the caller to handle the absence gracefully.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getContents(templateId)"])
    START --> CHECK["Check templateId"]
    CHECK -->|EKK0011B020| BR1["new EKK0011B020CBSMsg().getContents()"]
    CHECK -->|EKK0011B020CBSMsg1List| BR2["new EKK0011B020CBSMsg1List().getContents()"]
    CHECK -->|EKK0011C060| BR3["new EKK0011C060CBSMsg().getContents()"]
    CHECK -->|EKK0011C060CBSMsg1List| BR4["new EKK0011C060CBSMsg1List().getContents()"]
    CHECK -->|EKK0011D020| BR5["new EKK0011D020CBSMsg().getContents()"]
    CHECK -->|EKK0011D020CBSMsg1List| BR6["new EKK0011D020CBSMsg1List().getContents()"]
    CHECK -->|EKK0021C060| BR7["new EKK0021C060CBSMsg().getContents()"]
    CHECK -->|EKK0021C070| BR8["new EKK0021C070CBSMsg().getContents()"]
    CHECK -->|EKK0251C050| BR9["new EKK0251C050CBSMsg().getContents()"]
    CHECK -->|EKK0251C050CBSMsg1List| BR10["new EKK0251C050CBSMsg1List().getContents()"]
    CHECK -->|EKU0011A010| BR11["new EKU0011A010CBSMsg().getContents()"]
    CHECK -->|EKU0011A010CBSMsg1List| BR12["new EKU0011A010CBSMsg1List().getContents()"]
    CHECK -->|EKK1021B003 ANK-1306-00-00| BR13["new EKK1021B003CBSMsg().getContents()"]
    CHECK -->|EKK1021B003CBSMsg1List| BR14["new EKK1021B003CBSMsg1List().getContents()"]
    CHECK -->|EKK1021C010 ANK-1306-00-00| BR15["new EKK1021C010CBSMsg().getContents()"]
    CHECK -->|EKK0771A010 ANK-1421-00-00| BR16["new EKK0771A010CBSMsg().getContents()"]
    CHECK -->|EKK0771A010CBSMsg1List| BR17["new EKK0771A010CBSMsg1List().getContents()"]
    CHECK -->|No match| BR18["contents = null"]
    BR1 --> RETURN["return contents"]
    BR2 --> RETURN
    BR3 --> RETURN
    BR4 --> RETURN
    BR5 --> RETURN
    BR6 --> RETURN
    BR7 --> RETURN
    BR8 --> RETURN
    BR9 --> RETURN
    BR10 --> RETURN
    BR11 --> RETURN
    BR12 --> RETURN
    BR13 --> RETURN
    BR14 --> RETURN
    BR15 --> RETURN
    BR16 --> RETURN
    BR17 --> RETURN
    BR18 --> RETURN
    RETURN --> END(["Return"])
```

**CRITICAL -- Constant Resolution:**

No external constant references are used in this method. All template IDs are string literals compared directly against the `templateId` parameter.

- `"EKK0011B020"` -- Template for EKK0011B020 CBS (Service/IF)
- `"EKK0011B020CBSMsg1List"` -- List variant for EKK0011B020
- `"EKK0011C060"` -- Template for EKK0011C060 CBS
- `"EKK0011C060CBSMsg1List"` -- List variant for EKK0011C060
- `"EKK0011D020"` -- Template for EKK0011D020 CBS
- `"EKK0011D020CBSMsg1List"` -- List variant for EKK0011D020
- `"EKK0021C060"` -- Template for EKK0021C060 CBS
- `"EKK0021C070"` -- Template for EKK0021C070 CBS
- `"EKK0251C050"` -- Template for EKK0251C050 CBS
- `"EKK0251C050CBSMsg1List"` -- List variant for EKK0251C050
- `"EKU0011A010"` -- Template for EKU0011A010 CBS
- `"EKU0011A010CBSMsg1List"` -- List variant for EKU0011A010
- `"EKK1021B003"` -- Template for EKK1021B003 CBS (added: ANK-1306-00-00, 2013/01/24)
- `"EKK1021B003CBSMsg1List"` -- List variant for EKK1021B003
- `"EKK1021C010"` -- Template for EKK1021C010 CBS (added: ANK-1306-00-00, 2013/01/24)
- `"EKK0771A010"` -- Template for EKK0771A010 CBS (added: ANK-1421-00-00, 2013/02/07)
- `"EKK0771A010CBSMsg1List"` -- List variant for EKK0771A010

**Processing Pattern:**

1. Initialize `contents` to `null` (default fallback).
2. Evaluate a long chain of `if-else if` conditions, each comparing `templateId` against a specific string literal.
3. For each match, instantiate a dedicated message class (e.g., `EKK0011B020CBSMsg`) and call its `getContents()` method, assigning the returned `Object[][]` to `contents`.
4. If no condition matches, `contents` remains `null`.
5. Return `contents`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `templateId` | `String` | The Service/IF identifier that determines which field definition array to retrieve. It acts as a dispatch key that selects one of 17 template-specific CBSMsg classes. Values follow the pattern `[A-Z]{2,3}\d{4}[A-Z]\d{3}` (e.g., `EKK0011B020`, `EKU0011A010`) where the prefix indicates the service family (EKK = KKK, EKU = UKY) and the suffix differentiates CBS variants. The method branches strictly on this value. |

**No instance fields or external state** are read by this method. It is fully stateless -- the only inputs are the `templateId` parameter, and the output is determined purely by which template matches.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getContents` | Various CBSMsg classes | - | Delegates to `CBSMsg.getContents()` for field metadata retrieval |

**Detailed breakdown:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `EKK0011B020CBSMsg.getContents()` | EKK0011B020 | - | Retrieves field definition array for EKK0011B020 service template |
| R | `EKK0011B020CBSMsg1List.getContents()` | EKK0011B020 | - | Retrieves field definition array for EKK0011B020 list variant |
| R | `EKK0011C060CBSMsg.getContents()` | EKK0011C060 | - | Retrieves field definition array for EKK0011C060 service template |
| R | `EKK0011C060CBSMsg1List.getContents()` | EKK0011C060 | - | Retrieves field definition array for EKK0011C060 list variant |
| R | `EKK0011D020CBSMsg.getContents()` | EKK0011D020 | - | Retrieves field definition array for EKK0011D020 service template |
| R | `EKK0011D020CBSMsg1List.getContents()` | EKK0011D020 | - | Retrieves field definition array for EKK0011D020 list variant |
| R | `EKK0021C060CBSMsg.getContents()` | EKK0021C060 | - | Retrieves field definition array for EKK0021C060 service template |
| R | `EKK0021C070CBSMsg.getContents()` | EKK0021C070 | - | Retrieves field definition array for EKK0021C070 service template |
| R | `EKK0251C050CBSMsg.getContents()` | EKK0251C050 | - | Retrieves field definition array for EKK0251C050 service template |
| R | `EKK0251C050CBSMsg1List.getContents()` | EKK0251C050 | - | Retrieves field definition array for EKK0251C050 list variant |
| R | `EKU0011A010CBSMsg.getContents()` | EKU0011A010 | - | Retrieves field definition array for EKU0011A010 service template |
| R | `EKU0011A010CBSMsg1List.getContents()` | EKU0011A010 | - | Retrieves field definition array for EKU0011A010 list variant |
| R | `EKK1021B003CBSMsg.getContents()` | EKK1021B003 | - | Retrieves field definition array for EKK1021B003 service template (ANK-1306) |
| R | `EKK1021B003CBSMsg1List.getContents()` | EKK1021B003 | - | Retrieves field definition array for EKK1021B003 list variant |
| R | `EKK1021C010CBSMsg.getContents()` | EKK1021C010 | - | Retrieves field definition array for EKK1021C010 service template (ANK-1306) |
| R | `EKK0771A010CBSMsg.getContents()` | EKK0771A010 | - | Retrieves field definition array for EKK0771A010 service template (ANK-1421) |
| R | `EKK0771A010CBSMsg1List.getContents()` | EKK0771A010 | - | Retrieves field definition array for EKK0771A010 list variant |

**Classification rationale:** All calls are **Read (R)** operations. Each `CBSMsg.getContents()` method returns metadata (an `Object[][]` array) describing which fields/labels the corresponding service interface carries. No data is created, updated, or deleted. This is a pure metadata lookup -- it returns field definitions for S/IF form rendering and parameter mapping.

## 5. Dependency Trace

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

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Reflection (getMethod) | `JSCTelSvcScParamHenshu.java:212` via `getMethod` | `getContents [R]` (17 times) |
| 2 | Reflection (getMethod) | `JSCTelSvcScParamHenshu.java:223` via `getMethod` | `getContents [R]` (17 times) |
| 3 | Reflection (getMethod) | `JCNDslScParamHenshu.java:349` via `getMethod` | `getContents [R]` (17 times) |
| 4 | Reflection (getMethod) | `JCNDslScParamHenshu.java:361` via `getMethod` | `getContents [R]` (17 times) |
| 5 | Reflection (getMethod) | `JCKPmpScParamHenshu.java:348` via `getMethod` | `getContents [R]` (17 times) |
| 6 | Direct call | `JKKUseFailMapperCC.editInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 7 | Direct call | `JKKUseFailMapperCC.editResultRP()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 8 | Direct call | `JKKUseFailMapperCC.mappinEKK1091D010SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 9 | Direct call | `JKKUseFailMapperCC.mappingEKK0081A010SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 10 | Direct call | `JKKUseFailMapperCC.mappingEKK0161A010SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 11 | Direct call | `JKKUseFailMapperCC.mappingEKK0161B004SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 12 | Direct call | `JKKUseFailMapperCC.mappingEKK0341A010SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 13 | Direct call | `JKKUseFailMapperCC.mappingEKK0341B008SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 14 | Direct call | `JKKUseFailMapperCC.mappingEKK0341B019SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |
| 15 | Direct call | `JKKUseFailMapperCC.mappingEKK0351A010SCInMsg()` | `getContents [R]` -> `CBSMsg.getContents [R]` |

_Detected 15 direct callers -- 5 via reflection/dynamic dispatch and 10+ via direct method calls within JKKUseFailMapperCC._

**Caller categories:**

- **Reflection-based callers (3 classes)**: `JSCTelSvcScParamHenshu`, `JCNDslScParamHenshu`, `JCKPmpScParamHenshu` dynamically invoke `getContents` via Java reflection (`getMethod`), enabling generic parameter-handling logic that works across all S/IF templates without hardcoding.
- **Direct callers (15+ mapping methods)**: Entry points such as `mappingEKK0341A010SCInMsg`, `mappingEKK0961A010SCInMsg`, and `editInMsgCmn` call `getContents` directly with a hardcoded template ID to obtain field definitions for their specific service interface.

## 6. Per-Branch Detail Blocks

**Block 1** — [INITIALIZATION] (L496)

Initializes the return variable with a `null` default, ensuring that if no template matches, the method safely returns `null` rather than an uninitialized reference.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = null;` // Initialize default return value |

**Block 2** — [IF] `("EKK0011B020".equals(templateId))` (L498)

Handles the EKK0011B020 CBS template. Creates the dedicated CBSMsg instance and delegates field metadata retrieval.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0011B020CBSMsg().getContents();` // EKK0011B020 CBS field definitions |

**Block 3** — [ELSE-IF] `("EKK0011B020CBSMsg1List".equals(templateId))` (L502)

Handles the EKK0011B020 CBS list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0011B020CBSMsg1List().getContents();` // EKK0011B020 list variant |

**Block 4** — [ELSE-IF] `("EKK0011C060".equals(templateId))` (L506)

Handles the EKK0011C060 CBS template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0011C060CBSMsg().getContents();` // EKK0011C060 CBS field definitions |

**Block 5** — [ELSE-IF] `("EKK0011C060CBSMsg1List".equals(templateId))` (L510)

Handles the EKK0011C060 CBS list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0011C060CBSMsg1List().getContents();` // EKK0011C060 list variant |

**Block 6** — [ELSE-IF] `("EKK0011D020".equals(templateId))` (L514)

Handles the EKK0011D020 CBS template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0011D020CBSMsg().getContents();` // EKK0011D020 CBS field definitions |

**Block 7** — [ELSE-IF] `("EKK0011D020CBSMsg1List".equals(templateId))` (L518)

Handles the EKK0011D020 CBS list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0011D020CBSMsg1List().getContents();` // EKK0011D020 list variant |

**Block 8** — [ELSE-IF] `("EKK0021C060".equals(templateId))` (L522)

Handles the EKK0021C060 CBS template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0021C060CBSMsg().getContents();` // EKK0021C060 CBS field definitions |

**Block 9** — [ELSE-IF] `("EKK0021C070".equals(templateId))` (L526)

Handles the EKK0021C070 CBS template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0021C070CBSMsg().getContents();` // EKK0021C070 CBS field definitions |

**Block 10** — [ELSE-IF] `("EKK0251C050".equals(templateId))` (L530)

Handles the EKK0251C050 CBS template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0251C050CBSMsg().getContents();` // EKK0251C050 CBS field definitions |

**Block 11** — [ELSE-IF] `("EKK0251C050CBSMsg1List".equals(templateId))` (L534)

Handles the EKK0251C050 CBS list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0251C050CBSMsg1List().getContents();` // EKK0251C050 list variant |

**Block 12** — [ELSE-IF] `("EKU0011A010".equals(templateId))` (L538)

Handles the EKU0011A010 CBS template (EKU family = UKY service).

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKU0011A010CBSMsg().getContents();` // EKU0011A010 CBS field definitions |

**Block 13** — [ELSE-IF] `("EKU0011A010CBSMsg1List".equals(templateId))` (L542)

Handles the EKU0011A010 CBS list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKU0011A010CBSMsg1List().getContents();` // EKU0011A010 list variant |

**Block 14** — [ELSE-IF] `("EKK1021B003".equals(templateId))` [ANK-1306-00-00 2013/01/24 ADD START] (L546)

Handles the EKK1021B003 CBS template. Added via ANK-1306-00-00 change request.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK1021B003CBSMsg().getContents();` // EKK1021B003 CBS (ANK-1306) |

**Block 14.1** — [ELSE-IF] `("EKK1021B003CBSMsg1List".equals(templateId))` [ANK-1306-00-00] (L550)

Handles the EKK1021B003 list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK1021B003CBSMsg1List().getContents();` // EKK1021B003 list (ANK-1306) |

**Block 14.2** — [ELSE-IF] `("EKK1021C010".equals(templateId))` [ANK-1306-00-00 ADD END] (L554)

Handles the EKK1021C010 CBS template. Part of ANK-1306-00-00 addition.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK1021C010CBSMsg().getContents();` // EKK1021C010 CBS (ANK-1306) |

**Block 15** — [ELSE-IF] `("EKK0771A010".equals(templateId))` [ANK-1421-00-00 2013/02/07 ADD START] (L557)

Handles the EKK0771A010 CBS template. Added via ANK-1421-00-00 change request.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0771A010CBSMsg().getContents();` // EKK0771A010 CBS (ANK-1421) |

**Block 15.1** — [ELSE-IF] `("EKK0771A010CBSMsg1List".equals(templateId))` [ANK-1421-00-00 ADD END] (L561)

Handles the EKK0771A010 list variant.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = new EKK0771A010CBSMsg1List().getContents();` // EKK0771A010 list (ANK-1421) |

**Block 16** — [ELSE / FALLTHROUGH] (L565)

No condition matches. `contents` remains `null` as initialized in Block 1. This represents the implicit "no match" branch -- if `templateId` does not match any of the 17 known templates, the method returns `null` to signal the caller.

| # | Type | Code |
|---|------|------|
| 1 | SET | `contents = null;` // (implicit -- already initialized in Block 1) |

**Block 17** — [RETURN] (L567)

Returns the populated (or `null`) `contents` array to the caller.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return contents;` // Returns Object[][] or null |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `templateId` | Parameter | Service IF identifier -- a unique code that identifies a specific service interface template. Used as a dispatch key to select the correct field metadata. |
| `EKK` | Prefix | KKK service family prefix in template IDs (e.g., EKK0011B020). Refers to a telecom service processing module. |
| `EKU` | Prefix | UKY service family prefix in template IDs (e.g., EKU0011A010). Refers to a different telecom service processing module. |
| CBS | Business term | CBSMsg class -- a message metadata holder that defines the field layout for a service interface. The "getContents()" method returns an Object[][] array describing rows and columns of field definitions. |
| CBSMsg1List | Template variant | List variant of CBSMsg -- a template variant handling list/multi-row data layouts as opposed to single-record CBSMsg templates. |
| S/IF | Business term | Service Interface -- the integration points between the order management system and external service providers. Each S/IF has its own field structure. |
| ANK-1306-00-00 | Change request | A change request ticket that added support for EKK1021B003 and EKK1021C010 templates (added 2013/01/24). |
| ANK-1421-00-00 | Change request | A change request ticket that added support for EKK0771A010 template (added 2013/02/07). |
| `Object[][]` | Return type | 2D array representing field metadata. Rows correspond to fields/columns in an S/IF; each row contains field definition information (e.g., field name, label, type, display order). |
| JSCTelSvcScParamHenshu | Class | Japanese: 電話サービス画面パラメータ変更 (Phone Service Screen Parameter Modification). A parameter-handling class that dynamically invokes `getContents()` via reflection. |
| JCNDslScParamHenshu | Class | Japanese: 回線 DSL 画面パラメータ変更 (Line DSL Screen Parameter Modification). A DSL service parameter-handling class using reflection-based dispatch. |
| JCKPmpScParamHenshu | Class | Japanese: 通信機器 画面パラメータ変更 (Communication Equipment Screen Parameter Modification). A communication equipment parameter-handling class using reflection-based dispatch. |
| SC | Abbreviation | Service Component / Service Call -- a service-level operation code (e.g., `EKK0341A010SC`) that represents a discrete business operation within the service component architecture. |
