return false; if (timestamp != null ? !timestamp.equals(evidence.timestamp) : evidence.timestamp != null) return false; 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)
/** * 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; }