All files / output zcl_abapgit_gui_page_chg_pckg.clas.mjs

7.28% Statements 43/590
66.66% Branches 2/3
4.54% Functions 1/22
7.28% Lines 43/590

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 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 5901x 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 1x 1x 1x 1x 1x
const {zcl_abapgit_gui_component} = await import("./zcl_abapgit_gui_component.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_gui_page_chg_pckg.clas.abap
class zcl_abapgit_gui_page_chg_pckg extends zcl_abapgit_gui_component {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_GUI_EVENT_HANDLER","ZIF_ABAPGIT_GUI_RENDERABLE"];
  static ATTRIBUTES = {"MI_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_FORM": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_VALIDATION_LOG": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MO_FORM_UTIL": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM_UTILS", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM_UTILS"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "C_ID": {"type": () => {return new abap.types.Structure({
  "old_package": new abap.types.String({qualifiedName: "STRING"}),
  "new_package": new abap.types.String({qualifiedName: "STRING"}),
  "remove_old": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"},
  "C_EVENT": {"type": () => {return new abap.types.Structure({
  "change_package": new abap.types.String({qualifiedName: "STRING"}),
  "choose_package_old": new abap.types.String({qualifiedName: "STRING"}),
  "choose_package_new": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"GET_FORM_SCHEMA": {"visibility": "I", "parameters": {"RO_FORM": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});}, "is_optional": " "}}},
  "INIT_FORM": {"visibility": "I", "parameters": {}},
  "VALIDATE_FORM": {"visibility": "I", "parameters": {"RO_VALIDATION_LOG": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}, "IO_FORM_DATA": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});}, "is_optional": " "}}},
  "CHANGE_PACKAGE": {"visibility": "I", "parameters": {"IV_OLD_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}, "IV_NEW_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}, "IV_REMOVE_OLD": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}},
  "GET_PACKAGE_MAPPING": {"visibility": "I", "parameters": {"RT_MAPPING": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");}, "is_optional": " "}, "IV_OLD_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}, "IV_NEW_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}}},
  "CREATE_PACKAGE_HIERARCHY": {"visibility": "I", "parameters": {"IT_MAPPING": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");}, "is_optional": " "}}},
  "DELETE_PACKAGES": {"visibility": "I", "parameters": {"IT_TADIR": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "pgmid": new abap.types.Character(4, {}),
  "object": new abap.types.Character(4, {}),
  "obj_name": new abap.types.Character(40, {}),
  "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "korrnum": new abap.types.Character(10, {}),
  "delflag": new abap.types.Character(1, {}),
  "genflag": new abap.types.Character(1, {}),
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
  "srcsystem": new abap.types.Character(5, {}),
  "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt");}, "is_optional": " "}}},
  "CHANGE_PACKAGE_ASSIGNMENT": {"visibility": "I", "parameters": {"IT_MAPPING": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");}, "is_optional": " "}, "IT_TADIR": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "pgmid": new abap.types.Character(4, {}),
  "object": new abap.types.Character(4, {}),
  "obj_name": new abap.types.Character(40, {}),
  "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "korrnum": new abap.types.Character(10, {}),
  "delflag": new abap.types.Character(1, {}),
  "genflag": new abap.types.Character(1, {}),
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
  "srcsystem": new abap.types.Character(5, {}),
  "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt");}, "is_optional": " "}}},
  "UPDATE_SOTR_PACKAGE_ASSIGNMENT": {"visibility": "I", "parameters": {"IT_MAPPING": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");}, "is_optional": " "}}},
  "UPDATE_REPO_PERSISTENCE": {"visibility": "I", "parameters": {"IV_OLD_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}, "IV_NEW_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}}},
  "UPDATE_REPO_CHECKSUMS": {"visibility": "I", "parameters": {"IT_MAPPING": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");}, "is_optional": " "}}},
  "CREATE": {"visibility": "U", "parameters": {"RI_PAGE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"});}, "is_optional": " "}, "II_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "is_optional": " "}}},
  "CONSTRUCTOR": {"visibility": "U", "parameters": {"II_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "is_optional": " "}}}};
  #mi_repo;
  #mo_form;
  #mo_form_data;
  #mo_validation_log;
  #mo_form_util;
  constructor() {
    const sup = super();
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "SUPER": sup.FRIENDS_ACCESS_INSTANCE,
      "get_form_schema": this.#get_form_schema.bind(this),
      "init_form": this.#init_form.bind(this),
      "validate_form": this.#validate_form.bind(this),
      "change_package": this.#change_package.bind(this),
      "get_package_mapping": this.#get_package_mapping.bind(this),
      "create_package_hierarchy": this.#create_package_hierarchy.bind(this),
      "delete_packages": this.#delete_packages.bind(this),
      "change_package_assignment": this.#change_package_assignment.bind(this),
      "update_sotr_package_assignment": this.#update_sotr_package_assignment.bind(this),
      "update_repo_persistence": this.#update_repo_persistence.bind(this),
      "update_repo_checksums": this.#update_repo_checksums.bind(this),
    };
    this.#mi_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});
    this.FRIENDS_ACCESS_INSTANCE["mi_repo"] = this.#mi_repo;
    this.#mo_form = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});
    this.FRIENDS_ACCESS_INSTANCE["mo_form"] = this.#mo_form;
    this.#mo_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    this.FRIENDS_ACCESS_INSTANCE["mo_form_data"] = this.#mo_form_data;
    this.#mo_validation_log = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    this.FRIENDS_ACCESS_INSTANCE["mo_validation_log"] = this.#mo_validation_log;
    this.#mo_form_util = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM_UTILS", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM_UTILS"});
    this.FRIENDS_ACCESS_INSTANCE["mo_form_util"] = this.#mo_form_util;
    this.c_id = zcl_abapgit_gui_page_chg_pckg.c_id;
    this.c_event = zcl_abapgit_gui_page_chg_pckg.c_event;
  }
  async #change_package(INPUT) {
    let iv_old_package = INPUT?.iv_old_package;
    if (iv_old_package?.getQualifiedName === undefined || iv_old_package.getQualifiedName() !== "DEVCLASS") { iv_old_package = undefined; }
    if (iv_old_package === undefined) { iv_old_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_old_package); }
    let iv_new_package = INPUT?.iv_new_package;
    if (iv_new_package?.getQualifiedName === undefined || iv_new_package.getQualifiedName() !== "DEVCLASS") { iv_new_package = undefined; }
    if (iv_new_package === undefined) { iv_new_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_new_package); }
    let iv_remove_old = INPUT?.iv_remove_old;
    if (iv_remove_old?.getQualifiedName === undefined || iv_remove_old.getQualifiedName() !== "ABAP_BOOL") { iv_remove_old = undefined; }
    if (iv_remove_old === undefined) { iv_remove_old = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.iv_remove_old); }
    let lt_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");
    let lt_tadir = abap.types.TableFactory.construct(new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt");
    abap.statements.assert(abap.compare.ne(iv_old_package, iv_new_package));
    lt_mapping.set((await this.#get_package_mapping({iv_old_package: iv_old_package, iv_new_package: iv_new_package})));
    lt_tadir.set((await this.#mi_repo.get().zif_abapgit_repo$get_tadir_objects()));
    await this.#create_package_hierarchy({it_mapping: lt_mapping});
    await this.#change_package_assignment({it_mapping: lt_mapping, it_tadir: lt_tadir});
    await this.#update_sotr_package_assignment({it_mapping: lt_mapping});
    await this.#update_repo_persistence({iv_old_package: iv_old_package, iv_new_package: iv_new_package});
    await this.#update_repo_checksums({it_mapping: lt_mapping});
    if (abap.compare.eq(iv_remove_old, abap.builtin.abap_true)) {
      await this.#delete_packages({it_tadir: lt_tadir});
    }
    await (await abap.Classes['ZCL_ABAPGIT_REPO_SRV'].get_instance()).get().zif_abapgit_repo_srv$init();
  }
  async #change_package_assignment(INPUT) {
    let it_mapping = INPUT?.it_mapping;
    if (it_mapping?.getQualifiedName === undefined || it_mapping.getQualifiedName() !== "ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG=>TY_MAPPING") { it_mapping = undefined; }
    if (it_mapping === undefined) { it_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping").set(INPUT.it_mapping); }
    let it_tadir = INPUT?.it_tadir;
    if (it_tadir?.getQualifiedName === undefined || it_tadir.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR_TT") { it_tadir = undefined; }
    if (it_tadir === undefined) { it_tadir = abap.types.TableFactory.construct(new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt").set(INPUT.it_tadir); }
    let ls_tadir = new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {});
    let fs_ls_map_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}));
    for await (const unique932 of abap.statements.loop(it_tadir,{where: async (I) => {return abap.compare.ne(I.object, abap.CharacterFactory.get(4, 'DEVC')) && abap.compare.ne(I.object, abap.CharacterFactory.get(4, 'NSPC'));}})) {
      ls_tadir.set(unique932);
      abap.statements.readTable(it_mapping,{assigning: fs_ls_map_,
        withKey: (i) => {return abap.compare.eq(i.old_package, ls_tadir.get().devclass);},
        withKeyValue: [{key: (i) => {return i.old_package}, value: ls_tadir.get().devclass}],
        usesTableLine: false,
        withKeySimple: {"old_package": ls_tadir.get().devclass}});
      abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)));
      await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_tadir()).get().zif_abapgit_tadir$insert_single({iv_pgmid: ls_tadir.get().pgmid, iv_object: ls_tadir.get().object, iv_obj_name: ls_tadir.get().obj_name, iv_package: fs_ls_map_.get().new_package});
    }
  }
  async constructor_(INPUT) {
    let ii_repo = INPUT?.ii_repo;
    if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; }
    if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); }
    await super.constructor_();
    this.#mi_repo.set(ii_repo);
    this.#mo_validation_log.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_());
    this.#mo_form_data.set(await (new abap.Classes['ZCL_ABAPGIT_STRING_MAP']()).constructor_());
    this.#mo_form.set((await this.#get_form_schema()));
    this.#mo_form_util.set((await abap.Classes['ZCL_ABAPGIT_HTML_FORM_UTILS'].create({io_form: this.#mo_form})));
    if (abap.compare.ne((await (await this.#mi_repo.get().zif_abapgit_repo$get_dot_abapgit()).get().get_folder_logic()), abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_folder_logic.get().prefix)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: abap.CharacterFactory.get(63, 'Feature is only supported repositories with prefix folder logic')});
    }
    if (abap.compare.eq((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_cts_api()).get().zif_abapgit_cts_api$is_chrec_possible_for_package({iv_package: (await this.#mi_repo.get().zif_abapgit_repo$get_package())})), abap.builtin.abap_true)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: abap.CharacterFactory.get(55, 'Feature is only supported local packages (no transport)')});
    }
    return this;
  }
  async create(INPUT) {
    return zcl_abapgit_gui_page_chg_pckg.create(INPUT);
  }
  static async create(INPUT) {
    let ri_page = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"});
    let ii_repo = INPUT?.ii_repo;
    if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; }
    if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); }
    let lo_component = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG", RTTIName: "\\CLASS=ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG"});
    lo_component.set(await (new abap.Classes['ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG']()).constructor_({ii_repo: ii_repo}));
    ri_page.set((await abap.Classes['ZCL_ABAPGIT_GUI_PAGE_HOC'].create({iv_page_title: abap.CharacterFactory.get(25, 'Change Repository Package'), ii_child_component: lo_component})));
    return ri_page;
  }
  async #create_package_hierarchy(INPUT) {
    let it_mapping = INPUT?.it_mapping;
    if (it_mapping?.getQualifiedName === undefined || it_mapping.getQualifiedName() !== "ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG=>TY_MAPPING") { it_mapping = undefined; }
    if (it_mapping === undefined) { it_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping").set(INPUT.it_mapping); }
    let ls_package = new abap.types.Structure({
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "dlvunit": new abap.types.Character(30, {"description":"DLVUNIT"}),
    "component": new abap.types.Character(20, {"qualifiedName":"zif_abapgit_sap_package=>ty_create-component"}),
    "ctext": new abap.types.Character(60, {"qualifiedName":"zif_abapgit_sap_package=>ty_create-ctext"}),
    "parentcl": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "pdevclass": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_sap_package=>ty_create-pdevclass"}),
    "as4user": new abap.types.Character(12, {"qualifiedName":"USNAM","ddicName":"USNAM","description":"USNAM"})}, "zif_abapgit_sap_package=>ty_create", undefined, {}, {});
    let ls_map = new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {});
    let fs_ls_map_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}));
    for await (const unique933 of abap.statements.loop(it_mapping)) {
      fs_ls_map_.assign(unique933);
      ls_package.set((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_sap_package({iv_package: fs_ls_map_.get().old_package})).get().zif_abapgit_sap_package$get()));
      ls_package.get().devclass.set(fs_ls_map_.get().new_package);
      ls_package.get().as4user.set(abap.builtin.sy.get().uname);
      abap.statements.readTable(it_mapping,{into: ls_map,
        withKey: (i) => {return abap.compare.eq(i.old_package, ls_package.get().parentcl);},
        withKeyValue: [{key: (i) => {return i.old_package}, value: ls_package.get().parentcl}],
        usesTableLine: false,
        withKeySimple: {"old_package": ls_package.get().parentcl}});
      if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        ls_package.get().parentcl.set(ls_map.get().new_package);
      }
      await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_sap_package({iv_package: ls_map.get().new_package})).get().zif_abapgit_sap_package$create({is_package: ls_package});
    }
  }
  async #delete_packages(INPUT) {
    let it_tadir = INPUT?.it_tadir;
    if (it_tadir?.getQualifiedName === undefined || it_tadir.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR_TT") { it_tadir = undefined; }
    if (it_tadir === undefined) { it_tadir = abap.types.TableFactory.construct(new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt").set(INPUT.it_tadir); }
    let lt_tadir = abap.types.TableFactory.construct(new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt");
    lt_tadir.set(it_tadir);
    await abap.statements.deleteInternal(lt_tadir,{where: async (I) => {return abap.compare.ne(I.object, abap.CharacterFactory.get(4, 'DEVC'));}});
    abap.statements.sort(lt_tadir,{by: [{component: "obj_name"}]});
    await abap.Classes['ZCL_ABAPGIT_OBJECTS'].delete({it_tadir: lt_tadir});
  }
  async #get_form_schema() {
    let ro_form = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_HTML_FORM", RTTIName: "\\CLASS=ZCL_ABAPGIT_HTML_FORM"});
    ro_form.set((await abap.Classes['ZCL_ABAPGIT_HTML_FORM'].create({iv_form_id: abap.CharacterFactory.get(14, 'change-package')})));
    await (await (await (await (await ro_form.get().text({iv_name: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package, iv_label: abap.CharacterFactory.get(11, 'New Package'), iv_required: abap.builtin.abap_true, iv_upper_case: abap.builtin.abap_true, iv_side_action: zcl_abapgit_gui_page_chg_pckg.c_event.get().choose_package_new, iv_max: abap.IntegerFactory.get(30)})).get().text({iv_name: zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package, iv_label: abap.CharacterFactory.get(11, 'Old Package'), iv_readonly: abap.builtin.abap_true, iv_required: abap.builtin.abap_true, iv_upper_case: abap.builtin.abap_true, iv_side_action: zcl_abapgit_gui_page_chg_pckg.c_event.get().choose_package_old, iv_max: abap.IntegerFactory.get(30)})).get().checkbox({iv_name: zcl_abapgit_gui_page_chg_pckg.c_id.get().remove_old, iv_label: abap.CharacterFactory.get(19, 'Delete Old Packages')})).get().command({iv_label: abap.CharacterFactory.get(14, 'Change Package'), iv_action: zcl_abapgit_gui_page_chg_pckg.c_event.get().change_package, iv_cmd_type: abap.Classes['ZIF_ABAPGIT_HTML_FORM'].zif_abapgit_html_form$c_cmd_type.get().input_main})).get().command({iv_label: abap.CharacterFactory.get(4, 'Back'), iv_action: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_back});
    return ro_form;
  }
  async #get_package_mapping(INPUT) {
    let rt_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");
    let iv_old_package = INPUT?.iv_old_package;
    if (iv_old_package?.getQualifiedName === undefined || iv_old_package.getQualifiedName() !== "DEVCLASS") { iv_old_package = undefined; }
    if (iv_old_package === undefined) { iv_old_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_old_package); }
    let iv_new_package = INPUT?.iv_new_package;
    if (iv_new_package?.getQualifiedName === undefined || iv_new_package.getQualifiedName() !== "DEVCLASS") { iv_new_package = undefined; }
    if (iv_new_package === undefined) { iv_new_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_new_package); }
    let lt_old_packages = abap.types.TableFactory.construct(new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_sap_package=>ty_devclass_tt");
    let lv_old_package = new abap.types.String({qualifiedName: "STRING"});
    let lv_new_package = new abap.types.String({qualifiedName: "STRING"});
    let fs_ls_map_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}));
    if (abap.compare.eq(((await this.#mi_repo.get().zif_abapgit_repo$get_local_settings())).get().ignore_subpackages, abap.builtin.abap_false)) {
      lt_old_packages.set((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_sap_package({iv_package: iv_old_package})).get().zif_abapgit_sap_package$list_subpackages()));
    }
    abap.statements.insertInternal({data: iv_old_package, table: lt_old_packages});
    for await (const unique934 of abap.statements.loop(lt_old_packages)) {
      lv_old_package.set(unique934);
      lv_new_package.set(lv_old_package);
      abap.statements.replace({target: lv_new_package, all: false, with: iv_new_package, of: iv_old_package});
      if (abap.compare.gt(abap.builtin.strlen({val: lv_new_package}), abap.IntegerFactory.get(30))) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Package ${abap.templateFormatting(lv_new_package)} longer than 30 characters`)});
      }
      if (abap.compare.eq((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_sap_package({iv_package: new abap.types.String().set(`${abap.templateFormatting(lv_new_package)}`)})).get().zif_abapgit_sap_package$exists()), abap.builtin.abap_true)) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Package ${abap.templateFormatting(lv_new_package)} already exists`)});
      }
      fs_ls_map_.assign(rt_mapping.appendInitial());
      fs_ls_map_.get().old_package.set(lv_old_package);
      fs_ls_map_.get().new_package.set(lv_new_package);
    }
    abap.statements.sort(rt_mapping,{});
    return rt_mapping;
  }
  async #init_form() {
    await this.#mo_form_data.get().set({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package, iv_val: (await this.#mi_repo.get().zif_abapgit_repo$get_package())});
    await this.#mo_form_data.get().set({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().remove_old, iv_val: abap.builtin.abap_true});
  }
  async #update_repo_checksums(INPUT) {
    let it_mapping = INPUT?.it_mapping;
    if (it_mapping?.getQualifiedName === undefined || it_mapping.getQualifiedName() !== "ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG=>TY_MAPPING") { it_mapping = undefined; }
    if (it_mapping === undefined) { it_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping").set(INPUT.it_mapping); }
    let lv_key = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"});
    let lo_checksums = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_REPO_CHECKSUMS", RTTIName: "\\CLASS=ZCL_ABAPGIT_REPO_CHECKSUMS"});
    let lt_checksums = abap.types.TableFactory.construct(new abap.types.Structure({
    "item": 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"})}, "zif_abapgit_definitions=>ty_item_signature", undefined, {}, {}),
    "files": abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_git_definitions=>ty_file_signatures_tt")}, "zif_abapgit_persistence=>ty_local_checksum", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_persistence=>ty_local_checksum_tt");
    let fs_ls_checksum_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "item": 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"})}, "zif_abapgit_definitions=>ty_item_signature", undefined, {}, {}),
    "files": abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_git_definitions=>ty_file_signatures_tt")}, "zif_abapgit_persistence=>ty_local_checksum", undefined, {}, {}));
    let fs_ls_map_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}));
    lv_key.set((await this.#mi_repo.get().zif_abapgit_repo$get_key()));
    lo_checksums.set(await (new abap.Classes['ZCL_ABAPGIT_REPO_CHECKSUMS']()).constructor_({iv_repo_key: lv_key}));
    lt_checksums.set((await lo_checksums.get().zif_abapgit_repo_checksums$get()));
    for await (const unique935 of abap.statements.loop(lt_checksums,{where: async (I) => {return abap.compare.initial(I.item.get().devclass) === false;}})) {
      fs_ls_checksum_.assign(unique935);
      abap.statements.readTable(it_mapping,{assigning: fs_ls_map_,
        withKey: (i) => {return abap.compare.eq(i.old_package, fs_ls_checksum_.get().item.get().devclass);},
        withKeyValue: [{key: (i) => {return i.old_package}, value: fs_ls_checksum_.get().item.get().devclass}],
        usesTableLine: false,
        withKeySimple: {"old_package": fs_ls_checksum_.get().item.get().devclass}});
      abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)));
      fs_ls_checksum_.get().item.get().devclass.set(fs_ls_map_.get().new_package);
    }
    await lo_checksums.get().force_write({it_checksums: lt_checksums});
  }
  async #update_repo_persistence(INPUT) {
    let iv_old_package = INPUT?.iv_old_package;
    if (iv_old_package?.getQualifiedName === undefined || iv_old_package.getQualifiedName() !== "DEVCLASS") { iv_old_package = undefined; }
    if (iv_old_package === undefined) { iv_old_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_old_package); }
    let iv_new_package = INPUT?.iv_new_package;
    if (iv_new_package?.getQualifiedName === undefined || iv_new_package.getQualifiedName() !== "DEVCLASS") { iv_new_package = undefined; }
    if (iv_new_package === undefined) { iv_new_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_new_package); }
    let lv_key = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"});
    let lo_persist = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_PERSIST_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_PERSIST_REPO"});
    let ls_repo_data = new abap.types.Structure({
    "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}),
    "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-URL"}),
    "branch_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-BRANCH_NAME"}),
    "selected_commit": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "created_by": new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}),
    "created_at": new abap.types.Packed({length: 21, decimals: 7, qualifiedName: "TIMESTAMPL"}),
    "deserialized_by": new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}),
    "deserialized_at": new abap.types.Packed({length: 21, decimals: 7, qualifiedName: "TIMESTAMPL"}),
    "offline": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "switched_origin": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-SWITCHED_ORIGIN"}),
    "dot_abapgit": new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-NAME"}),
    "master_language": new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"}),
    "i18n_languages": abap.types.TableFactory.construct(new abap.types.Character(2, {"qualifiedName":"LAISO","ddicName":"LAISO","description":"LAISO"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_languages"),
    "use_lxe": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "without_translation": abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_dot_abapgit=>ty_dot_abapgit-without_translation"),
    "starting_folder": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-STARTING_FOLDER"}),
    "folder_logic": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-FOLDER_LOGIC"}),
    "ignore": abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_dot_abapgit=>ty_dot_abapgit-ignore"),
    "requirements": abap.types.TableFactory.construct(new abap.types.Structure({
    "component": new abap.types.Character(30, {"description":"DLVUNIT"}),
    "min_release": new abap.types.Character(10, {"qualifiedName":"SAPRELEASE","ddicName":"SAPRELEASE","description":"SAPRELEASE"}),
    "min_patch": new abap.types.Character(10, {"qualifiedName":"SAPPATCHLV","ddicName":"SAPPATCHLV","description":"SAPPATCHLV"})}, "zif_abapgit_dot_abapgit=>ty_requirement", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_dot_abapgit=>ty_requirement_tt"),
    "version_constant": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-VERSION_CONSTANT"}),
    "abap_language_version": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-ABAP_LANGUAGE_VERSION"}),
    "original_system": new abap.types.Character(5, {})}, "zif_abapgit_dot_abapgit=>ty_dot_abapgit", undefined, {}, {}),
    "head_branch": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-HEAD_BRANCH"}),
    "local_settings": new abap.types.Structure({
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_LOCAL_SETTINGS-DISPLAY_NAME"}),
    "ignore_subpackages": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "write_protected": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "only_local_objects": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "code_inspector_check_variant": new abap.types.Character(30, {"qualifiedName":"SCI_CHKV","ddicName":"SCI_CHKV","description":"SCI_CHKV"}),
    "block_commit": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "main_language_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "suppress_lxe_po_comments": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "labels": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_LOCAL_SETTINGS-LABELS"}),
    "transport_request": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "customizing_request": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "flow": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "exclude_remote_paths": 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")}, "zif_abapgit_persistence=>ty_local_settings", undefined, {}, {})}, "zif_abapgit_persistence=>ty_repo", undefined, {}, {});
    let ls_meta = new abap.types.Structure({
    "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-URL"}),
    "branch_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-BRANCH_NAME"}),
    "selected_commit": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "created_by": new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}),
    "created_at": new abap.types.Packed({length: 21, decimals: 7, qualifiedName: "TIMESTAMPL"}),
    "deserialized_by": new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}),
    "deserialized_at": new abap.types.Packed({length: 21, decimals: 7, qualifiedName: "TIMESTAMPL"}),
    "offline": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "switched_origin": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-SWITCHED_ORIGIN"}),
    "dot_abapgit": new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-NAME"}),
    "master_language": new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"}),
    "i18n_languages": abap.types.TableFactory.construct(new abap.types.Character(2, {"qualifiedName":"LAISO","ddicName":"LAISO","description":"LAISO"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_languages"),
    "use_lxe": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "without_translation": abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_dot_abapgit=>ty_dot_abapgit-without_translation"),
    "starting_folder": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-STARTING_FOLDER"}),
    "folder_logic": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-FOLDER_LOGIC"}),
    "ignore": abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_dot_abapgit=>ty_dot_abapgit-ignore"),
    "requirements": abap.types.TableFactory.construct(new abap.types.Structure({
    "component": new abap.types.Character(30, {"description":"DLVUNIT"}),
    "min_release": new abap.types.Character(10, {"qualifiedName":"SAPRELEASE","ddicName":"SAPRELEASE","description":"SAPRELEASE"}),
    "min_patch": new abap.types.Character(10, {"qualifiedName":"SAPPATCHLV","ddicName":"SAPPATCHLV","description":"SAPPATCHLV"})}, "zif_abapgit_dot_abapgit=>ty_requirement", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_dot_abapgit=>ty_requirement_tt"),
    "version_constant": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-VERSION_CONSTANT"}),
    "abap_language_version": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DOT_ABAPGIT=>TY_DOT_ABAPGIT-ABAP_LANGUAGE_VERSION"}),
    "original_system": new abap.types.Character(5, {})}, "zif_abapgit_dot_abapgit=>ty_dot_abapgit", undefined, {}, {}),
    "head_branch": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_REPO_XML-HEAD_BRANCH"}),
    "local_settings": new abap.types.Structure({
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_LOCAL_SETTINGS-DISPLAY_NAME"}),
    "ignore_subpackages": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "write_protected": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "only_local_objects": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "code_inspector_check_variant": new abap.types.Character(30, {"qualifiedName":"SCI_CHKV","ddicName":"SCI_CHKV","description":"SCI_CHKV"}),
    "block_commit": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "main_language_only": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "suppress_lxe_po_comments": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "labels": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_PERSISTENCE=>TY_LOCAL_SETTINGS-LABELS"}),
    "transport_request": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "customizing_request": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "flow": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "exclude_remote_paths": 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")}, "zif_abapgit_persistence=>ty_local_settings", undefined, {}, {})}, "zif_abapgit_persistence=>ty_repo_xml", undefined, {}, {});
    let ls_change_mask = new abap.types.Structure({
    "url": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "branch_name": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "selected_commit": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "package": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "created_by": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "created_at": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "deserialized_by": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "deserialized_at": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "offline": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "switched_origin": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "dot_abapgit": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "head_branch": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "local_settings": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_persistence=>ty_repo_meta_mask", undefined, {}, {});
    lv_key.set((await this.#mi_repo.get().zif_abapgit_repo$get_key()));
    lo_persist.set((await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_repo()));
    try {
      ls_repo_data.set((await lo_persist.get().zif_abapgit_persist_repo$read({iv_key: lv_key})));
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_NOT_FOUND'] && e instanceof abap.Classes['ZCX_ABAPGIT_NOT_FOUND'])) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: abap.CharacterFactory.get(20, 'Repository not found')});
      } else {
        throw e;
      }
    }
    abap.statements.assert(abap.compare.eq(ls_repo_data.get().package, iv_old_package));
    ls_repo_data.get().package.set(iv_new_package);
    abap.statements.moveCorresponding(ls_repo_data, ls_meta);
    ls_change_mask.get().package.set(abap.builtin.abap_true);
    await lo_persist.get().zif_abapgit_persist_repo$update_metadata({iv_key: lv_key, is_meta: ls_meta, is_change_mask: ls_change_mask});
  }
  async #update_sotr_package_assignment(INPUT) {
    let it_mapping = INPUT?.it_mapping;
    if (it_mapping?.getQualifiedName === undefined || it_mapping.getQualifiedName() !== "ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG=>TY_MAPPING") { it_mapping = undefined; }
    if (it_mapping === undefined) { it_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping").set(INPUT.it_mapping); }
    let fs_ls_map_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}));
    for await (const unique936 of abap.statements.loop(it_mapping)) {
      fs_ls_map_.assign(unique936);
      await abap.Classes['ZCL_ABAPGIT_SOTR_HANDLER'].change_sotr_package({iv_old_package: fs_ls_map_.get().old_package, iv_new_package: fs_ls_map_.get().new_package});
    }
  }
  async #validate_form(INPUT) {
    let ro_validation_log = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"});
    let io_form_data = INPUT?.io_form_data;
    if (io_form_data?.getQualifiedName === undefined || io_form_data.getQualifiedName() !== "ZCL_ABAPGIT_STRING_MAP") { io_form_data = undefined; }
    if (io_form_data === undefined) { io_form_data = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STRING_MAP", RTTIName: "\\CLASS=ZCL_ABAPGIT_STRING_MAP"}).set(INPUT.io_form_data); }
    let lv_new_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});
    ro_validation_log.set((await this.#mo_form_util.get().validate({io_form_data: io_form_data})));
    lv_new_package.set((await io_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package})));
    if (abap.compare.initial(lv_new_package) === false && abap.compare.eq(lv_new_package, (await io_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package})))) {
      await ro_validation_log.get().set({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package, iv_val: abap.CharacterFactory.get(46, 'New package must be different from old package')});
    }
    if (abap.compare.eq((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_cts_api()).get().zif_abapgit_cts_api$is_chrec_possible_for_package({iv_package: lv_new_package})), abap.builtin.abap_true)) {
      await ro_validation_log.get().set({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package, iv_val: abap.CharacterFactory.get(55, 'Feature is only supported local packages (no transport)')});
    }
    return ro_validation_log;
  }
  async zif_abapgit_gui_event_handler$on_event(INPUT) {
    let rs_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, {}, {});
    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); }
    this.#mo_form_data.set((await this.#mo_form_util.get().normalize({io_form_data: (await ii_event.get().zif_abapgit_gui_event$form_data())})));
    let unique937 = ii_event.get().zif_abapgit_gui_event$mv_action;
    if (abap.compare.eq(unique937, zcl_abapgit_gui_page_chg_pckg.c_event.get().change_package)) {
      this.#mo_validation_log.set((await this.#validate_form({io_form_data: this.#mo_form_data})));
      if (abap.compare.eq((await this.#mo_validation_log.get().is_empty()), abap.builtin.abap_false)) {
        rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().re_render);
      } else {
        await this.#change_package({iv_old_package: new abap.types.String().set(`${abap.templateFormatting((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package})))}`), iv_new_package: new abap.types.String().set(`${abap.templateFormatting((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package})))}`), iv_remove_old: new abap.types.String().set(`${abap.templateFormatting((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().remove_old})))}`)});
        await abap.statements.message({text: abap.CharacterFactory.get(28, 'Package successfully changed'), type: abap.CharacterFactory.get(1, 'S')});
        rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().go_back);
      }
    } else if (abap.compare.eq(unique937, zcl_abapgit_gui_page_chg_pckg.c_event.get().choose_package_old)) {
      await this.#mo_form_data.get().set({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package, iv_val: (await (await abap.Classes['ZCL_ABAPGIT_UI_FACTORY'].get_popups()).get().zif_abapgit_popups$popup_search_help({iv_tab_field: abap.CharacterFactory.get(14, 'TDEVC-DEVCLASS')}))});
      if (abap.compare.initial((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package}))) === false) {
        rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().re_render);
      } else {
        rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().no_more_act);
      }
    } else if (abap.compare.eq(unique937, zcl_abapgit_gui_page_chg_pckg.c_event.get().choose_package_new)) {
      await this.#mo_form_data.get().set({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package, iv_val: (await (await abap.Classes['ZCL_ABAPGIT_UI_FACTORY'].get_popups()).get().zif_abapgit_popups$popup_search_help({iv_tab_field: abap.CharacterFactory.get(14, 'TDEVC-DEVCLASS')}))});
      if (abap.compare.initial((await this.#mo_form_data.get().get({iv_key: zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package}))) === false) {
        rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().re_render);
      } else {
        rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().no_more_act);
      }
    }
    return rs_handled;
  }
  async zif_abapgit_gui_renderable$render() {
    let ri_html = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});
    await this.#init_form();
    await this.register_handlers();
    ri_html.set((await abap.Classes['ZCL_ABAPGIT_HTML'].create()));
    await ri_html.get().zif_abapgit_html$add({ig_chunk: (await this.#mo_form.get().render({io_values: this.#mo_form_data, io_validation_log: this.#mo_validation_log}))});
    return ri_html;
  }
}
abap.Classes['ZCL_ABAPGIT_GUI_PAGE_CHG_PCKG'] = zcl_abapgit_gui_page_chg_pckg;
zcl_abapgit_gui_page_chg_pckg.c_id = new abap.types.Structure({
"old_package": new abap.types.String({qualifiedName: "STRING"}),
"new_package": new abap.types.String({qualifiedName: "STRING"}),
"remove_old": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});
zcl_abapgit_gui_page_chg_pckg.c_id.get().old_package.set('old-package');
zcl_abapgit_gui_page_chg_pckg.c_id.get().new_package.set('new-package');
zcl_abapgit_gui_page_chg_pckg.c_id.get().remove_old.set('remove-old');
zcl_abapgit_gui_page_chg_pckg.c_event = new abap.types.Structure({
"change_package": new abap.types.String({qualifiedName: "STRING"}),
"choose_package_old": new abap.types.String({qualifiedName: "STRING"}),
"choose_package_new": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});
zcl_abapgit_gui_page_chg_pckg.c_event.get().change_package.set('change-package');
zcl_abapgit_gui_page_chg_pckg.c_event.get().choose_package_old.set('choose-package-old');
zcl_abapgit_gui_page_chg_pckg.c_event.get().choose_package_new.set('choose-package-new');
zcl_abapgit_gui_page_chg_pckg.ty_map = new abap.types.Structure({
"old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
"new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {});
zcl_abapgit_gui_page_chg_pckg.ty_mapping = abap.types.TableFactory.construct(new abap.types.Structure({
"old_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
"new_package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zcl_abapgit_gui_page_chg_pckg=>ty_map", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["OLD_PACKAGE"]},"secondary":[]}, "zcl_abapgit_gui_page_chg_pckg=>ty_mapping");
export {zcl_abapgit_gui_page_chg_pckg};