All files / src/persist zcl_abapgit_persist_migrate.clas.locals_imp.abap

82.85% Statements 58/70
100% Branches 0/0
0% Functions 0/1
82.85% Lines 58/70

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 711x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                         1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
CLASS lcl_cua_interface DEFINITION INHERITING FROM zcl_abapgit_objects_program FINAL.
  PUBLIC SECTION.
    CLASS-METHODS new
      RETURNING
        VALUE(ro_instance) TYPE REF TO lcl_cua_interface.
    METHODS get_own_cua
      RETURNING
        VALUE(rs_cua) TYPE ty_cua
      RAISING
        zcx_abapgit_exception.
    METHODS put_own_cua
      IMPORTING
        is_cua TYPE ty_cua
      RAISING
        zcx_abapgit_exception.
ENDCLASS.
 
CLASS lcl_cua_interface IMPLEMENTATION.
 
  METHOD new.
 
    DATA ls_item TYPE zif_abapgit_definitions=>ty_item.
 
    SELECT SINGLE devclass object obj_name INTO (ls_item-devclass, ls_item-obj_type, ls_item-obj_name)
      FROM tadir
      WHERE pgmid  = 'R3TR'
      AND object   = 'PROG'
      AND obj_name = sy-cprog.
 
    CREATE OBJECT ro_instance
      EXPORTING
        iv_language = 'E'
        is_item = ls_item.
 
  ENDMETHOD.
 
  METHOD get_own_cua.
 
    rs_cua = serialize_cua( sy-cprog ).
 
  ENDMETHOD.
 
  METHOD put_own_cua.

    DATA li_log TYPE REF TO zif_abapgit_log.

    deserialize_cua(
      is_cua          = is_cua
      iv_program_name = ms_item-obj_name ).

    CREATE OBJECT li_log TYPE zcl_abapgit_log.
    zcl_abapgit_objects_activation=>activate( li_log ).
    zcl_abapgit_objects_activation=>clear( ).

  ENDMETHOD.
 
ENDCLASS.
 
CLASS lcl_own_cua_provider DEFINITION FINAL.
  PUBLIC SECTION.
    CLASS-METHODS get
      RETURNING
        VALUE(rs_cua) TYPE zcl_abapgit_objects_program=>ty_cua ##NEEDED.
ENDCLASS.
 
CLASS lcl_own_cua_provider IMPLEMENTATION.
  METHOD get.
    " @@abapmerge include-cua zabapgit.prog.xml > rs_cua
  ENDMETHOD.
ENDCLASS.