@NotThreadSafe public class AS4ClientUserMessage extends AbstractAS4Client<AS4ClientUserMessage>
AS4UserMessage objects.DEFAULT_MAX_RETRIES, DEFAULT_RETRY_INTERVAL_MS| Constructor and Description |
|---|
AS4ClientUserMessage(AS4ResourceHelper aResHelper) |
| Modifier and Type | Method and Description |
|---|---|
AS4ClientUserMessage |
addAttachment(File aAttachment,
com.helger.commons.mime.IMimeType aMimeType,
EAS4CompressionMode eAS4CompressionMode)
Adds a file as attachment to the message.
|
AS4ClientUserMessage |
addAttachment(WSS4JAttachment aAttachment)
Adds a file as attachment to the message.
|
com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> |
attachments() |
AS4ClientBuiltMessage |
buildMessage(String sMessageID,
IAS4ClientBuildMessageCallback aCallback)
Build the AS4 message to be sent.
|
com.helger.commons.collection.impl.ICommonsList<Ebms3Property> |
ebms3Properties()
With properties optional info can be added for the receiving party.
|
String |
getAction() |
String |
getAgreementRefValue() |
String |
getConversationID() |
String |
getFromPartyID() |
String |
getFromPartyIDType() |
String |
getFromRole() |
Node |
getPayload() |
IPMode |
getPMode() |
com.helger.commons.functional.IFunction<AS4ClientUserMessage,String> |
getPModeIDFactory() |
String |
getServiceType() |
String |
getServiceValue() |
String |
getToPartyID() |
String |
getToPartyIDType() |
String |
getToRole() |
boolean |
isUseLeg1() |
AS4ClientUserMessage |
setAction(String sAction)
The element is a string identifying an operation or an activity within a
Service that may support several of these.
|
AS4ClientUserMessage |
setAgreementRefValue(String sAgreementRefValue)
The AgreementRef element is a string that identifies the entity or artifact
governing the exchange of messages between the parties.
|
AS4ClientUserMessage |
setConversationID(String sConversationID)
The element is a string identifying the set of related messages that make
up a conversation between Parties.
|
AS4ClientUserMessage |
setFromPartyID(String sFromPartyID)
The PartyID is an ID that identifies the C2 over which the message gets
sent.
|
AS4ClientUserMessage |
setFromPartyIDType(String sFromPartyIDType)
The PartyID is an ID that identifies the C2 over which the message gets
sent.
|
AS4ClientUserMessage |
setFromRole(String sFromRole)
The value of the Role element is a non-empty string, with a default value
of
http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultRole
. |
AS4ClientUserMessage |
setPayload(Node aPayload)
Sets the payload for a usermessage.
|
void |
setPMode(IPMode aPMode,
boolean bSetValuesFromPMode)
This method should be used if you do not want to set each parameter and
have a PMode ready that you wish to use.
|
AS4ClientUserMessage |
setPModeID(String sPModeID) |
AS4ClientUserMessage |
setPModeIDFactory(com.helger.commons.functional.IFunction<AS4ClientUserMessage,String> aPModeIDFactory) |
AS4ClientUserMessage |
setServiceType(String sServiceType)
It is a string identifying the service type of the service specified in
service value.
|
AS4ClientUserMessage |
setServiceValue(String sServiceValue)
It is a string identifying the service that acts on the message 1639 and it
is specified by the designer of the service.
|
AS4ClientUserMessage |
setToPartyID(String sToPartyID)
* @see #setFromPartyID(String)
|
AS4ClientUserMessage |
setToPartyIDType(String sToPartyIDType)
* @see #setFromPartyIDType(String)
|
AS4ClientUserMessage |
setToRole(String sToRole) |
AS4ClientUserMessage |
setUseLeg1(boolean bUseLeg1)
DEFAULT is set to
true, if you want to use leg2 for the
message set false. |
void |
setUserMessageValuesFromPMode(IPMode aPMode,
PModeLeg aEffectiveLeg) |
createDefaultMessageIDFactory, createMessageID, cryptParams, getAS4CryptoFactory, getAS4ResourceHelper, getMaxRetries, getMessageIDFactory, getRefToMessageID, getRetryIntervalMS, getSoapVersion, hasRefToMessageID, internalCreateCryptoFactory, sendMessageAndGetMicroDocument, sendMessageWithRetries, sendMessageWithRetries, setAS4CryptoFactory, setMaxRetries, setMessageID, setMessageIDFactory, setRefToMessageID, setRetryIntervalMS, setSoapVersion, setValuesFromPMode, signingParamscreateDefaultHttpClientFactory, getHttpClientFactory, getHttpCustomizer, isQuoteHttpHeaders, sendGenericMessage, sendGenericMessageWithRetries, setHttpClientFactory, setHttpCustomizer, setQuoteHttpHeaders, toStringpublic AS4ClientUserMessage(@Nonnull @WillNotClose AS4ResourceHelper aResHelper)
@Nonnull public final AS4ClientUserMessage setPayload(@Nullable Node aPayload)
aPayload - the Payload to be added@Nonnull @ReturnsMutableObject public final com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> attachments()
@Nonnull public final AS4ClientUserMessage addAttachment(@Nonnull File aAttachment, @Nonnull com.helger.commons.mime.IMimeType aMimeType, @Nullable EAS4CompressionMode eAS4CompressionMode) throws IOException
aAttachment - Attachment to be added. May not be null.aMimeType - MIME type of the given file. May not be null.eAS4CompressionMode - which compression type should be used to compress the attachment.
May be null.IOException - if something goes wrong in the adding process or the compression@Nonnull public final AS4ClientUserMessage addAttachment(@Nonnull WSS4JAttachment aAttachment)
aAttachment - Attachment to be added. May not be null.@Nonnull @ReturnsMutableObject public final com.helger.commons.collection.impl.ICommonsList<Ebms3Property> ebms3Properties()
null.@Nonnull public final AS4ClientUserMessage setAction(@Nullable String sAction)
<eb:Action>NewPurchaseOrder</eb:Action>sAction - the action that should be there.@Nonnull public final AS4ClientUserMessage setServiceType(@Nullable String sServiceType)
<eb:Service type= "MyServiceTypes">QuoteToCollect</eb:Service>sServiceType - serviceType that should be set@Nonnull public final AS4ClientUserMessage setServiceValue(@Nullable String sServiceValue)
<eb:Service
type="MyServiceTypes">QuoteToCollect</eb:Service>sServiceValue - the service value that should be set@Nonnull public final AS4ClientUserMessage setConversationID(@Nullable String sConversationID)
<eb:ConversationId>4321</eb:ConversationId>sConversationID - the conversationID that should be set@Nonnull public final AS4ClientUserMessage setAgreementRefValue(@Nullable String sAgreementRefValue)
<eb:AgreementRef pmode=
"pm-esens-generic-resp">http://agreements.holodeckb2b.org/examples/agreement0</eb:AgreementRef>sAgreementRefValue - agreement reference that should be set@Nonnull public final AS4ClientUserMessage setFromRole(@Nullable String sFromRole)
http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultRole
.sFromRole - the role that should be set@Nonnull public final AS4ClientUserMessage setFromPartyIDType(@Nullable String sFromPartyIDType)
sFromPartyIDType - the partyID type that should be set@Nonnull public final AS4ClientUserMessage setFromPartyID(@Nullable String sFromPartyID)
<eb:PartyId>ImAPartyID</eb:PartyId>sFromPartyID - the partyID that should be set@Nonnull public final AS4ClientUserMessage setToRole(@Nullable String sToRole)
sToRole - the role that should be usedsetFromRole(String)@Nonnull public final AS4ClientUserMessage setToPartyIDType(@Nullable String sToPartyIDType)
sToPartyIDType - the PartyID type that should be set@Nonnull public final AS4ClientUserMessage setToPartyID(@Nullable String sToPartyID)
sToPartyID - the PartyID that should be setpublic final boolean isUseLeg1()
@Nonnull public final AS4ClientUserMessage setUseLeg1(boolean bUseLeg1)
true, if you want to use leg2 for the
message set false.bUseLeg1 - true if leg1 should be used, false if leg2
should be usedpublic final void setUserMessageValuesFromPMode(@Nonnull IPMode aPMode, @Nonnull PModeLeg aEffectiveLeg)
public final void setPMode(@Nullable IPMode aPMode, boolean bSetValuesFromPMode)
aPMode - that should be used. May be nullbSetValuesFromPMode - true to set all values in the client, that can be
derived from the PMode, false to not do it.@Nonnull public final com.helger.commons.functional.IFunction<AS4ClientUserMessage,String> getPModeIDFactory()
@Nonnull public final AS4ClientUserMessage setPModeID(@Nullable String sPModeID)
@Nonnull public final AS4ClientUserMessage setPModeIDFactory(@Nonnull com.helger.commons.functional.IFunction<AS4ClientUserMessage,String> aPModeIDFactory)
@Nonnull public AS4ClientBuiltMessage buildMessage(@Nonnull @Nonempty String sMessageID, @Nullable IAS4ClientBuildMessageCallback aCallback) throws Exception
AbstractAS4ClientbuildMessage in class AbstractAS4Client<AS4ClientUserMessage>sMessageID - The message ID to be used. Neither null nor empty.aCallback - Optional callback for in-between states. May be null.null.Exception - in case something goes wrongCopyright © 2015–2020 Philip Helger. All rights reserved.