Add SignedDocumentReference datatype - #96
Open
AndreasHaaversen wants to merge 1 commit into
Open
Conversation
References the UUID of the signed document delivered after a signing request completes. Intended to be attached as Metadata on the original signing-request document so consumers can link the request to the resulting signed document. Adds SignedDocumentReference to the @ComplementedBy annotation on SigningRequest, so it can only be attached to documents that already have a SigningRequest metadata type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AndreasHaaversen
force-pushed
the
signed-document-reference
branch
from
August 7, 2026 15:18
2cdd4b6 to
fa6d391
Compare
Comment on lines
+22
to
+29
| public class SignedDocumentReference implements DataType { | ||
|
|
||
| @XmlElement(name = "document-uuid", required = true) | ||
| @Description("UUID of the delivered signed document.") | ||
| @NotNull | ||
| UUID documentUuid; | ||
|
|
||
| public static final SignedDocumentReference EXAMPLE = new SignedDocumentReference(UUID.fromString("b9d67195-6ac3-4a5e-a4d8-f5b7c2e3d1a0")); |
Contributor
There was a problem hiding this comment.
Tenker at datatypen egt. kan gjøres helt generisk, siden vi bare lenker til et dokument brukeren har mottatt i Digipost.
Så typ bare rename til DocumentReference og oppdatere annotasjonene.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SignedDocumentReferenceto theno.digipost.api.datatypes.types.signingpackageDataTypeIdentifier.SIGNED_DOCUMENT_REFERENCE(short nameSGDR)DataType(@JsonSubTypes) andjaxb.indexso JSON/XML serialization works out of the boxBackground
When a signing request is completed, the resulting signed document is delivered as a separate document. This type is attached as
Metadataon the original signing-request document and holds thedocumentUuidof the delivered signed document, giving consumers a stable link between the two.This is a reference/pointer type (not an event), in deliberate contrast to the event-oriented
SigningCompletedBy/SigningRejectedBytypes in the same package.Test plan
mvn testpasses (all 45 tests green with Java 21)DataTypeIdentifierround-trip lookup works (covered byDataTypeIdentifierTest)JAXBIndexTest)MarshallingTest(exercises all registered subtypes viaDataType.EXAMPLE)