|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.delivery.DeliveryUtils
public class DeliveryUtils
Provides utility methods for guaranteed document delivery. Used by both server-side guaranteed delivery and WmTN transport services.
Constructor Summary | |
---|---|
DeliveryUtils()
|
Method Summary | |
---|---|
static void |
addToResponse(com.wm.data.IData pipeline,
java.lang.Object data)
Adds the response data from WebService to bizdoc, as a new content part. |
static DeliveryJob |
createQueuedJob(BizDocEnvelope doc,
java.lang.String qname)
For internal use only. |
static com.wm.data.IData |
createServiceData(BizDocEnvelope env,
boolean primary,
java.lang.String protocol,
java.lang.String username,
java.lang.String password)
Creates service data needed for wm.tn.transport services. |
static com.wm.data.IData |
createServiceData(BizDocEnvelope env,
boolean primary,
java.lang.String protocol,
java.lang.String service,
java.lang.String username,
java.lang.String password)
Creates service data needed for wm.tn.transport services. |
static com.wm.data.IData |
createTNDoc(java.lang.Object data)
Creates a TN document and invoke wm.tn.receive using the object data provided |
static boolean |
getCertificateInfo(com.wm.data.IData in,
java.lang.String partnerId)
Deprecated. For Internal Use Only! |
static Destination |
getDestination(java.lang.String partnerId,
java.lang.String protocol,
boolean primary)
Retrieves the Destination info for the partner based upon the protocol. |
static java.lang.Object |
getIDataValue(com.wm.data.IData pipeline,
java.lang.String node)
Get the value corresponding to an IData key |
static long |
getMinTtw()
Searches the partner profiles to find the lowest time-to-wait amongst all the profiles who have a retry limit greater than 0. |
static com.wm.data.IData |
getPartnerContext(BizDocEnvelope bd,
java.lang.String protocol)
Attempts to get a com.wm.b2b.client.Context to a partner server if possible. |
static com.wm.data.IData |
getProfileLimits(BizDocEnvelope env)
Retrieves the default values from the Partner Profile for delivery retry limit and time to wait for the receiver. |
static java.lang.Object |
getWSErrors(com.wm.data.IData svcOut)
Check for fault messages in the response IData from WSC If there is any fault message, returns SOAP-FAULT element. |
static java.lang.String |
getWSErrorString(com.wm.data.IData svcOut)
Check for fault messages in the response IData from WSC If there is any fault message, convert SOAP-FAULT to an XML message. |
static void |
init()
Performs necessary initialization needed by other methods (mainly, getting the profile store). |
static com.wm.data.IData |
invokeService(DeliveryService service,
com.wm.data.IData svcInput)
Invoke a B2B delivery service. |
static void |
notifyJobs(BizDocEnvelope doc)
For internal use only. |
static void |
notifyTaskFailure(GuaranteedJob job)
For internal use only |
static void |
setIDataValue(com.wm.data.IData pipeline,
java.lang.String node,
java.lang.Object value)
TODO complete doc |
static void |
setKeyAndChain(com.wm.data.IData in)
Deprecated. For Internal Use Only! Use setSslKeyAndChain instead. |
static void |
setSslKeyAndChain(java.lang.String serverID)
Sets the private key and certificate chain for ssl connection establishment. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeliveryUtils()
Method Detail |
---|
public static void init() throws DeliveryException
DeliveryException
public static com.wm.data.IData createServiceData(BizDocEnvelope env, boolean primary, java.lang.String protocol, java.lang.String username, java.lang.String password) throws DeliveryException
env
- BizDocEnvelope data needed in order to get the sender infoprimary
- use the primary address?protocol
- transport protocol (eg, Constants.DEST_PROTOCOL_HTTP, Constants.DEST_PROTOCOL_HTTPS,
Constants.DEST_PROTOCOL_SMTP)username
- optional username to override the partner profile usernamepassword
- optional password to override the partner profile password
DeliveryException
public static com.wm.data.IData createServiceData(BizDocEnvelope env, boolean primary, java.lang.String protocol, java.lang.String service, java.lang.String username, java.lang.String password) throws DeliveryException
env
- BizDocEnvelope data needed in order to get the sender infoprimary
- use the primary address?protocol
- transport protocol (eg, Constants.DEST_PROTOCOL_HTTP, Constants.DEST_PROTOCOL_HTTPS,
Constants.DEST_PROTOCOL_SMTP)service
- delivery service name. This can be null, if the protocol is not custom delivery service.username
- optional username to override the partner profile usernamepassword
- optional password to override the partner profile password
DeliveryException
public static Destination getDestination(java.lang.String partnerId, java.lang.String protocol, boolean primary) throws DeliveryException
partnerId
- Internal ID of partner to retrieve destination fieldsprotocol
- protocol to search for (eg, http)primary
- is it the primary protocol?
DeliveryException
public static com.wm.data.IData getPartnerContext(BizDocEnvelope bd, java.lang.String protocol) throws DeliveryException
bd
- BizDocEnvelope data needed in order to get the sender infoprotocol
- protocol to use for the connection (should use the RoutingConstants)
DeliveryException
public static long getMinTtw()
public static com.wm.data.IData getProfileLimits(BizDocEnvelope env) throws DeliveryException
env
- BizDocEnvelope data needed in order to get the sender info
DeliveryException
public static com.wm.data.IData invokeService(DeliveryService service, com.wm.data.IData svcInput) throws java.lang.Exception
service
- delivery service to invokesvcInput
- delivery service inputs including document to deliver
java.lang.Exception
public static void setSslKeyAndChain(java.lang.String serverID) throws DeliveryException
serverID
.
serverID
- The internal ID of the partner whose SSL server TN will connect to.
DeliveryException
public static void notifyJobs(BizDocEnvelope doc)
public static DeliveryJob createQueuedJob(BizDocEnvelope doc, java.lang.String qname) throws java.lang.Exception
java.lang.Exception
public static void notifyTaskFailure(GuaranteedJob job)
public static com.wm.data.IData createTNDoc(java.lang.Object data) throws java.lang.Exception
output
- Object which contains the data for invoking wm.tn.receiveconvertResponseToXML
- whether to convert the data (specified in output param) to XML node. If not, the data
will be passed to wm.tn.receive as FFData.
java.lang.Exception
public static void addToResponse(com.wm.data.IData pipeline, java.lang.Object data)
pipeline
- IData containing bizdocdata
- data to be added to bizdoc. This objects should contain the data in xml format.public static void setIDataValue(com.wm.data.IData pipeline, java.lang.String node, java.lang.Object value)
pipeline
- IData in which the key-value needs to be putnode
- key in the format /root/child1/child2value
- Value to be set in the pipeline for the keypublic static java.lang.Object getIDataValue(com.wm.data.IData pipeline, java.lang.String node)
pipeline
- IData in which the key-value needs to be putnode
- key in the format /root/child1/child2
public static java.lang.String getWSErrorString(com.wm.data.IData svcOut) throws java.lang.Exception
svcOut
-
java.lang.Exception
public static java.lang.Object getWSErrors(com.wm.data.IData svcOut) throws java.lang.Exception
svcOut
-
java.lang.Exception
public static void setKeyAndChain(com.wm.data.IData in) throws DeliveryException
DeliveryException
public static boolean getCertificateInfo(com.wm.data.IData in, java.lang.String partnerId) throws DeliveryException
DeliveryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |