Package com.helger.phase4.attachment
Class AS4OutgoingAttachment.Builder
java.lang.Object
com.helger.phase4.attachment.AS4OutgoingAttachment.Builder
- All Implemented Interfaces:
com.helger.base.builder.IBuilder<AS4OutgoingAttachment>
- Enclosing class:
AS4OutgoingAttachment
public static class AS4OutgoingAttachment.Builder
extends Object
implements com.helger.base.builder.IBuilder<AS4OutgoingAttachment>
Builder class for class
AS4OutgoingAttachment. At least "data" and "mimeType" must be
set.- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull AS4OutgoingAttachment.BuilderaddCustomProperties(@Nullable com.helger.collection.commons.ICommonsOrderedMap<String, String> a) Add the provided map of custom properties.@NonNull AS4OutgoingAttachment.BuilderaddCustomProperty(@Nullable String sKey, @Nullable String sValue) Add a single custom property.@NonNull AS4OutgoingAttachmentbuild()@NonNull AS4OutgoingAttachment.BuilderDefine the charset of the outgoing attachment.protected void@NonNull AS4OutgoingAttachment.Buildercompression(@Nullable EAS4CompressionMode e) @NonNull AS4OutgoingAttachment.BuilderShortcut forcompression (EAS4CompressionMode.GZIP)@NonNull AS4OutgoingAttachment.Builder@NonNull AS4OutgoingAttachment.BuildercustomProperties(@Nullable com.helger.collection.commons.ICommonsOrderedMap<String, String> a) Use the provided map of custom properties.@NonNull AS4OutgoingAttachment.BuildercustomProperty(@Nullable String sKey, @Nullable String sValue) Remove all existing custom properties and only use the provided one.@NonNull AS4OutgoingAttachment.Builderdata(byte @Nullable [] a) @NonNull AS4OutgoingAttachment.Builderdata(@Nullable com.helger.base.array.bytes.ByteArrayWrapper a) @NonNull AS4OutgoingAttachment.Builder@NonNull AS4OutgoingAttachment.Builder@NonNull AS4OutgoingAttachment.BuildermimeType(@Nullable com.helger.mime.IMimeType a) @NonNull AS4OutgoingAttachment.BuilderShortcut formimeType (CMimeType.APPLICATION_XML)@NonNull AS4OutgoingAttachment.Builder
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
data
-
data
public @NonNull AS4OutgoingAttachment.Builder data(@Nullable com.helger.base.array.bytes.ByteArrayWrapper a) -
data
-
reandomContentID
-
contentID
-
filename
-
mimeTypeXML
Shortcut formimeType (CMimeType.APPLICATION_XML)- Returns:
- this for chaining
-
mimeType
-
compressionGZIP
Shortcut forcompression (EAS4CompressionMode.GZIP)- Returns:
- this for chaining
-
compression
-
charset
Define the charset of the outgoing attachment.- Parameters:
a- The Charset to use. May benull.- Returns:
- this for chaining
- Since:
- 0.14.0
-
addCustomProperty
public @NonNull AS4OutgoingAttachment.Builder addCustomProperty(@Nullable String sKey, @Nullable String sValue) Add a single custom property.- Parameters:
sKey- They property key. May benull. Only properties with a non-nullkey are considered.sValue- The value to use. May benull.- Returns:
- this for chaining
- Since:
- 2.8.6
-
addCustomProperties
public @NonNull AS4OutgoingAttachment.Builder addCustomProperties(@Nullable com.helger.collection.commons.ICommonsOrderedMap<String, String> a) Add the provided map of custom properties. Existing custom properties are not changed, but may be overwritten.- Parameters:
a- The key-value-pairs to be added as custom properties. May benull.- Returns:
- this for chaining
- Since:
- 2.8.6
-
customProperty
public @NonNull AS4OutgoingAttachment.Builder customProperty(@Nullable String sKey, @Nullable String sValue) Remove all existing custom properties and only use the provided one.- Parameters:
sKey- They property key. May benull. Only properties with a non-nullkey are considered.sValue- The value to use. May benull.- Returns:
- this for chaining
- Since:
- 2.8.6
-
customProperties
public @NonNull AS4OutgoingAttachment.Builder customProperties(@Nullable com.helger.collection.commons.ICommonsOrderedMap<String, String> a) Use the provided map of custom properties. All existing custom properties are removed.- Parameters:
a- The key-value-pairs to use as custom properties. May benull.- Returns:
- this for chaining
- Since:
- 2.8.6
-
checkConsistency
@OverridingMethodsMustInvokeSuper protected void checkConsistency() -
build
- Specified by:
buildin interfacecom.helger.base.builder.IBuilder<AS4OutgoingAttachment>
-