# Business Logic — JKKAdchgCancelHakkoSODCC.opSetOdrCtrl() [1890 LOC]

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

## 1. Role

### JKKAdchgCancelHakkoSODCC.opSetOdrCtrl()

This method is the **core order control dispatcher** for the `JKKAdchgCancelHakkoSODCC` class. It handles Service Order Data (SOD) issuance during change/cancellation scenarios in the Fujitsu eo Light telecommunications service platform. It determines which **order content code** (e.g., "Mail Registration", "Fixed IP Address Registration", "IPv6 Registration") should be emitted as an SOD based on the **before-and-after state** of a customer's optional service contract.

The method implements a **dispatch/routing pattern**: it first extracts and sanitizes SOD maps (basic info, service contract info, service detail info, optional service info, device provision info), then retrieves both the **before-change** and **after-change** optional service agreement and consent data via service calls (EKK0351A010SC, EKK0361A010SC, EKK0401A010SC, EKK0411A010SC). It classifies the optional service type (e.g., NET for eo Light Internet, TEL for eo Light Phone) and computes four state-transition booleans: whether the optional service is **newly registered** (`isNewOpsvkei`), **cancelled** (`isDslOpsvkei`), being **restored** (`isKaihkOpsvkei`), or **unchanged but modified** (`isChgOpsvkei`).

Based on the optional service code (`opSvcCd`), the method routes through **15 distinct service branches** (Email, Homepage/HP, Mailing List, Fixed IP Address, Multisection, Dial-up, Fm Cell, Assigned Phone, Call Forwarding, Caller ID Display, Harassment Phone Rejection, Number Selection Rejection, International Call Suspension, IPv6, and 050 Number Porting). Each branch determines whether to issue a registration, unregistration, change, or cancellation SOD based on the state transition.

The method serves as a **shared utility** called by many screen-level CBS classes (e.g., `JKKHakkoSODCC`, `JKKAdchgHakkoSODCC`) that handle SOD issuance workflows across multiple screens. It is the central orchestration point where optional service state changes are translated into concrete SOD order content codes, which are then persisted via the `addSOD` method.
