Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ORSR eforms #374

Merged
merged 8 commits into from
Jan 29, 2024
Merged

Conversation

celuchmarek
Copy link
Member

Trochu je to kostrbaté, ešte to trošku upracem. Ale funguje.

@jsuchal
Copy link
Member

jsuchal commented Jan 9, 2024

@celuchmarek vies ukazat ako vyzera nejaka taka vizualizacia orsr formulara?

@celuchmarek
Copy link
Member Author

@jsuchal všetky vyzerajú rovnako, len majú iný obsah. Šírku máme zjavne nastavenú celkom ok.

image

@@ -234,6 +236,7 @@ private static SigningParameters buildParameters(SignatureLevel level, ASiCConta
packaging = eformAttributes.packaging();
xsdIdentifier = eformAttributes.xsdIdentifier();
xsltParams = eformAttributes.xsltParams();
embedUsedSchemas |= eformAttributes.embedUsedSchemas();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto je zvlastny zapis, preco je tu |= ? Nemalo by tu byt = ako vsade inde + default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretože pri ORSR formulári môže autoLoad zistiť, že je to ORSR formulár a musí mu nastaviť embedded schémy. Avšak, ak je to aj obyčajný formulár a chceme embedovať schémy, tak to neprepíše naspäť na false. To je skrátený zápis embedUsedSchemas = embedUsedSchemas || eformAttributes.embedUsedSchemas();

@@ -196,6 +198,11 @@ private ASiCContainerType getContainer() {
return container;
}

private boolean shouldAutoLoadEform() {
// justice.gov.sk Forms need to be auto-loaded to get the embedded xsd and xslt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tejto logike uplne nerozumiem. Nie je to rovnake ako pri inych forms? Proste ked neposles autoload a neposles ani xslt/schemu tak to vyhubuje?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto je výnimka kvôli podpisovaniu na slovensko.sk. Dáš podpísaný návrh na zmenu do prílohy a chceš pridať podpis ďalšieho človeka. Slovensko.sk to nijako zjavne nerieši, tak ti to pošle rovnako ako iné formuláre, ale s prázdnymi xsd a xslt.

Je chyba, že extrakcia xsd a xslt z xdc prebieha v autoLoadEform v EFormResources.java, pričom sa rozhoduje podľa identifikátora formulára a nie podľa toho, či v tom xdc už sú embedded alebo referenced schémy. Táto extrakcia by mala prebehnúť v SigningParameters::buildParameters ešte pred autoLoadEform. Toto upravím. Tým pádom jediná výnimka bude pre embedUsedSchemas, ktoré sa overridne na true vždy, ak je to ORSR formulár.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, trochu som to prerobil. Ak je to XDC (čo sa po novom zisťuje iba raz!), najprv sa skúsi, či to nie je embedded, potom sa ide normálne ďalej.

Copy link
Member

@jsuchal jsuchal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toto vyzera dobre, ale s mergom pockajme kym to aj realne niekde skusime. Mam tusaka, ze stary ORSR este moze mat vselijake vyhybky.

@celuchmarek celuchmarek merged commit 6ea90c1 into slovensko-digital:main Jan 29, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants