Page History
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public Association createAssociation(SubmissionSet submissionSet, DocumentEntry documentEntry) { // Opret association mellem SubmissionSet og DocumentEntry Association association = new Association(); association.setAssociationType(AssociationType.HAS_MEMBER); association.setEntryUuid(generateUUID()); association.setSourceUuid(submissionSet.getEntryUuid()); association.setTargetUuid(documentEntry.getEntryUuid()); association.setAvailabilityStatus(AvailabilityStatus.APPROVED); association.setLabel(AssociationLabel.ORIGINAL); return association; } |
Når kaldet er udført, tjekkes om alt gik, som det skulle:
Code Block | ||||
---|---|---|---|---|
| ||||
Code Block | ||||
language | java | linenumbers | true public void handleResponse(RegistryResponseType registryResponse) {
if (registryResponse.getStatus().equals(Status.SUCCESS.getOpcode30()) ) {
// Kaldet gik godt
} else {
// Der er fejl i kaldet, håndter dem
for (RegistryError error : registryResponse.getRegistryErrorList().getRegistryError()) {
}
}
} |
I requestet nedenfor ses selve dokumentet (som MTOM attachment) samt de specificerede metadata (den del af requestet, der er i tag SubmitObjectsRequest).
...