"@TODO: verify security
"provisioning Cockpit friendship
class /HEC1/CL_BOPF_CONFIG_MODEL_FAC definition
  public
  abstract
  final
  create public

  global friends /HEC1/CL_APPL_CONTROLLER
                 /HEC1/CL_BOPF_CONFIG_MODEL
                 /HEC1/CL_CDD_UIBBFR_H_CONTACT
                 /HEC1/CL_CONFIG_COMP_CTR_ASSIS
                 /HEC1/CL_CONFIG_DATABASE
                 /HEC1/CL_CONFIG_MODEL
                 /HEC1/CL_CONFIG_SW_HELPER
                 /HEC1/CL_C_GUIBBF_CDD_REQUEST
                 /HEC1/CL_C_GUIBBL_H_CONT_REFS
                 /HEC1/CL_C_UIBBFR_H_CONTACT
                 /HEC1/CL_FBI_CONFIG_CONTROLLER
                 /HEC1/CL_MASTER_GUIBBF
                 /HEC1/CL_MASTER_GUIBBL
                 /HEC1/CL_MASTER_GUIBBL_IDA
                 /HEC1/CL_MASTER_GUIBBS
                 /HEC1/CL_MASTER_GUIBBS_IDA
                 /HEC1/CL_MASTER_GUIBBT
                 /HEC1/CL_MASTER_UIBBCH
                 /HEC1/CL_PROV_CONTACTS
                 /HEC1/CL_PROV_CONTACTS_REFS
                 /HEC1/CL_CONFIG_HELPER.

public section.
  PROTECTED SECTION.
  PRIVATE SECTION.

    CLASS-DATA so_instance TYPE REF TO /hec1/if_bopf_config_model .

    CLASS-METHODS get_instance
      IMPORTING
        !iv_config_id      TYPE /hec1/config_id OPTIONAL
        !iv_config_version TYPE /hec1/config_version OPTIONAL
      RETURNING
        VALUE(ro_instance) TYPE REF TO /hec1/if_bopf_config_model .
ENDCLASS.



CLASS /HEC1/CL_BOPF_CONFIG_MODEL_FAC IMPLEMENTATION.


  METHOD get_instance.

    ro_instance = so_instance = COND #( WHEN so_instance IS BOUND
                                        THEN so_instance
                                        ELSE NEW /hec1/cl_bopf_config_model( iv_config_id      = iv_config_id
                                                                             iv_config_version = iv_config_version ) ).

  ENDMETHOD.
ENDCLASS.
