mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 04:08:27 +08:00
Add exit for CLAS CLIF source serialization (#2630)
* Add user exit for serialize_abap_clif_source * Document CLIF serializer exit * Add exit redirection for CLIF serializer * Add link to example for CLIF serialization exit
This commit is contained in:
parent
36737331f0
commit
d6dfa424ae
|
@ -43,3 +43,7 @@ Can be used to skip certian objects, or force a different object setup than curr
|
|||
|
||||
### GET_SSL_ID
|
||||
Possibility to change the default `ANONYM` ssl id to something system specific
|
||||
|
||||
### CUSTOM_SERIALIZE_ABAP_CLIF
|
||||
Allows for a custom serializer to be used for global classes' CLIF sources. See [#2321](https://github.com/larshp/abapGit/issues/2321) and [#2491](https://github.com/larshp/abapGit/pull/2491) for use cases.
|
||||
This [example implementation](https://gist.github.com/flaiker/999c8165b89131608b05cd371529fef5) forces the old class serializer to be used for specific packages.
|
||||
|
|
|
@ -206,6 +206,11 @@ CLASS ZCL_ABAPGIT_OO_SERIALIZER IMPLEMENTATION.
|
|||
|
||||
|
||||
METHOD serialize_abap_clif_source.
|
||||
rt_source = zcl_abapgit_exit=>get_instance( )->custom_serialize_abap_clif( is_class_key ).
|
||||
IF rt_source IS NOT INITIAL.
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
TRY.
|
||||
rt_source = serialize_abap_new( is_class_key ).
|
||||
CATCH cx_sy_dyn_call_error.
|
||||
|
|
|
@ -15,7 +15,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS ZCL_ABAPGIT_EXIT IMPLEMENTATION.
|
||||
CLASS zcl_abapgit_exit IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD get_instance.
|
||||
|
@ -143,4 +143,11 @@ CLASS ZCL_ABAPGIT_EXIT IMPLEMENTATION.
|
|||
ENDTRY.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD zif_abapgit_exit~custom_serialize_abap_clif.
|
||||
TRY.
|
||||
rt_source = gi_exit->custom_serialize_abap_clif( is_class_key ).
|
||||
CATCH cx_sy_ref_is_initial cx_sy_dyn_call_illegal_method ##NO_HANDLER.
|
||||
ENDTRY.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
|
|
|
@ -46,4 +46,11 @@ INTERFACE zif_abapgit_exit
|
|||
METHODS get_ssl_id
|
||||
RETURNING
|
||||
VALUE(rv_ssl_id) TYPE ssfapplssl .
|
||||
METHODS custom_serialize_abap_clif
|
||||
IMPORTING
|
||||
is_class_key TYPE seoclskey
|
||||
RETURNING
|
||||
VALUE(rt_source) TYPE zif_abapgit_definitions=>ty_string_tt
|
||||
RAISING
|
||||
zcx_abapgit_exception.
|
||||
ENDINTERFACE.
|
||||
|
|
Loading…
Reference in New Issue
Block a user