PeppolDocumentTypeIdAcronym(String identifier) { documentTypeIdentifier = DocumentTypeIdentifier.of(identifier); }
@Override public String toString() { return documentTypeIdentifier.toString(); }
public static DocumentTypeIdentifier of(String identifier, Scheme scheme) { return new DocumentTypeIdentifier(identifier, scheme); }
static Scope createScope(DocumentTypeIdentifier documentTypeIdentifier) { Scope scope = new Scope(); scope.setType("DOCUMENTID"); scope.setInstanceIdentifier(documentTypeIdentifier.getIdentifier()); if (!documentTypeIdentifier.getScheme().equals(DocumentTypeIdentifier.DEFAULT_SCHEME)) scope.setIdentifier(documentTypeIdentifier.getScheme().getIdentifier()); return scope; }
public Header toVefa() { PeppolDocumentTypeId documentTypeId = PeppolDocumentTypeId.valueOf(peppolDocumentTypeId.getIdentifier()); return Header.of( senderId, recipientId, profileTypeIdentifier, peppolDocumentTypeId, instanceId == null ? InstanceIdentifier.generateUUID() : instanceId.toVefa(), InstanceType.of( documentTypeId.getRootNameSpace(), documentTypeId.getLocalName(), documentTypeId.getVersion() ), creationDateAndTime ); } }
if (sender != null ? !sender.equals(evidence.sender) : evidence.sender != null) return false; if (receiver != null ? !receiver.equals(evidence.receiver) : evidence.receiver != null) return false; if (documentTypeIdentifier != null ? !documentTypeIdentifier.equals(evidence.documentTypeIdentifier) : evidence.documentTypeIdentifier != null) return false;
messageDetailsType.setMessageSubject(evidence.getDocumentTypeIdentifier().getIdentifier()); if (evidence.getDocumentIdentifier() != null) messageDetailsType.setUAMessageIdentifier(evidence.getDocumentIdentifier().getIdentifier());
/** * Returns a list of "restricted" header names that will be overridden when calling #createEffectiveHeader * The restricted header names are SenderId, RecipientId, DocumentTypeIdentifier and ProfileTypeIdentifier * Compares values that exist both as parsed and supplied headers. * Ignores values that only exists in one of them (that allows for sending new and unknown document types) */ protected List<String> findRestricedHeadersThatWillBeOverridden(final PeppolStandardBusinessHeader parsed, final PeppolStandardBusinessHeader supplied) { List<String> headers = new ArrayList<>(); if ((parsed.getSenderId() != null) && (supplied.getSenderId() != null) && (!supplied.getSenderId().equals(parsed.getSenderId()))) headers.add("SenderId"); if ((parsed.getRecipientId() != null) && (supplied.getRecipientId() != null) && (!supplied.getRecipientId().equals(parsed.getRecipientId()))) headers.add("RecipientId"); if ((parsed.getDocumentTypeIdentifier() != null) && (supplied.getDocumentTypeIdentifier() != null) && (!supplied.getDocumentTypeIdentifier().equals(parsed.getDocumentTypeIdentifier()))) headers.add("DocumentTypeIdentifier"); if ((parsed.getProfileTypeIdentifier() != null) && (supplied.getProfileTypeIdentifier() != null) && (!supplied.getProfileTypeIdentifier().equals(parsed.getProfileTypeIdentifier()))) headers.add("ProfileTypeIdentifier"); return headers; }
PeppolDocumentTypeIdAcronym(String identifier) { documentTypeIdentifier = DocumentTypeIdentifier.of(identifier); }
@Override public String toString() { return documentTypeIdentifier.toString(); }
public static DocumentTypeIdentifier of(String identifier) { return new DocumentTypeIdentifier(identifier, DEFAULT_SCHEME); }
PeppolDocumentTypeIdAcronym(String identifier) { documentTypeIdentifier = DocumentTypeIdentifier.of(identifier); }
@Override public String toString() { return documentTypeIdentifier.toString(); }
public DocumentTypeIdentifier toVefa() { return DocumentTypeIdentifier.of(toString()); } }
@Override public int hashCode() { return toString().hashCode(); }
public static DocumentTypeIdentifier parse(String str) throws PeppolParsingException { String[] parts = str.split("::", 2); if (parts.length != 2) throw new PeppolParsingException(String.format("Unable to parse document type identifier '%s'.", str)); return of(parts[1], Scheme.of(parts[0])); }
public DocumentTypeIdentifier getDocumentTypeIdentifier() { return DocumentTypeIdentifier.of(e().getSenderMessageDetails().getMessageSubject(), Scheme.NONE); }
ps.setString(4, rawStatistics.getSender().getIdentifier()); ps.setString(5, rawStatistics.getReceiver().getIdentifier()); ps.setString(6, rawStatistics.getDocumentTypeIdentifier().toString()); ps.setString(7, rawStatistics.getProcessIdentifier().toString()); ps.setString(8, rawStatistics.getChannelId() == null ? null : rawStatistics.getChannelId().stringValue());
params.setDocType(DocumentTypeIdentifier.of(value));