-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lagt til ny datatype: Signert dokument
Først og fremst tiltenkt brukt fra Postens signeringstjeneste, som sender inn kopier av PAdES etter at dokumenter har blitt signert.
- Loading branch information
Showing
4 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
45 changes: 45 additions & 0 deletions
45
src/main/java/no/digipost/api/datatypes/types/SignedDocument.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package no.digipost.api.datatypes.types; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Value; | ||
import lombok.experimental.Wither; | ||
import no.digipost.api.datatypes.DataType; | ||
import no.digipost.api.datatypes.documentation.Description; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import java.time.ZoneId; | ||
import java.time.ZonedDateTime; | ||
|
||
@XmlRootElement | ||
@Value | ||
@AllArgsConstructor | ||
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) | ||
@Wither | ||
@Description("Details about a signed document") | ||
public class SignedDocument implements DataType { | ||
|
||
@XmlElement(name = "document-issuer", required = true) | ||
@Description("The original issuer of the document to be signed.") | ||
String documentIssuer; | ||
|
||
@XmlElement(name = "document-subject", required = true) | ||
@Description("The original subject of the document to be signed.") | ||
String documentSubject; | ||
|
||
@XmlElement(name = "signing-time", required = true) | ||
@Description("When the recipient signed the document. ISO8601 full DateTime.") | ||
@NotNull | ||
ZonedDateTime signingTime; | ||
|
||
public static SignedDocument EXAMPLE = new SignedDocument( | ||
"Bedrift AS", | ||
"Ansettelseskontrakt", | ||
ZonedDateTime.of(2018, 7, 11, 10, 0, 0, 0, ZoneId.systemDefault()) | ||
); | ||
} | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ ExternalLink | |
Boligdetaljer | ||
receipt.Receipt | ||
Payslip | ||
SignedDocument |