CLASS zcl_abapgit_ajson_filter_lib DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.

    CLASS-METHODS create_empty_filter
      RETURNING
        VALUE(ri_filter) TYPE REF TO zif_abapgit_ajson_filter
      RAISING
        zcx_abapgit_ajson_error .
    CLASS-METHODS create_path_filter
      IMPORTING
        !it_skip_paths TYPE string_table OPTIONAL
        !iv_skip_paths TYPE string OPTIONAL
      RETURNING
        VALUE(ri_filter) TYPE REF TO zif_abapgit_ajson_filter
      RAISING
        zcx_abapgit_ajson_error .
    CLASS-METHODS create_and_filter
      IMPORTING
        !it_filters TYPE zif_abapgit_ajson_filter=>ty_filter_tab
      RETURNING
        VALUE(ri_filter) TYPE REF TO zif_abapgit_ajson_filter
      RAISING
        zcx_abapgit_ajson_error .

  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.



CLASS zcl_abapgit_ajson_filter_lib IMPLEMENTATION.


  METHOD create_and_filter.
    ri_filter = NEW lcl_and_filter( it_filters = it_filters ).
  ENDMETHOD.


  METHOD create_empty_filter.
    ri_filter = NEW lcl_empty_filter( ).
  ENDMETHOD.


  METHOD create_path_filter.
    ri_filter = NEW lcl_paths_filter( it_skip_paths = it_skip_paths
                                      iv_skip_paths = iv_skip_paths ).
  ENDMETHOD.
ENDCLASS.
