public class Partnership extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME |
| Constructor and Description |
|---|
Partnership(String sName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllAttributes(Map<String,String> aAttributes)
Add all provided attributes. existing attributes are not altered.
|
void |
addReceiverIDs(Map<String,String> aMap)
Add all receiver IDs provided in the passed map.
|
void |
addSenderIDs(Map<String,String> aMap)
Add all sender IDs provided in the passed map.
|
protected boolean |
compareIDs(com.helger.commons.collection.attr.IStringMap aIDs,
com.helger.commons.collection.attr.IStringMap aCompareTo)
Check if all values from the left side are also present on the right side.
|
boolean |
containsReceiverAS2ID() |
boolean |
containsReceiverEmail() |
boolean |
containsReceiverID(String sKey)
Check if an arbitrary receiver ID is present.
|
boolean |
containsReceiverX509Alias() |
boolean |
containsSenderAS2ID() |
boolean |
containsSenderEmail() |
boolean |
containsSenderID(String sKey)
Check if an arbitrary sender ID is present.
|
boolean |
containsSenderX509Alias() |
void |
copyFrom(Partnership aPartnership)
Set all fields of this partnership with the data from the provided
partnership.
|
static Partnership |
createPlaceholderPartnership() |
com.helger.commons.collection.attr.IStringMap |
getAllAttributes() |
com.helger.commons.collection.attr.IStringMap |
getAllReceiverIDs() |
com.helger.commons.collection.attr.IStringMap |
getAllSenderIDs() |
String |
getAS2MDNOptions() |
String |
getAS2MDNTo() |
String |
getAS2ReceiptDeliveryOption() |
String |
getAS2URL() |
String |
getAttribute(String sKey)
Get the value associated with the given attribute name.
|
String |
getAttribute(String sKey,
String sDefault)
Get the value associated with the given attribute name or the default
values.
|
String |
getCompressionMode() |
String |
getCompressionType() |
String |
getContentTransferEncodingReceive(String sDefault)
Get the Content-Transfer-Encoding for receiving messages.
|
String |
getContentTransferEncodingSend(String sDefault)
Get the Content-Transfer-Encoding for sending messages.
|
String |
getDateFormat(String sDefault) |
String |
getEncryptAlgorithm() |
com.helger.commons.state.ETriState |
getIncludeCertificateInSignedContent() |
String |
getMDNSubject() |
String |
getMessageIDFormat(String sDefault) |
String |
getName() |
String |
getProtocol() |
String |
getReceiverAS2ID() |
String |
getReceiverEmail() |
String |
getReceiverID(String sKey)
Get the value of an arbitrary receiver ID
|
String |
getReceiverX509Alias() |
String |
getSenderAS2ID() |
String |
getSenderEmail() |
String |
getSenderID(String sKey)
Get the value of an arbitrary sender ID
|
String |
getSenderX509Alias() |
String |
getSigningAlgorithm() |
String |
getSubject() |
com.helger.commons.state.ETriState |
getVerifyUseCertificateInBodyPart() |
boolean |
isBlockErrorMDN() |
boolean |
isCompressBeforeSign() |
boolean |
isDisableDecompress() |
boolean |
isDisableDecrypt() |
boolean |
isDisableVerify() |
boolean |
isForceDecrypt() |
boolean |
isForceVerify() |
boolean |
isRemoveCmsAlgorithmProtect() |
boolean |
isRFC3851MICAlgs() |
boolean |
matches(Partnership aPartnership)
Check if sender and receiver IDs of this partnership match the ones of the
provided partnership.
|
com.helger.commons.state.EChange |
setAS2MDNOptions(String sValue)
Set the MDN options corresponding to the
Disposition-Notification-Options header. |
com.helger.commons.state.EChange |
setAS2MDNTo(String sValue)
Set the URL to send the MDN to.
|
com.helger.commons.state.EChange |
setAS2ReceiptDeliveryOption(String sValue)
Set the return URL for async MDNs when sending messages.
|
com.helger.commons.state.EChange |
setAS2URL(String sValue) |
com.helger.commons.state.EChange |
setAttribute(String sKey,
String sValue)
Set an arbitrary partnership attribute.
|
com.helger.commons.state.EChange |
setBlockErrorMDN(boolean bBlock) |
com.helger.commons.state.EChange |
setCompressionMode(String sValue) |
com.helger.commons.state.EChange |
setCompressionModeCompressAfterSigning() |
com.helger.commons.state.EChange |
setCompressionModeCompressBeforeSigning() |
com.helger.commons.state.EChange |
setCompressionType(ECompressionType eValue) |
com.helger.commons.state.EChange |
setCompressionType(String sValue) |
com.helger.commons.state.EChange |
setContentTransferEncodingReceive(com.helger.mail.cte.EContentTransferEncoding eCTE)
Set the Content-Transfer-Encoding for receiving messages.
|
com.helger.commons.state.EChange |
setContentTransferEncodingReceive(String sValue)
Set the Content-Transfer-Encoding for receiving messages.
|
com.helger.commons.state.EChange |
setContentTransferEncodingSend(com.helger.mail.cte.EContentTransferEncoding eCTE)
Set the Content-Transfer-Encoding for sending messages.
|
com.helger.commons.state.EChange |
setContentTransferEncodingSend(String sValue)
Set the Content-Transfer-Encoding for sending messages.
|
com.helger.commons.state.EChange |
setDateFormat(String sValue) |
com.helger.commons.state.EChange |
setDisableDecompress(boolean bValue) |
com.helger.commons.state.EChange |
setDisableDecrypt(boolean bValue) |
com.helger.commons.state.EChange |
setDisableVerify(boolean bValue) |
com.helger.commons.state.EChange |
setEncryptAlgorithm(ECryptoAlgorithmCrypt eValue) |
com.helger.commons.state.EChange |
setEncryptAlgorithm(String sValue) |
com.helger.commons.state.EChange |
setForceDecrypt(boolean bValue) |
com.helger.commons.state.EChange |
setForceVerify(boolean bValue) |
com.helger.commons.state.EChange |
setIncludeCertificateInSignedContent(com.helger.commons.state.ETriState eValue) |
com.helger.commons.state.EChange |
setMDNSubject(String sValue) |
com.helger.commons.state.EChange |
setMessageIDFormat(String sValue) |
void |
setName(String sName) |
com.helger.commons.state.EChange |
setProtocol(String sValue) |
void |
setReceiverAS2ID(String sValue)
Set the receivers AS2 ID.
|
void |
setReceiverEmail(String sValue)
Set the receivers email address.
|
void |
setReceiverID(String sKey,
String sValue)
Set an arbitrary receiver ID.
|
void |
setReceiverX509Alias(String sValue)
Set the receivers X509 alias.
|
com.helger.commons.state.EChange |
setRemoveCmsAlgorithmProtect(boolean bValue)
Enable or disable the removal of the CMS attribute "AlgorithmProtect".
|
com.helger.commons.state.EChange |
setRFC3851MICAlgs(boolean bValue)
Enable or disable the usage of the old RFC 3851 MIC algorithm names.
|
void |
setSenderAS2ID(String sValue)
Set the senders AS2 ID.
|
void |
setSenderEmail(String sValue)
Set the senders email address.
|
void |
setSenderID(String sKey,
String sValue)
Set an arbitrary sender ID.
|
void |
setSenderX509Alias(String sValue)
Set the senders X509 alias.
|
com.helger.commons.state.EChange |
setSigningAlgorithm(ECryptoAlgorithmSign eValue) |
com.helger.commons.state.EChange |
setSigningAlgorithm(String sValue) |
com.helger.commons.state.EChange |
setSubject(String sValue) |
com.helger.commons.state.EChange |
setVerifyUseCertificateInBodyPart(com.helger.commons.state.ETriState eValue) |
String |
toString() |
public static final String DEFAULT_NAME
public void setSenderID(@Nonnull String sKey, @Nullable String sValue)
sKey - The name of the ID. May not be null.sValue - The value to be set. It may be null in which case the
attribute is removed.public void setSenderAS2ID(@Nullable String sValue)
sValue - The value to be set. May be null.getSenderAS2ID(),
containsSenderAS2ID()public void setSenderX509Alias(@Nullable String sValue)
sValue - The value to be set. May be null.getSenderX509Alias(),
containsSenderX509Alias()public void setSenderEmail(@Nullable String sValue)
sValue - The value to be set. May be null.getSenderEmail(),
containsSenderEmail()public void addSenderIDs(@Nullable Map<String,String> aMap)
aMap - The map to use. May be null.@Nullable public String getSenderID(@Nullable String sKey)
sKey - The name of the ID to query. May be null.null and
contained in the sender IDs.@Nullable public String getSenderAS2ID()
null if it is not setsetSenderAS2ID(String),
containsSenderAS2ID()@Nullable public String getSenderX509Alias()
null if it is not setsetSenderX509Alias(String),
containsSenderX509Alias()@Nullable public String getSenderEmail()
null if it is not set.setSenderEmail(String),
containsSenderEmail()public boolean containsSenderID(@Nullable String sKey)
sKey - The name of the ID to query. May be null.true if the name is not null and
contained in the sender IDs.public boolean containsSenderAS2ID()
true if the sender's AS2 ID is present,
false otherwise.setSenderAS2ID(String),
getSenderAS2ID()public boolean containsSenderX509Alias()
true if the sender's X509 alias is present,
false otherwise.setSenderX509Alias(String),
getSenderX509Alias()public boolean containsSenderEmail()
true if the sender's email address is present,
false otherwise.setSenderEmail(String),
getSenderEmail()@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.attr.IStringMap getAllSenderIDs()
null.public void setReceiverID(@Nonnull String sKey, @Nullable String sValue)
sKey - The name of the ID. May not be null.sValue - The value to be set. It may be null in which case the
attribute is removed.public void setReceiverAS2ID(@Nullable String sValue)
sValue - The value to be set. May be null.getReceiverAS2ID(),
containsReceiverAS2ID()public void setReceiverX509Alias(@Nullable String sValue)
sValue - The value to be set. May be null.getReceiverX509Alias(),
containsReceiverX509Alias()public void setReceiverEmail(@Nullable String sValue)
sValue - The value to be set. May be null.getReceiverEmail(),
containsReceiverEmail()public void addReceiverIDs(@Nullable Map<String,String> aMap)
aMap - The map to use. May be null.@Nullable public String getReceiverID(@Nullable String sKey)
sKey - The name of the ID to query. May be null.null and
contained in the receiver IDs.@Nullable public String getReceiverAS2ID()
null if it is not setsetReceiverAS2ID(String),
containsReceiverAS2ID()@Nullable public String getReceiverX509Alias()
null if it is not setsetReceiverX509Alias(String),
containsReceiverX509Alias()@Nullable public String getReceiverEmail()
null if it is not set.setReceiverEmail(String),
containsReceiverEmail()public boolean containsReceiverID(@Nullable String sKey)
sKey - The name of the ID to query. May be null.true if the name is not null and
contained in the receiver IDs.public boolean containsReceiverAS2ID()
true if the receiver's AS2 ID is present,
false otherwise.setReceiverAS2ID(String),
getReceiverAS2ID()public boolean containsReceiverX509Alias()
true if the receiver's X509 alias is present,
false otherwise.setReceiverX509Alias(String),
getReceiverX509Alias()public boolean containsReceiverEmail()
true if the receiver's email address is present,
false otherwise.setReceiverEmail(String),
getReceiverEmail()@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.attr.IStringMap getAllReceiverIDs()
null.@Nonnull public com.helger.commons.state.EChange setAttribute(@Nonnull String sKey, @Nullable String sValue)
sKey - The key to be used. May not be null.sValue - The value to be used. If null an existing attribute
with the provided name will be removed.EChange.CHANGED if something changed. Never
null.@Nullable public String getAttribute(@Nullable String sKey)
sKey - Attribute name to search. May be null.null if the attribute name was null or if
no such attribute is contained.getAttribute(String, String)@Nullable public String getAttribute(@Nullable String sKey, @Nullable String sDefault)
sKey - Attribute name to search. May be null.sDefault - Default value to be returned if no such attribute is present.null or if no such attribute is contained.getAttribute(String)@Nullable public String getAS2MDNTo()
null.getAS2ReceiptDeliveryOption()@Nonnull public com.helger.commons.state.EChange setAS2MDNTo(@Nullable String sValue)
setAS2ReceiptDeliveryOption(String).sValue - The async MDN URL. May be null.EChange.setAS2ReceiptDeliveryOption(String)@Nullable public String getAS2MDNOptions()
Disposition-Notification-Options header. May be
null.@Nonnull public com.helger.commons.state.EChange setAS2MDNOptions(@Nullable String sValue)
Disposition-Notification-Options header.sValue - The value to be set. May be null.EChange@Nullable public String getAS2ReceiptDeliveryOption()
null.getAS2MDNTo()@Nonnull public com.helger.commons.state.EChange setAS2ReceiptDeliveryOption(@Nullable String sValue)
setAS2MDNTo(String).sValue - The async MDN url. May be null.EChangesetAS2MDNTo(String)@Nonnull public com.helger.commons.state.EChange setMessageIDFormat(@Nullable String sValue)
@Nonnull public com.helger.commons.state.EChange setMDNSubject(@Nullable String sValue)
public boolean isBlockErrorMDN()
@Nonnull public com.helger.commons.state.EChange setBlockErrorMDN(boolean bBlock)
@Nonnull public com.helger.commons.state.EChange setDateFormat(@Nullable String sValue)
@Nonnull public com.helger.commons.state.EChange setEncryptAlgorithm(@Nullable String sValue)
@Nonnull public com.helger.commons.state.EChange setEncryptAlgorithm(@Nullable ECryptoAlgorithmCrypt eValue)
@Nonnull public com.helger.commons.state.EChange setSigningAlgorithm(@Nullable String sValue)
@Nonnull public com.helger.commons.state.EChange setSigningAlgorithm(@Nullable ECryptoAlgorithmSign eValue)
@Nullable public String getContentTransferEncodingSend(@Nullable String sDefault)
sDefault - Default to be returned if none is present. May be null.@Nonnull public com.helger.commons.state.EChange setContentTransferEncodingSend(@Nullable String sValue)
sValue - The value for this partnership. May be null.EChange@Nonnull public com.helger.commons.state.EChange setContentTransferEncodingSend(@Nullable com.helger.mail.cte.EContentTransferEncoding eCTE)
eCTE - The value for this partnership. May be null.EChange@Nullable public String getContentTransferEncodingReceive(@Nullable String sDefault)
sDefault - Default to be returned if none is present. May be null.@Nonnull public com.helger.commons.state.EChange setContentTransferEncodingReceive(@Nullable String sValue)
sValue - The value for this partnership. May be null.EChange@Nonnull public com.helger.commons.state.EChange setContentTransferEncodingReceive(@Nullable com.helger.mail.cte.EContentTransferEncoding eCTE)
eCTE - The value for this partnership. May be null.EChange@Nonnull public com.helger.commons.state.EChange setCompressionType(@Nullable String sValue)
@Nonnull public com.helger.commons.state.EChange setCompressionType(@Nullable ECompressionType eValue)
@Nonnull public com.helger.commons.state.EChange setCompressionMode(@Nullable String sValue)
public boolean isCompressBeforeSign()
@Nonnull public com.helger.commons.state.EChange setCompressionModeCompressAfterSigning()
@Nonnull public com.helger.commons.state.EChange setCompressionModeCompressBeforeSigning()
public boolean isForceDecrypt()
@Nonnull public com.helger.commons.state.EChange setForceDecrypt(boolean bValue)
public boolean isDisableDecrypt()
@Nonnull public com.helger.commons.state.EChange setDisableDecrypt(boolean bValue)
public boolean isForceVerify()
@Nonnull public com.helger.commons.state.EChange setForceVerify(boolean bValue)
public boolean isDisableVerify()
@Nonnull public com.helger.commons.state.EChange setDisableVerify(boolean bValue)
@Nonnull public com.helger.commons.state.ETriState getIncludeCertificateInSignedContent()
@Nonnull public com.helger.commons.state.EChange setIncludeCertificateInSignedContent(@Nonnull com.helger.commons.state.ETriState eValue)
@Nonnull public com.helger.commons.state.ETriState getVerifyUseCertificateInBodyPart()
@Nonnull public com.helger.commons.state.EChange setVerifyUseCertificateInBodyPart(@Nonnull com.helger.commons.state.ETriState eValue)
public boolean isDisableDecompress()
@Nonnull public com.helger.commons.state.EChange setDisableDecompress(boolean bValue)
public boolean isRFC3851MICAlgs()
true if the "old" RFC 3851 MIC algorithm names (e.g.
sha1) should be used, false if the new
RFC 5751 MIC algorithm names (e.g. sha-1) should be
used. Default is false.@Nonnull public com.helger.commons.state.EChange setRFC3851MICAlgs(boolean bValue)
false.bValue - true if the "old" RFC 3851 MIC algorithm names (e.g.
sha1) should be used, false if the new RFC
5751 MIC algorithm names (e.g. sha-1) should be used.
Default is false.EChange.public boolean isRemoveCmsAlgorithmProtect()
true, the CMS attribute "AlgorithmProtect" will be
removed. This is needed in compatibility with e.g. IBM Sterling.
Default value is false. See Issue #137.@Nonnull public com.helger.commons.state.EChange setRemoveCmsAlgorithmProtect(boolean bValue)
false. This is needed in compatibility with
e.g. IBM Sterling. Default value is false. See Issue #137.bValue - true to remove the attribute, false to
keep it.EChange.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.attr.IStringMap getAllAttributes()
null.public void addAllAttributes(@Nullable Map<String,String> aAttributes)
aAttributes - The attributes to be added. May be null. If a
null value is contained in the map, the respective
attribute will be removed.public boolean matches(@Nonnull Partnership aPartnership)
aPartnership - The partnership to compare to. May not be null.true if sender and receiver IDs of this partnership
are present in the sender and receiver IDs of the provided
partnership.protected boolean compareIDs(@Nonnull com.helger.commons.collection.attr.IStringMap aIDs, @Nonnull com.helger.commons.collection.attr.IStringMap aCompareTo)
aIDs - The source map which must be fully contained in the aCompareTo mapaCompareTo - The map to compare to. May not be null. It may contain
more attributes than aIDs but must at least contain the same ones.true if aIDs is not empty and all values from aIDs are
also present in aCompareTo, false otherwise.public void copyFrom(@Nonnull Partnership aPartnership)
aPartnership - The partnership to copy the data from. May not be null.@Nonnull public static Partnership createPlaceholderPartnership()
Copyright © 2013–2022 Philip Helger. All rights reserved.