All files / output zcl_abapgit_html_parts.clas.mjs

98.38% Statements 122/124
85.71% Branches 18/21
47.82% Functions 11/23
98.38% Lines 122/124

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 1241x 1x 1x 1x 1x 1x 1x   1x 1x   1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 1x 1x 1x 1x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 2x 2x 2x 9x 9x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 2x 2x 3x 3x 1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 2x 2x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_html_parts.clas.abap
class zcl_abapgit_html_parts {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_HTML_PARTS';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MT_PART_COLLECTIONS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
  "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "zcl_abapgit_html_parts=>ty_named_collections");}, "visibility": "I", "is_constant": " ", "is_class": " "}};
  static METHODS = {"GET_COLLECTION": {"visibility": "I", "parameters": {"RR_COLLECTION": {"type": () => {return new abap.types.DataReference(new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
  "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}));}, "is_optional": " "}, "IV_COLLECTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_CREATE_IF_MISSING": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}},
  "ADD_PART": {"visibility": "U", "parameters": {"IV_COLLECTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "II_PART": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});}, "is_optional": " "}}},
  "GET_PARTS": {"visibility": "U", "parameters": {"RT_PARTS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of");}, "is_optional": " "}, "IV_COLLECTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}},
  "GET_COLLECTION_NAMES": {"visibility": "U", "parameters": {"RT_LIST": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");}, "is_optional": " "}}},
  "GET_COLLECTION_SIZE": {"visibility": "U", "parameters": {"RV_SIZE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "IV_COLLECTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}},
  "CLEAR": {"visibility": "U", "parameters": {}}};
  #mt_part_collections;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "get_collection": this.#get_collection.bind(this),
      "add_part": this.add_part.bind(this),
      "get_parts": this.get_parts.bind(this),
      "get_collection_names": this.get_collection_names.bind(this),
      "get_collection_size": this.get_collection_size.bind(this),
      "clear": this.clear.bind(this),
    };
    this.#mt_part_collections = abap.types.TableFactory.construct(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
    "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "zcl_abapgit_html_parts=>ty_named_collections");
    this.FRIENDS_ACCESS_INSTANCE["mt_part_collections"] = this.#mt_part_collections;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async add_part(INPUT) {
    let iv_collection = INPUT?.iv_collection;
    if (iv_collection?.getQualifiedName === undefined || iv_collection.getQualifiedName() !== "STRING") { iv_collection = undefined; }
    if (iv_collection === undefined) { iv_collection = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_collection); }
    let ii_part = INPUT?.ii_part;
    if (ii_part?.getQualifiedName === undefined || ii_part.getQualifiedName() !== "ZIF_ABAPGIT_HTML") { ii_part = undefined; }
    if (ii_part === undefined) { ii_part = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}).set(INPUT.ii_part); }
    let lr_collection = new abap.types.DataReference(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
    "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}));
    lr_collection.set((await this.#get_collection({iv_collection: iv_collection, iv_create_if_missing: abap.builtin.abap_true})));
    abap.statements.append({source: ii_part, target: lr_collection.get().pile});
  }
  async clear() {
    this.#mt_part_collections.clear();
  }
  async #get_collection(INPUT) {
    let rr_collection = new abap.types.DataReference(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
    "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}));
    let iv_collection = INPUT?.iv_collection;
    if (iv_collection?.getQualifiedName === undefined || iv_collection.getQualifiedName() !== "STRING") { iv_collection = undefined; }
    if (iv_collection === undefined) { iv_collection = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_collection); }
    let iv_create_if_missing = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.iv_create_if_missing) {iv_create_if_missing.set(INPUT.iv_create_if_missing);}
    if (INPUT === undefined || INPUT.iv_create_if_missing === undefined) {iv_create_if_missing = abap.builtin.abap_false;}
    abap.statements.readTable(this.#mt_part_collections,{referenceInto: rr_collection,
      withKey: (i) => {return abap.compare.eq(i.name, iv_collection);},
      withKeyValue: [{key: (i) => {return i.name}, value: iv_collection}],
      usesTableLine: false,
      withKeySimple: {"name": iv_collection}});
    if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)) && abap.compare.eq(iv_create_if_missing, abap.builtin.abap_true)) {
      rr_collection.assign(this.#mt_part_collections.appendInitial());
      rr_collection.get().name.set(iv_collection);
    }
    return rr_collection;
  }
  async get_collection_names() {
    let rt_list = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");
    let fs_ls_coll_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
    "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}));
    for await (const unique692 of abap.statements.loop(this.#mt_part_collections)) {
      fs_ls_coll_.assign(unique692);
      abap.statements.append({source: fs_ls_coll_.get().name, target: rt_list});
    }
    return rt_list;
  }
  async get_collection_size(INPUT) {
    let rv_size = new abap.types.Integer({qualifiedName: "I"});
    let iv_collection = INPUT?.iv_collection;
    if (iv_collection?.getQualifiedName === undefined || iv_collection.getQualifiedName() !== "STRING") { iv_collection = undefined; }
    if (iv_collection === undefined) { iv_collection = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_collection); }
    let lr_collection = new abap.types.DataReference(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
    "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}));
    lr_collection.set((await this.#get_collection({iv_collection: iv_collection})));
    if (abap.compare.initial(lr_collection) === false) {
      rv_size.set(abap.builtin.lines({val: lr_collection.get().pile}));
    }
    return rv_size;
  }
  async get_parts(INPUT) {
    let rt_parts = abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of");
    let iv_collection = INPUT?.iv_collection;
    if (iv_collection?.getQualifiedName === undefined || iv_collection.getQualifiedName() !== "STRING") { iv_collection = undefined; }
    if (iv_collection === undefined) { iv_collection = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_collection); }
    let lr_collection = new abap.types.DataReference(new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
    "pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}));
    lr_collection.set((await this.#get_collection({iv_collection: iv_collection})));
    if (abap.compare.initial(lr_collection) === false) {
      rt_parts.set(lr_collection.get().pile);
    }
    return rt_parts;
  }
}
abap.Classes['ZCL_ABAPGIT_HTML_PARTS'] = zcl_abapgit_html_parts;
zcl_abapgit_html_parts.ty_named_collection = new abap.types.Structure({
"name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
"pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {});
zcl_abapgit_html_parts.ty_named_collections = abap.types.TableFactory.construct(new abap.types.Structure({
"name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_HTML_PARTS=>TY_NAMED_COLLECTION-NAME"}),
"pile": abap.types.TableFactory.construct(new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_html=>ty_table_of")}, "zcl_abapgit_html_parts=>ty_named_collection", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["NAME"]},"secondary":[]}, "zcl_abapgit_html_parts=>ty_named_collections");
export {zcl_abapgit_html_parts};