mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
repo->set refactoring, disconnect repo from persistence (#2164)
* 1st attempt (events) * temp stash * split persistence and repo, beta * fix * fix2 * fix3 * linter fixes * review fixes
This commit is contained in:
parent
cc6907a8e0
commit
e809df8384
|
@ -17,6 +17,7 @@ CLASS zcl_abapgit_persistence_repo DEFINITION
|
||||||
FOR zif_abapgit_persist_repo~read .
|
FOR zif_abapgit_persist_repo~read .
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
|
DATA mt_meta_fields TYPE STANDARD TABLE OF abap_compname.
|
||||||
DATA mo_db TYPE REF TO zcl_abapgit_persistence_db .
|
DATA mo_db TYPE REF TO zcl_abapgit_persistence_db .
|
||||||
|
|
||||||
METHODS from_xml
|
METHODS from_xml
|
||||||
|
@ -42,9 +43,23 @@ ENDCLASS.
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_PERSISTENCE_REPO IMPLEMENTATION.
|
CLASS ZCL_ABAPGIT_PERSISTENCE_REPO IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD constructor.
|
METHOD constructor.
|
||||||
|
|
||||||
|
DATA ls_dummy_meta_mask TYPE zif_abapgit_persistence=>ty_repo_meta_mask.
|
||||||
|
DATA ls_dummy_meta TYPE zif_abapgit_persistence=>ty_repo_xml.
|
||||||
|
DATA lo_type_meta_mask TYPE REF TO cl_abap_structdescr.
|
||||||
|
DATA lo_type_meta TYPE REF TO cl_abap_structdescr.
|
||||||
|
FIELD-SYMBOLS <ls_comp> LIKE LINE OF lo_type_meta_mask->components.
|
||||||
|
|
||||||
|
" Collect actual list of fields in repo meta data (used in update_meta)
|
||||||
|
lo_type_meta_mask ?= cl_abap_structdescr=>describe_by_data( ls_dummy_meta_mask ).
|
||||||
|
lo_type_meta ?= cl_abap_structdescr=>describe_by_data( ls_dummy_meta ).
|
||||||
|
LOOP AT lo_type_meta_mask->components ASSIGNING <ls_comp>.
|
||||||
|
APPEND <ls_comp>-name TO mt_meta_fields.
|
||||||
|
ENDLOOP.
|
||||||
|
|
||||||
mo_db = zcl_abapgit_persistence_db=>get_instance( ).
|
mo_db = zcl_abapgit_persistence_db=>get_instance( ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,212 +214,52 @@ CLASS ZCL_ABAPGIT_PERSISTENCE_REPO IMPLEMENTATION.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
METHOD zif_abapgit_persist_repo~update_metadata.
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_branch_name.
|
DATA:
|
||||||
|
lv_blob TYPE zif_abapgit_persistence=>ty_content-data_str,
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
ls_persistent_meta TYPE zif_abapgit_persistence=>ty_repo.
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
|
FIELD-SYMBOLS <lv_field> LIKE LINE OF mt_meta_fields.
|
||||||
|
FIELD-SYMBOLS <lv_dst> TYPE ANY.
|
||||||
|
FIELD-SYMBOLS <lv_src> TYPE ANY.
|
||||||
|
FIELD-SYMBOLS <lv_changed> TYPE abap_bool.
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
ASSERT NOT iv_key IS INITIAL.
|
||||||
|
|
||||||
TRY.
|
IF is_change_mask IS INITIAL.
|
||||||
ls_repo = read( iv_key ).
|
RETURN.
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ls_repo-branch_name = iv_branch_name.
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_deserialized.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
ls_repo = read( iv_key ).
|
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
IF iv_deserialized_at IS NOT INITIAL.
|
|
||||||
ls_repo-deserialized_at = iv_deserialized_at.
|
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_deserialized_by IS NOT INITIAL.
|
" Validations
|
||||||
ls_repo-deserialized_by = iv_deserialized_by.
|
IF is_change_mask-url = abap_true AND is_meta-url IS INITIAL.
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_dot_abapgit.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
ls_repo = read( iv_key ).
|
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ls_repo-dot_abapgit = is_dot_abapgit.
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_head_branch.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
ls_repo = read( iv_key ).
|
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ls_repo-head_branch = iv_head_branch.
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_local_checksums.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
ls_repo = read( iv_key ).
|
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ls_repo-local_checksums = it_checksums.
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_local_settings.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
ls_repo = read( iv_key ).
|
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ls_repo-local_settings = is_settings.
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_offline.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
|
||||||
ls_repo = read( iv_key ).
|
|
||||||
CATCH zcx_abapgit_not_found.
|
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
|
||||||
ENDTRY.
|
|
||||||
|
|
||||||
ls_repo-offline = iv_offline.
|
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
|
||||||
iv_value = iv_key
|
|
||||||
iv_data = ls_content-data_str ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_persist_repo~update_url.
|
|
||||||
|
|
||||||
DATA: lt_content TYPE zif_abapgit_persistence=>tt_content,
|
|
||||||
ls_content LIKE LINE OF lt_content,
|
|
||||||
ls_repo TYPE zif_abapgit_persistence=>ty_repo.
|
|
||||||
|
|
||||||
|
|
||||||
IF iv_url IS INITIAL.
|
|
||||||
zcx_abapgit_exception=>raise( 'update, url empty' ).
|
zcx_abapgit_exception=>raise( 'update, url empty' ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ASSERT NOT iv_key IS INITIAL.
|
|
||||||
|
|
||||||
TRY.
|
TRY.
|
||||||
ls_repo = read( iv_key ).
|
ls_persistent_meta = read( iv_key ).
|
||||||
CATCH zcx_abapgit_not_found.
|
CATCH zcx_abapgit_not_found.
|
||||||
zcx_abapgit_exception=>raise( 'key not found' ).
|
zcx_abapgit_exception=>raise( 'repo key not found' ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
||||||
ls_repo-url = iv_url.
|
" Update
|
||||||
ls_content-data_str = to_xml( ls_repo ).
|
LOOP AT mt_meta_fields ASSIGNING <lv_field>.
|
||||||
|
ASSIGN COMPONENT <lv_field> OF STRUCTURE is_change_mask TO <lv_changed>.
|
||||||
|
ASSERT sy-subrc = 0.
|
||||||
|
CHECK <lv_changed> = abap_true.
|
||||||
|
ASSIGN COMPONENT <lv_field> OF STRUCTURE ls_persistent_meta TO <lv_dst>.
|
||||||
|
ASSERT sy-subrc = 0.
|
||||||
|
ASSIGN COMPONENT <lv_field> OF STRUCTURE is_meta TO <lv_src>.
|
||||||
|
ASSERT sy-subrc = 0.
|
||||||
|
<lv_dst> = <lv_src>.
|
||||||
|
ENDLOOP.
|
||||||
|
|
||||||
|
lv_blob = to_xml( ls_persistent_meta ).
|
||||||
|
|
||||||
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
mo_db->update( iv_type = zcl_abapgit_persistence_db=>c_type_repo
|
||||||
iv_value = iv_key
|
iv_value = iv_key
|
||||||
iv_data = ls_content-data_str ).
|
iv_data = lv_blob ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -38,53 +38,11 @@ INTERFACE zif_abapgit_persist_repo
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception
|
zcx_abapgit_exception
|
||||||
zcx_abapgit_not_found .
|
zcx_abapgit_not_found .
|
||||||
METHODS update_branch_name
|
METHODS update_metadata
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
||||||
!iv_branch_name TYPE zif_abapgit_persistence=>ty_repo_xml-branch_name
|
!is_meta TYPE zif_abapgit_persistence=>ty_repo_xml
|
||||||
RAISING
|
!is_change_mask TYPE zif_abapgit_persistence=>ty_repo_meta_mask
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_deserialized
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_value
|
|
||||||
!iv_deserialized_at TYPE timestampl
|
|
||||||
!iv_deserialized_by TYPE xubname
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_dot_abapgit
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
|
||||||
!is_dot_abapgit TYPE zif_abapgit_dot_abapgit=>ty_dot_abapgit
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_head_branch
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
|
||||||
!iv_head_branch TYPE zif_abapgit_persistence=>ty_repo_xml-head_branch
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_local_checksums
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
|
||||||
!it_checksums TYPE zif_abapgit_persistence=>ty_repo_xml-local_checksums
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_local_settings
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
|
||||||
!is_settings TYPE zif_abapgit_persistence=>ty_repo_xml-local_settings
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_offline
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
|
||||||
!iv_offline TYPE zif_abapgit_persistence=>ty_repo_xml-offline
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS update_url
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
|
||||||
!iv_url TYPE zif_abapgit_persistence=>ty_repo_xml-url
|
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
ENDINTERFACE.
|
ENDINTERFACE.
|
||||||
|
|
|
@ -44,6 +44,22 @@ INTERFACE zif_abapgit_persistence PUBLIC.
|
||||||
local_settings TYPE ty_local_settings,
|
local_settings TYPE ty_local_settings,
|
||||||
END OF ty_repo_xml.
|
END OF ty_repo_xml.
|
||||||
|
|
||||||
|
TYPES:
|
||||||
|
BEGIN OF ty_repo_meta_mask,
|
||||||
|
url TYPE abap_bool,
|
||||||
|
branch_name TYPE abap_bool,
|
||||||
|
package TYPE abap_bool,
|
||||||
|
created_by TYPE abap_bool,
|
||||||
|
created_at TYPE abap_bool,
|
||||||
|
deserialized_by TYPE abap_bool,
|
||||||
|
deserialized_at TYPE abap_bool,
|
||||||
|
offline TYPE abap_bool,
|
||||||
|
local_checksums TYPE abap_bool,
|
||||||
|
dot_abapgit TYPE abap_bool,
|
||||||
|
head_branch TYPE abap_bool,
|
||||||
|
local_settings TYPE abap_bool,
|
||||||
|
END OF ty_repo_meta_mask.
|
||||||
|
|
||||||
TYPES: BEGIN OF ty_repo,
|
TYPES: BEGIN OF ty_repo,
|
||||||
key TYPE zif_abapgit_persistence=>ty_value.
|
key TYPE zif_abapgit_persistence=>ty_value.
|
||||||
INCLUDE TYPE ty_repo_xml.
|
INCLUDE TYPE ty_repo_xml.
|
||||||
|
|
|
@ -395,10 +395,7 @@ CLASS ZCL_ABAPGIT_SERVICES_REPO IMPLEMENTATION.
|
||||||
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
|
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
zcl_abapgit_repo_srv=>get_instance( )->switch_repo_type(
|
zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->switch_repo_type( iv_offline = abap_false ).
|
||||||
iv_key = iv_key
|
|
||||||
iv_offline = abap_false ).
|
|
||||||
|
|
||||||
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ).
|
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ).
|
||||||
lo_repo->set_url( ls_popup-url ).
|
lo_repo->set_url( ls_popup-url ).
|
||||||
lo_repo->set_branch_name( ls_popup-branch_name ).
|
lo_repo->set_branch_name( ls_popup-branch_name ).
|
||||||
|
@ -451,7 +448,7 @@ CLASS ZCL_ABAPGIT_SERVICES_REPO IMPLEMENTATION.
|
||||||
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
|
RAISE EXCEPTION TYPE zcx_abapgit_cancel.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
zcl_abapgit_repo_srv=>get_instance( )->switch_repo_type( iv_key = iv_key iv_offline = abap_true ).
|
zcl_abapgit_repo_srv=>get_instance( )->get( iv_key )->switch_repo_type( iv_offline = abap_true ).
|
||||||
|
|
||||||
COMMIT WORK.
|
COMMIT WORK.
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
CLASS zcl_abapgit_repo DEFINITION
|
CLASS zcl_abapgit_repo DEFINITION
|
||||||
PUBLIC
|
PUBLIC
|
||||||
ABSTRACT
|
ABSTRACT
|
||||||
CREATE PUBLIC
|
CREATE PUBLIC.
|
||||||
|
|
||||||
GLOBAL FRIENDS zcl_abapgit_repo_srv .
|
|
||||||
|
|
||||||
PUBLIC SECTION.
|
PUBLIC SECTION.
|
||||||
|
|
||||||
|
METHODS bind_listener
|
||||||
|
IMPORTING
|
||||||
|
ii_listener TYPE REF TO zif_abapgit_repo_listener.
|
||||||
METHODS deserialize_checks
|
METHODS deserialize_checks
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rs_checks) TYPE zif_abapgit_definitions=>ty_deserialize_checks
|
VALUE(rs_checks) TYPE zif_abapgit_definitions=>ty_deserialize_checks
|
||||||
|
@ -51,9 +52,6 @@ CLASS zcl_abapgit_repo DEFINITION
|
||||||
METHODS get_package
|
METHODS get_package
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_package) TYPE zif_abapgit_persistence=>ty_repo-package .
|
VALUE(rv_package) TYPE zif_abapgit_persistence=>ty_repo-package .
|
||||||
METHODS delete
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS get_dot_abapgit
|
METHODS get_dot_abapgit
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ro_dot_abapgit) TYPE REF TO zcl_abapgit_dot_abapgit .
|
VALUE(ro_dot_abapgit) TYPE REF TO zcl_abapgit_dot_abapgit .
|
||||||
|
@ -122,6 +120,11 @@ CLASS zcl_abapgit_repo DEFINITION
|
||||||
VALUE(rt_unnecessary_local_objects) TYPE zif_abapgit_definitions=>ty_tadir_tt
|
VALUE(rt_unnecessary_local_objects) TYPE zif_abapgit_definitions=>ty_tadir_tt
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
METHODS switch_repo_type
|
||||||
|
IMPORTING
|
||||||
|
iv_offline TYPE abap_bool
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
|
|
||||||
|
@ -150,10 +153,16 @@ CLASS zcl_abapgit_repo DEFINITION
|
||||||
METHODS reset_remote .
|
METHODS reset_remote .
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
|
DATA mi_listener TYPE REF TO zif_abapgit_repo_listener .
|
||||||
|
|
||||||
TYPES:
|
TYPES:
|
||||||
ty_cache_tt TYPE SORTED TABLE OF zif_abapgit_definitions=>ty_file_item
|
ty_cache_tt TYPE SORTED TABLE OF zif_abapgit_definitions=>ty_file_item
|
||||||
WITH NON-UNIQUE KEY item .
|
WITH NON-UNIQUE KEY item .
|
||||||
|
METHODS notify_listener
|
||||||
|
IMPORTING
|
||||||
|
is_change_mask TYPE zif_abapgit_persistence=>ty_repo_meta_mask
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
METHODS apply_filter
|
METHODS apply_filter
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!it_filter TYPE zif_abapgit_definitions=>ty_tadir_tt
|
!it_filter TYPE zif_abapgit_definitions=>ty_tadir_tt
|
||||||
|
@ -249,13 +258,6 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD delete.
|
|
||||||
|
|
||||||
zcl_abapgit_persist_factory=>get_repo( )->delete( ms_data-key ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD delete_checks.
|
METHOD delete_checks.
|
||||||
|
|
||||||
DATA: li_package TYPE REF TO zif_abapgit_sap_package.
|
DATA: li_package TYPE REF TO zif_abapgit_sap_package.
|
||||||
|
@ -540,6 +542,21 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD notify_listener.
|
||||||
|
|
||||||
|
DATA ls_meta_slug TYPE zif_abapgit_persistence=>ty_repo_xml.
|
||||||
|
|
||||||
|
IF mi_listener IS BOUND.
|
||||||
|
MOVE-CORRESPONDING ms_data TO ls_meta_slug.
|
||||||
|
mi_listener->on_meta_change(
|
||||||
|
iv_key = ms_data-key
|
||||||
|
is_meta = ls_meta_slug
|
||||||
|
is_change_mask = is_change_mask ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD rebuild_local_checksums.
|
METHOD rebuild_local_checksums.
|
||||||
|
|
||||||
DATA:
|
DATA:
|
||||||
|
@ -633,7 +650,8 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
|
||||||
|
|
||||||
* TODO: refactor
|
* TODO: refactor
|
||||||
|
|
||||||
DATA: li_persistence TYPE REF TO zif_abapgit_persist_repo.
|
DATA:
|
||||||
|
ls_mask TYPE zif_abapgit_persistence=>ty_repo_meta_mask.
|
||||||
|
|
||||||
|
|
||||||
ASSERT it_checksums IS SUPPLIED
|
ASSERT it_checksums IS SUPPLIED
|
||||||
|
@ -646,65 +664,51 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
|
||||||
OR iv_deserialized_by IS SUPPLIED
|
OR iv_deserialized_by IS SUPPLIED
|
||||||
OR iv_deserialized_at IS SUPPLIED.
|
OR iv_deserialized_at IS SUPPLIED.
|
||||||
|
|
||||||
li_persistence = zcl_abapgit_persist_factory=>get_repo( ).
|
|
||||||
|
|
||||||
IF it_checksums IS SUPPLIED.
|
IF it_checksums IS SUPPLIED.
|
||||||
li_persistence->update_local_checksums(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
it_checksums = it_checksums ).
|
|
||||||
ms_data-local_checksums = it_checksums.
|
ms_data-local_checksums = it_checksums.
|
||||||
|
ls_mask-local_checksums = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_url IS SUPPLIED.
|
IF iv_url IS SUPPLIED.
|
||||||
li_persistence->update_url(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
iv_url = iv_url ).
|
|
||||||
ms_data-url = iv_url.
|
ms_data-url = iv_url.
|
||||||
|
ls_mask-url = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_branch_name IS SUPPLIED.
|
IF iv_branch_name IS SUPPLIED.
|
||||||
li_persistence->update_branch_name(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
iv_branch_name = iv_branch_name ).
|
|
||||||
ms_data-branch_name = iv_branch_name.
|
ms_data-branch_name = iv_branch_name.
|
||||||
|
ls_mask-branch_name = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_head_branch IS SUPPLIED.
|
IF iv_head_branch IS SUPPLIED.
|
||||||
li_persistence->update_head_branch(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
iv_head_branch = iv_head_branch ).
|
|
||||||
ms_data-head_branch = iv_head_branch.
|
ms_data-head_branch = iv_head_branch.
|
||||||
|
ls_mask-head_branch = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_offline IS SUPPLIED.
|
IF iv_offline IS SUPPLIED.
|
||||||
li_persistence->update_offline(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
iv_offline = iv_offline ).
|
|
||||||
ms_data-offline = iv_offline.
|
ms_data-offline = iv_offline.
|
||||||
|
ls_mask-offline = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF is_dot_abapgit IS SUPPLIED.
|
IF is_dot_abapgit IS SUPPLIED.
|
||||||
li_persistence->update_dot_abapgit(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
is_dot_abapgit = is_dot_abapgit ).
|
|
||||||
ms_data-dot_abapgit = is_dot_abapgit.
|
ms_data-dot_abapgit = is_dot_abapgit.
|
||||||
|
ls_mask-dot_abapgit = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF is_local_settings IS SUPPLIED.
|
IF is_local_settings IS SUPPLIED.
|
||||||
li_persistence->update_local_settings(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
is_settings = is_local_settings ).
|
|
||||||
ms_data-local_settings = is_local_settings.
|
ms_data-local_settings = is_local_settings.
|
||||||
|
ls_mask-local_settings = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF iv_deserialized_at IS SUPPLIED OR iv_deserialized_by IS SUPPLIED.
|
IF iv_deserialized_at IS SUPPLIED OR iv_deserialized_by IS SUPPLIED.
|
||||||
li_persistence->update_deserialized(
|
|
||||||
iv_key = ms_data-key
|
|
||||||
iv_deserialized_at = iv_deserialized_at
|
|
||||||
iv_deserialized_by = iv_deserialized_by ).
|
|
||||||
ms_data-deserialized_at = iv_deserialized_at.
|
ms_data-deserialized_at = iv_deserialized_at.
|
||||||
|
ms_data-deserialized_by = iv_deserialized_by.
|
||||||
|
ls_mask-deserialized_at = abap_true.
|
||||||
|
ls_mask-deserialized_by = abap_true.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
notify_listener( ls_mask ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -741,6 +745,11 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD bind_listener.
|
||||||
|
mi_listener = ii_listener.
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD update_last_deserialize.
|
METHOD update_last_deserialize.
|
||||||
|
|
||||||
DATA: lv_deserialized_at TYPE zif_abapgit_persistence=>ty_repo-deserialized_at,
|
DATA: lv_deserialized_at TYPE zif_abapgit_persistence=>ty_repo-deserialized_at,
|
||||||
|
@ -832,4 +841,25 @@ CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
|
||||||
set( it_checksums = lt_checksums ).
|
set( it_checksums = lt_checksums ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD switch_repo_type.
|
||||||
|
|
||||||
|
IF iv_offline = ms_data-offline.
|
||||||
|
zcx_abapgit_exception=>raise( |Cannot switch_repo_type, offline already = "{ ms_data-offline }"| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
IF iv_offline = abap_true. " On-line -> OFFline
|
||||||
|
set(
|
||||||
|
iv_url = zcl_abapgit_url=>name( ms_data-url )
|
||||||
|
iv_branch_name = ''
|
||||||
|
iv_head_branch = ''
|
||||||
|
iv_offline = abap_true ).
|
||||||
|
ELSE. " OFFline -> On-line
|
||||||
|
set( iv_offline = abap_false ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
|
@ -6,10 +6,12 @@ CLASS zcl_abapgit_repo_srv DEFINITION
|
||||||
PUBLIC SECTION.
|
PUBLIC SECTION.
|
||||||
|
|
||||||
INTERFACES zif_abapgit_repo_srv .
|
INTERFACES zif_abapgit_repo_srv .
|
||||||
|
INTERFACES zif_abapgit_repo_listener .
|
||||||
|
|
||||||
CLASS-METHODS get_instance
|
CLASS-METHODS get_instance
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ri_srv) TYPE REF TO zif_abapgit_repo_srv .
|
VALUE(ri_srv) TYPE REF TO zif_abapgit_repo_srv .
|
||||||
|
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
ALIASES delete
|
ALIASES delete
|
||||||
|
@ -28,21 +30,34 @@ CLASS zcl_abapgit_repo_srv DEFINITION
|
||||||
METHODS refresh
|
METHODS refresh
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS constructor .
|
|
||||||
METHODS is_sap_object_allowed
|
METHODS is_sap_object_allowed
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_allowed) TYPE abap_bool .
|
VALUE(rv_allowed) TYPE abap_bool .
|
||||||
|
METHODS instantiate_and_add
|
||||||
|
IMPORTING
|
||||||
|
!is_repo_meta TYPE zif_abapgit_persistence=>ty_repo
|
||||||
|
RETURNING
|
||||||
|
VALUE(ro_repo) TYPE REF TO zcl_abapgit_repo
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
METHODS add
|
METHODS add
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!io_repo TYPE REF TO zcl_abapgit_repo
|
!io_repo TYPE REF TO zcl_abapgit_repo
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
METHODS reinstantiate_repo
|
||||||
|
IMPORTING
|
||||||
|
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
||||||
|
!is_meta TYPE zif_abapgit_persistence=>ty_repo_xml
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
METHODS validate_sub_super_packages
|
METHODS validate_sub_super_packages
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_package TYPE devclass
|
!iv_package TYPE devclass
|
||||||
!it_repos TYPE zif_abapgit_persistence=>tt_repo
|
!it_repos TYPE zif_abapgit_persistence=>tt_repo
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,12 +79,24 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
|
io_repo->bind_listener( me ).
|
||||||
APPEND io_repo TO mt_list.
|
APPEND io_repo TO mt_list.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD constructor.
|
METHOD instantiate_and_add.
|
||||||
|
|
||||||
|
IF is_repo_meta-offline = abap_false.
|
||||||
|
CREATE OBJECT ro_repo TYPE zcl_abapgit_repo_online
|
||||||
|
EXPORTING
|
||||||
|
is_data = is_repo_meta.
|
||||||
|
ELSE.
|
||||||
|
CREATE OBJECT ro_repo TYPE zcl_abapgit_repo_offline
|
||||||
|
EXPORTING
|
||||||
|
is_data = is_repo_meta.
|
||||||
|
ENDIF.
|
||||||
|
add( ro_repo ).
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -107,17 +134,7 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
|
|
||||||
lt_list = zcl_abapgit_persist_factory=>get_repo( )->list( ).
|
lt_list = zcl_abapgit_persist_factory=>get_repo( )->list( ).
|
||||||
LOOP AT lt_list ASSIGNING <ls_list>.
|
LOOP AT lt_list ASSIGNING <ls_list>.
|
||||||
IF <ls_list>-offline = abap_false.
|
instantiate_and_add( <ls_list> ).
|
||||||
CREATE OBJECT lo_online
|
|
||||||
EXPORTING
|
|
||||||
is_data = <ls_list>.
|
|
||||||
APPEND lo_online TO mt_list.
|
|
||||||
ELSE.
|
|
||||||
CREATE OBJECT lo_offline
|
|
||||||
EXPORTING
|
|
||||||
is_data = <ls_list>.
|
|
||||||
APPEND lo_offline TO mt_list.
|
|
||||||
ENDIF.
|
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
mv_init = abap_true.
|
mv_init = abap_true.
|
||||||
|
@ -158,7 +175,7 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD zif_abapgit_repo_srv~delete.
|
METHOD zif_abapgit_repo_srv~delete.
|
||||||
|
|
||||||
io_repo->delete( ).
|
zcl_abapgit_persist_factory=>get_repo( )->delete( io_repo->get_key( ) ).
|
||||||
|
|
||||||
DELETE TABLE mt_list FROM io_repo.
|
DELETE TABLE mt_list FROM io_repo.
|
||||||
ASSERT sy-subrc = 0.
|
ASSERT sy-subrc = 0.
|
||||||
|
@ -253,11 +270,7 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
zcx_abapgit_exception=>raise( 'new_offline not found' ).
|
zcx_abapgit_exception=>raise( 'new_offline not found' ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
||||||
CREATE OBJECT ro_repo
|
ro_repo ?= instantiate_and_add( ls_repo ).
|
||||||
EXPORTING
|
|
||||||
is_data = ls_repo.
|
|
||||||
|
|
||||||
add( ro_repo ).
|
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
@ -287,11 +300,7 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
zcx_abapgit_exception=>raise( 'new_online not found' ).
|
zcx_abapgit_exception=>raise( 'new_online not found' ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
||||||
CREATE OBJECT ro_repo
|
ro_repo ?= instantiate_and_add( ls_repo ).
|
||||||
EXPORTING
|
|
||||||
is_data = ls_repo.
|
|
||||||
|
|
||||||
add( ro_repo ).
|
|
||||||
|
|
||||||
ro_repo->refresh( ).
|
ro_repo->refresh( ).
|
||||||
ro_repo->find_remote_dot_abapgit( ).
|
ro_repo->find_remote_dot_abapgit( ).
|
||||||
|
@ -299,6 +308,48 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_repo_listener~on_meta_change.
|
||||||
|
|
||||||
|
DATA li_persistence TYPE REF TO zif_abapgit_persist_repo.
|
||||||
|
|
||||||
|
li_persistence = zcl_abapgit_persist_factory=>get_repo( ).
|
||||||
|
li_persistence->update_metadata(
|
||||||
|
iv_key = iv_key
|
||||||
|
is_meta = is_meta
|
||||||
|
is_change_mask = is_change_mask ).
|
||||||
|
|
||||||
|
|
||||||
|
" Recreate repo instance if type changed
|
||||||
|
" Instances in mt_list are of *_online and *_offline type
|
||||||
|
" If type is changed object should be recreated from the proper class
|
||||||
|
" TODO refactor, e.g. unify repo logic in one class
|
||||||
|
IF is_change_mask-offline = abap_true.
|
||||||
|
reinstantiate_repo(
|
||||||
|
iv_key = iv_key
|
||||||
|
is_meta = is_meta ).
|
||||||
|
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD reinstantiate_repo.
|
||||||
|
|
||||||
|
DATA lo_repo TYPE REF TO zcl_abapgit_repo.
|
||||||
|
DATA ls_full_meta TYPE zif_abapgit_persistence=>ty_repo.
|
||||||
|
|
||||||
|
lo_repo = get( iv_key ).
|
||||||
|
DELETE TABLE mt_list FROM lo_repo.
|
||||||
|
ASSERT sy-subrc IS INITIAL.
|
||||||
|
|
||||||
|
MOVE-CORRESPONDING is_meta TO ls_full_meta.
|
||||||
|
ls_full_meta-key = iv_key.
|
||||||
|
|
||||||
|
instantiate_and_add( ls_full_meta ).
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_repo_srv~purge.
|
METHOD zif_abapgit_repo_srv~purge.
|
||||||
|
|
||||||
* todo, this should be a method on the repo instead
|
* todo, this should be a method on the repo instead
|
||||||
|
@ -322,38 +373,6 @@ CLASS ZCL_ABAPGIT_REPO_SRV IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_repo_srv~switch_repo_type.
|
|
||||||
|
|
||||||
* todo, this should be a method on the repo instead?
|
|
||||||
|
|
||||||
DATA lo_repo TYPE REF TO zcl_abapgit_repo.
|
|
||||||
|
|
||||||
FIELD-SYMBOLS <lo_repo> LIKE LINE OF mt_list.
|
|
||||||
|
|
||||||
lo_repo = get( iv_key ).
|
|
||||||
READ TABLE mt_list ASSIGNING <lo_repo> FROM lo_repo.
|
|
||||||
ASSERT sy-subrc IS INITIAL.
|
|
||||||
ASSERT iv_offline <> lo_repo->ms_data-offline.
|
|
||||||
|
|
||||||
IF iv_offline = abap_true. " On-line -> OFFline
|
|
||||||
lo_repo->set(
|
|
||||||
iv_url = zcl_abapgit_url=>name( lo_repo->ms_data-url )
|
|
||||||
iv_branch_name = ''
|
|
||||||
iv_head_branch = ''
|
|
||||||
iv_offline = abap_true ).
|
|
||||||
CREATE OBJECT <lo_repo> TYPE zcl_abapgit_repo_offline
|
|
||||||
EXPORTING
|
|
||||||
is_data = lo_repo->ms_data.
|
|
||||||
ELSE. " OFFline -> On-line
|
|
||||||
lo_repo->set( iv_offline = abap_false ).
|
|
||||||
CREATE OBJECT <lo_repo> TYPE zcl_abapgit_repo_online
|
|
||||||
EXPORTING
|
|
||||||
is_data = lo_repo->ms_data.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_repo_srv~validate_package.
|
METHOD zif_abapgit_repo_srv~validate_package.
|
||||||
|
|
||||||
DATA: lv_as4user TYPE tdevc-as4user,
|
DATA: lv_as4user TYPE tdevc-as4user,
|
||||||
|
|
13
src/zif_abapgit_repo_listener.intf.abap
Normal file
13
src/zif_abapgit_repo_listener.intf.abap
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
INTERFACE zif_abapgit_repo_listener
|
||||||
|
PUBLIC .
|
||||||
|
|
||||||
|
|
||||||
|
INTERFACE zif_abapgit_persistence LOAD .
|
||||||
|
METHODS on_meta_change
|
||||||
|
IMPORTING
|
||||||
|
!iv_key TYPE zif_abapgit_persistence=>ty_repo-key
|
||||||
|
!is_meta TYPE zif_abapgit_persistence=>ty_repo_xml
|
||||||
|
!is_change_mask TYPE zif_abapgit_persistence=>ty_repo_meta_mask
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception .
|
||||||
|
ENDINTERFACE.
|
16
src/zif_abapgit_repo_listener.intf.xml
Normal file
16
src/zif_abapgit_repo_listener.intf.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
|
||||||
|
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
||||||
|
<asx:values>
|
||||||
|
<VSEOINTERF>
|
||||||
|
<CLSNAME>ZIF_ABAPGIT_REPO_LISTENER</CLSNAME>
|
||||||
|
<VERSION>1</VERSION>
|
||||||
|
<LANGU>E</LANGU>
|
||||||
|
<DESCRIPT>Abapgit repo listener</DESCRIPT>
|
||||||
|
<EXPOSURE>2</EXPOSURE>
|
||||||
|
<STATE>1</STATE>
|
||||||
|
<UNICODE>X</UNICODE>
|
||||||
|
</VSEOINTERF>
|
||||||
|
</asx:values>
|
||||||
|
</asx:abap>
|
||||||
|
</abapGit>
|
|
@ -50,12 +50,6 @@ INTERFACE zif_abapgit_repo_srv
|
||||||
is_checks TYPE zif_abapgit_definitions=>ty_delete_checks
|
is_checks TYPE zif_abapgit_definitions=>ty_delete_checks
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS switch_repo_type
|
|
||||||
IMPORTING
|
|
||||||
!iv_key TYPE zif_abapgit_persistence=>ty_value
|
|
||||||
!iv_offline TYPE abap_bool
|
|
||||||
RAISING
|
|
||||||
zcx_abapgit_exception .
|
|
||||||
METHODS validate_package
|
METHODS validate_package
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_package TYPE devclass
|
!iv_package TYPE devclass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user