All files / output zcl_abapgit_web_sicf_stateless.clas.mjs

42.85% Statements 21/49
100% Branches 2/2
14.28% Functions 1/7
42.85% Lines 21/49

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 491x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                   1x       1x                                 1x 1x 1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_web_sicf_stateless.clas.abap
class zcl_abapgit_web_sicf_stateless {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_WEB_SICF_STATELESS';
  static IMPLEMENTED_INTERFACES = ["IF_HTTP_EXTENSION"];
  static ATTRIBUTES = {"IF_HTTP_EXTENSION~FLOW_RC": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": " ", "is_class": " "},
  "IF_HTTP_EXTENSION~CO_FLOW_OK": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "IF_HTTP_EXTENSION~CO_FLOW_OK_OTHERS_MAND": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}};
  static METHODS = {};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
    this.if_http_extension$co_flow_ok = abap.Classes['IF_HTTP_EXTENSION'].if_http_extension$co_flow_ok;
    this.if_http_extension$co_flow_ok_others_mand = abap.Classes['IF_HTTP_EXTENSION'].if_http_extension$co_flow_ok_others_mand;
    if (this.if_http_extension$flow_rc === undefined) this.if_http_extension$flow_rc = new abap.types.Integer({qualifiedName: "I"});
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async if_http_extension$handle_request(INPUT) {
    let server = INPUT?.server;
    if (server?.getQualifiedName === undefined || server.getQualifiedName() !== "IF_HTTP_SERVER") { server = undefined; }
    if (server === undefined) { server = new abap.types.ABAPObject({qualifiedName: "IF_HTTP_SERVER", RTTIName: "\\INTERFACE=IF_HTTP_SERVER"}).set(INPUT.server); }
    let lv_data = new abap.types.String({qualifiedName: "STRING"});
    await server.get().if_http_server$response.get().if_http_entity$set_header_field({name: abap.CharacterFactory.get(12, 'Content-Type'), value: abap.CharacterFactory.get(10, 'text/plain')});
    await server.get().if_http_server$response.get().if_http_entity$set_header_field({name: abap.CharacterFactory.get(7, 'Expires'), value: abap.CharacterFactory.get(1, '0')});
    try {
      lv_data.set((await (await abap.Classes['ZCL_ABAPGIT_PERSISTENCE_DB'].get_instance()).get().read({iv_type: abap.Classes['ZCL_ABAPGIT_WEB_PROGRESS'].c_type, iv_value: abap.builtin.sy.get().uname})));
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_NOT_FOUND'] && e instanceof abap.Classes['ZCX_ABAPGIT_NOT_FOUND'])) {
      } else {
        throw e;
      }
    }
    await server.get().if_http_server$response.get().if_http_entity$set_cdata({data: lv_data});
  }
}
abap.Classes['ZCL_ABAPGIT_WEB_SICF_STATELESS'] = zcl_abapgit_web_sicf_stateless;
zcl_abapgit_web_sicf_stateless.if_http_extension$co_flow_ok = new abap.types.Integer({qualifiedName: "I"});
zcl_abapgit_web_sicf_stateless.if_http_extension$co_flow_ok.set(0);
zcl_abapgit_web_sicf_stateless.if_http_extension$co_flow_ok_others_mand = new abap.types.Integer({qualifiedName: "I"});
zcl_abapgit_web_sicf_stateless.if_http_extension$co_flow_ok_others_mand.set(2);
export {zcl_abapgit_web_sicf_stateless};