All files / output zcl_abapgit_flow_exit.clas.mjs

3.79% Statements 6/158
66.66% Branches 2/3
33.33% Functions 1/3
3.79% Lines 6/158

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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 1581x 1x                                                                                                                                                                                                                                                                                                                 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_flow_exit.clas.abap
class zcl_abapgit_flow_exit {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_FLOW_EXIT';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_FLOW_EXIT"];
  static ATTRIBUTES = {"GI_GLOBAL_EXIT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_FLOW_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_FLOW_EXIT"});}, "visibility": "I", "is_constant": " ", "is_class": "X"},
  "GI_EXIT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_FLOW_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_FLOW_EXIT"});}, "visibility": "I", "is_constant": " ", "is_class": "X"}};
  static METHODS = {"GET_INSTANCE": {"visibility": "U", "parameters": {"RI_EXIT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_FLOW_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_FLOW_EXIT"});}, "is_optional": " "}}}};
  #gi_global_exit;
  #gi_exit;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
    this.gi_global_exit = zcl_abapgit_flow_exit.gi_global_exit;
    this.gi_exit = zcl_abapgit_flow_exit.gi_exit;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async get_instance() {
    return zcl_abapgit_flow_exit.get_instance();
  }
  static async get_instance() {
    let ri_exit = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_FLOW_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_FLOW_EXIT"});
    if (abap.compare.initial(zcl_abapgit_flow_exit.gi_global_exit) === false) {
      ri_exit.set(zcl_abapgit_flow_exit.gi_global_exit);
      return ri_exit;
    }
    try {
      let unique693 = abap.Classes["CLAS-ZCL_ABAPGIT_FLOW_EXIT-"+'ZCL_ABAPGIT_FLOW_USER_EXIT'.trimEnd()];
      if (unique693 === undefined) { unique693 = abap.Classes['ZCL_ABAPGIT_FLOW_USER_EXIT'.trimEnd()]; }
      if (unique693 === undefined) { throw new abap.Classes['CX_SY_CREATE_OBJECT_ERROR']; }
      zcl_abapgit_flow_exit.gi_exit.set(await (new unique693()).constructor_());
    } catch (e) {
      if ((abap.Classes['CX_SY_CREATE_OBJECT_ERROR'] && e instanceof abap.Classes['CX_SY_CREATE_OBJECT_ERROR'])) {
      } else {
        throw e;
      }
    }
    zcl_abapgit_flow_exit.gi_global_exit.set(await (new abap.Classes['ZCL_ABAPGIT_FLOW_EXIT']()).constructor_());
    ri_exit.set(zcl_abapgit_flow_exit.gi_global_exit);
    return ri_exit;
  }
  async zif_abapgit_flow_exit$on_event(INPUT) {
    let rs_result = new abap.types.Structure({
    "handled": new abap.types.Structure({
    "page": new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"}),
    "state": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT_HANDLER=>TY_HANDLING_RESULT-STATE"})}, "zif_abapgit_gui_event_handler=>ty_handling_result", undefined, {}, {}),
    "refresh": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_exit=>ty_event_result", undefined, {}, {});
    let ii_event = INPUT?.ii_event;
    if (ii_event?.getQualifiedName === undefined || ii_event.getQualifiedName() !== "ZIF_ABAPGIT_GUI_EVENT") { ii_event = undefined; }
    if (ii_event === undefined) { ii_event = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_EVENT"}).set(INPUT.ii_event); }
    let it_features = INPUT?.it_features;
    if (it_features?.getQualifiedName === undefined || it_features.getQualifiedName() !== "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURES") { it_features = undefined; }
    if (it_features === undefined) { it_features = abap.types.TableFactory.construct(new abap.types.Structure({
    "repo": new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-REPO-NAME"}),
    "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}),
    "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_flow_logic=>ty_feature-repo", undefined, {}, {}),
    "branch": new abap.types.Structure({
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_BRANCH-DISPLAY_NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "up_to_date": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_branch", undefined, {}, {}),
    "pr": new abap.types.Structure({
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-TITLE"}),
    "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-URL"}),
    "number": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-NUMBER"}),
    "draft": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_feature-pr", undefined, {}, {}),
    "transport": new abap.types.Structure({
    "trkorr": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-TRANSPORT-TITLE"})}, "zif_abapgit_flow_logic=>ty_feature-transport", undefined, {}, {}),
    "full_match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "changed_files": abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt"),
    "changed_objects": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts")}, "zif_abapgit_flow_logic=>ty_feature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_features").set(INPUT.it_features); }
    if (abap.compare.initial(zcl_abapgit_flow_exit.gi_exit) === false) {
      try {
        rs_result.set((await zcl_abapgit_flow_exit.gi_exit.get().zif_abapgit_flow_exit$on_event({ii_event: ii_event, it_features: it_features})));
      } catch (e) {
        if ((abap.Classes['CX_SY_REF_IS_INITIAL'] && e instanceof abap.Classes['CX_SY_REF_IS_INITIAL']) || (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'] && e instanceof abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'])) {
        } else {
          throw e;
        }
      }
    }
    return rs_result;
  }
  async zif_abapgit_flow_exit$toolbar_extras(INPUT) {
    let io_toolbar = INPUT?.io_toolbar;
    if (io_toolbar?.getQualifiedName === undefined || io_toolbar.getQualifiedName() !== "ZCL_ABAPGIT_HTML_TOOLBAR") { io_toolbar = undefined; }
    if (io_toolbar === undefined) { io_toolbar = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_TOOLBAR", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_TOOLBAR"}).set(INPUT.io_toolbar); }
    let is_feature = INPUT?.is_feature;
    if (is_feature?.getQualifiedName === undefined || is_feature.getQualifiedName() !== "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE") { is_feature = undefined; }
    if (is_feature === undefined) { is_feature = new abap.types.Structure({
    "repo": new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-REPO-NAME"}),
    "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}),
    "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_flow_logic=>ty_feature-repo", undefined, {}, {}),
    "branch": new abap.types.Structure({
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_BRANCH-DISPLAY_NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "up_to_date": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_branch", undefined, {}, {}),
    "pr": new abap.types.Structure({
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-TITLE"}),
    "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-URL"}),
    "number": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-NUMBER"}),
    "draft": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_feature-pr", undefined, {}, {}),
    "transport": new abap.types.Structure({
    "trkorr": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-TRANSPORT-TITLE"})}, "zif_abapgit_flow_logic=>ty_feature-transport", undefined, {}, {}),
    "full_match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "changed_files": abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt"),
    "changed_objects": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts")}, "zif_abapgit_flow_logic=>ty_feature", undefined, {}, {}).set(INPUT.is_feature); }
    let iv_index = INPUT?.iv_index;
    if (iv_index?.getQualifiedName === undefined || iv_index.getQualifiedName() !== "I") { iv_index = undefined; }
    if (iv_index === undefined) { iv_index = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_index); }
    if (abap.compare.initial(zcl_abapgit_flow_exit.gi_exit) === false) {
      try {
        await zcl_abapgit_flow_exit.gi_exit.get().zif_abapgit_flow_exit$toolbar_extras({io_toolbar: io_toolbar, iv_index: iv_index, is_feature: is_feature});
      } catch (e) {
        if ((abap.Classes['CX_SY_REF_IS_INITIAL'] && e instanceof abap.Classes['CX_SY_REF_IS_INITIAL']) || (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'] && e instanceof abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'])) {
        } else {
          throw e;
        }
      }
    }
  }
}
abap.Classes['ZCL_ABAPGIT_FLOW_EXIT'] = zcl_abapgit_flow_exit;
zcl_abapgit_flow_exit.gi_global_exit = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_FLOW_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_FLOW_EXIT"});
zcl_abapgit_flow_exit.gi_exit = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_FLOW_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_FLOW_EXIT"});
export {zcl_abapgit_flow_exit};