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 | 1x 1x 1x 1x 1x 1x 1x 1x | const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_web_sicf.clas.abap
class zcl_abapgit_web_sicf {
static STATIC_SUPER = undefined;
static INTERNAL_TYPE = 'CLAS';
static INTERNAL_NAME = 'ZCL_ABAPGIT_WEB_SICF';
static IMPLEMENTED_INTERFACES = ["IF_HTTP_EXTENSION","ZIF_ABAPGIT_WEB_REQUEST","ZIF_ABAPGIT_WEB_RESPONSE"];
static ATTRIBUTES = {"MI_SERVER": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "IF_HTTP_SERVER", RTTIName: "\\INTERFACE=IF_HTTP_SERVER"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
"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 = {};
#mi_server;
constructor() {
this.me = new abap.types.ABAPObject();
this.me.set(this);
this.INTERNAL_ID = abap.internalIdCounter++;
this.FRIENDS_ACCESS_INSTANCE = {
};
this.#mi_server = new abap.types.ABAPObject({qualifiedName: "IF_HTTP_SERVER", RTTIName: "\\INTERFACE=IF_HTTP_SERVER"});
this.FRIENDS_ACCESS_INSTANCE["mi_server"] = this.#mi_server;
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 zif_abapgit_web_request$get_header_field(INPUT) {
let rv_value = new abap.types.String({qualifiedName: "STRING"});
let iv_name = INPUT?.iv_name;
if (iv_name?.getQualifiedName === undefined || iv_name.getQualifiedName() !== "STRING") { iv_name = undefined; }
if (iv_name === undefined) { iv_name = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_name); }
rv_value.set((await this.#mi_server.get().if_http_server$request.get().if_http_entity$get_header_field({name: iv_name})));
return rv_value;
}
async zif_abapgit_web_request$get_method() {
let rv_method = new abap.types.String({qualifiedName: "STRING"});
rv_method.set((await this.#mi_server.get().if_http_server$request.get().if_http_request$get_method()));
return rv_method;
}
async zif_abapgit_web_request$get_cdata() {
let rv_data = new abap.types.String({qualifiedName: "STRING"});
rv_data.set((await this.#mi_server.get().if_http_server$request.get().if_http_entity$get_cdata()));
return rv_data;
}
async zif_abapgit_web_response$set_content_type(INPUT) {
let iv_type = INPUT?.iv_type;
if (iv_type?.getQualifiedName === undefined || iv_type.getQualifiedName() !== "STRING") { iv_type = undefined; }
if (iv_type === undefined) { iv_type = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_type); }
await this.#mi_server.get().if_http_server$response.get().if_http_entity$set_content_type({content_type: iv_type});
}
async zif_abapgit_web_response$set_cdata(INPUT) {
let iv_data = INPUT?.iv_data;
if (iv_data?.getQualifiedName === undefined || iv_data.getQualifiedName() !== "STRING") { iv_data = undefined; }
if (iv_data === undefined) { iv_data = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_data); }
await this.#mi_server.get().if_http_server$response.get().if_http_entity$set_cdata({data: iv_data});
}
async zif_abapgit_web_response$set_xdata(INPUT) {
let iv_data = INPUT?.iv_data;
if (iv_data?.getQualifiedName === undefined || iv_data.getQualifiedName() !== "XSTRING") { iv_data = undefined; }
if (iv_data === undefined) { iv_data = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_data); }
await this.#mi_server.get().if_http_server$response.get().if_http_entity$set_data({data: iv_data});
}
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); }
this.#mi_server.set(server);
await server.get().if_http_server$set_session_stateful();
try {
await abap.Classes['ZCL_ABAPGIT_WEB'].handle({ii_request: this.me, ii_response: this.me});
} catch (e) {
if ((abap.Classes['CX_STATIC_CHECK'] && e instanceof abap.Classes['CX_STATIC_CHECK'])) {
abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.IntegerFactory.get(2)));
} else {
throw e;
}
}
}
}
abap.Classes['ZCL_ABAPGIT_WEB_SICF'] = zcl_abapgit_web_sicf;
zcl_abapgit_web_sicf.if_http_extension$co_flow_ok = new abap.types.Integer({qualifiedName: "I"});
zcl_abapgit_web_sicf.if_http_extension$co_flow_ok.set(0);
zcl_abapgit_web_sicf.if_http_extension$co_flow_ok_others_mand = new abap.types.Integer({qualifiedName: "I"});
zcl_abapgit_web_sicf.if_http_extension$co_flow_ok_others_mand.set(2);
export {zcl_abapgit_web_sicf}; |