-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add ORSR eforms #374
Conversation
@celuchmarek vies ukazat ako vyzera nejaka taka vizualizacia orsr formulara? |
@jsuchal všetky vyzerajú rovnako, len majú iný obsah. Šírku máme zjavne nastavenú celkom ok. |
@@ -234,6 +236,7 @@ private static SigningParameters buildParameters(SignatureLevel level, ASiCConta | |||
packaging = eformAttributes.packaging(); | |||
xsdIdentifier = eformAttributes.xsdIdentifier(); | |||
xsltParams = eformAttributes.xsltParams(); | |||
embedUsedSchemas |= eformAttributes.embedUsedSchemas(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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();
src/main/java/digital/slovensko/autogram/core/eforms/EFormUtils.java
Outdated
Show resolved
Hide resolved
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
Trochu je to kostrbaté, ešte to trošku upracem. Ale funguje.