|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.route.RoutingActions
public class RoutingActions
This class includes static methods that mimic the different actions available to processing rules in Trading Networks, so you can call them from Java services.
Constructor Summary | |
---|---|
RoutingActions()
|
Method Summary | |
---|---|
static void |
addError(BizDocEnvelope doc,
ActivityLogEntry a)
Adds an error to the supplied document. |
static ActivityLogEntry |
alert(BizDocEnvelope doc,
java.lang.String p_id,
java.lang.String c_type,
java.lang.String sub,
java.lang.String msg)
Sends email. |
static void |
fillPipeline(com.wm.data.IData pipe,
RoutingRule rule,
BizDocEnvelope doc)
For internal use only |
static java.util.Stack |
getStack()
For internal use only |
static com.wm.data.IData |
invoke(BizDocEnvelope doc,
java.lang.String svc_nm,
com.wm.data.IData svc_in,
java.lang.String type)
Invoke a B2B service. |
static com.wm.data.IData |
invokeWrapper(BizDocEnvelope doc,
java.lang.String svc_nm,
com.wm.data.IData svc_in,
java.lang.String invokeType,
boolean throwif)
For internal use only |
static BizDocEnvelope |
mapMonitoredAttributes(java.lang.String docID)
|
static boolean |
persist(BizDocEnvelope doc,
java.lang.String uniq,
boolean fail)
Persists a document to the database. |
static boolean |
persist(BizDocEnvelope doc,
java.lang.String uniq,
java.lang.String dupCheckSvc,
boolean fail)
Persists a document to the database. |
static void |
popStack()
For internal use only |
static boolean |
pushStack(RoutingRule rule,
BizDocEnvelope doc)
For internal use only |
static java.lang.String |
replaceVariables(java.lang.String text,
com.wm.data.IData pipeline)
Do variable substitution in the specified text message. |
static byte[] |
report(java.lang.String r_tmpl,
com.wm.data.IData r_in,
boolean invokes)
For internal use only |
static java.lang.String |
send(BizDocEnvelope doc,
java.lang.String proto,
com.wm.data.IData pipe)
Send a document. |
static void |
setAborted(BizDocEnvelope doc,
boolean save)
Deprecated. use the version of setAborted that allows you to explicitly specify the new system and user status (127) |
static void |
setAborted(BizDocEnvelope doc,
java.lang.String sys,
java.lang.String usr,
boolean save)
Puts a document into an "aborted" state, and (possibly) changes its status. |
static boolean |
setResponse(java.lang.String type,
byte[] data)
Set the response to the currently running service. |
static void |
setStack(java.util.Stack s)
For internal use only |
static void |
sign(BizDocEnvelope doc,
com.wm.data.IData pipe)
Sign a document using its assigned signing service. |
static boolean |
str_eq(java.lang.String s1,
java.lang.String s2)
For internal use only |
static void |
validate(BizDocEnvelope doc,
com.wm.data.IData pipe)
Validate the structure of a document using its assigned validation service. |
static void |
verify(BizDocEnvelope doc,
com.wm.data.IData pipe)
Verify the signature of a document using its assigned verification service. |
static void |
writeEventDetails(com.webmethods.common.mapi.Event evt)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RoutingActions()
Method Detail |
---|
public static boolean str_eq(java.lang.String s1, java.lang.String s2)
public static boolean pushStack(RoutingRule rule, BizDocEnvelope doc)
public static void popStack()
public static void setStack(java.util.Stack s)
public static java.util.Stack getStack()
public static void fillPipeline(com.wm.data.IData pipe, RoutingRule rule, BizDocEnvelope doc)
public static byte[] report(java.lang.String r_tmpl, com.wm.data.IData r_in, boolean invokes)
public static java.lang.String replaceVariables(java.lang.String text, com.wm.data.IData pipeline)
text
- String that contains the text message including pipeline variablespipeline
- IData pipeline
public static void addError(BizDocEnvelope doc, ActivityLogEntry a)
doc
- the documenta
- the activity log entry to associatepublic static void setAborted(BizDocEnvelope doc, boolean save)
doc
- the documentsave
- should the document be saved?public static void setAborted(BizDocEnvelope doc, java.lang.String sys, java.lang.String usr, boolean save)
doc
- the documentsys
- new system status for the document (null if no change)usr
- new user status for the document (null if no change)save
- should the document be saved?public static void verify(BizDocEnvelope doc, com.wm.data.IData pipe) throws RoutingAbortedException
doc
- the document in questionpipe
- pipeline to pass to verification service (may be null)
RoutingAbortedException
public static void sign(BizDocEnvelope doc, com.wm.data.IData pipe) throws RoutingAbortedException
doc
- the document in questionpipe
- pipeline to pass to signing service (may be null)
RoutingAbortedException
public static void validate(BizDocEnvelope doc, com.wm.data.IData pipe) throws RoutingAbortedException
doc
- the document in questionpipe
- pipeline to pass to validation service (may be null)
RoutingAbortedException
public static boolean persist(BizDocEnvelope doc, java.lang.String uniq, boolean fail) throws DatastoreException
doc
- the document in questionuniq
- uniqueness criteria for this document; should
be one of the UNQ_* constants (see RoutingConstants). If UNQ_CUSTOM,
the method will use the duplicate checking service in the document's
doctype.fail
- should the insert be aborted if the additional
uniqueness criteria fail?
DatastoreException
public static boolean persist(BizDocEnvelope doc, java.lang.String uniq, java.lang.String dupCheckSvc, boolean fail) throws DatastoreException
doc
- the document in questionuniq
- uniqueness criteria for this document; should be one
of the UNQ_* constants (see RoutingConstants). If RoutingConstants.UNQ_CUSTOM,
supply the name of the duplicate checking service in dupCheckSvc.
doctype.dupCheckSvc
- name of the duplicate checking service to invoke to
check for document uniqueness. If uniq is not RoutingConstants.UNQ_CUSTOM,
this argument is ignored.fail
- should the insert be aborted if the additional
uniqueness criteria fail?
DatastoreException
public static ActivityLogEntry alert(BizDocEnvelope doc, java.lang.String p_id, java.lang.String c_type, java.lang.String sub, java.lang.String msg)
doc
- the document this alert pertains to (may be null)p_id
- who to send email (must be RoutingConstants.EMAIL_B2B or
a valid partner ID)c_type
- if "p_id" is a partner ID, this specifies which
contact of that partner to use (e.g. "Administrative")sub
- the subject of the messagemsg
- the message itself
public static com.wm.data.IData invoke(BizDocEnvelope doc, java.lang.String svc_nm, com.wm.data.IData svc_in, java.lang.String type) throws RoutingAbortedException
doc
- the document this invoke pertains to (may be null)svc_nm
- the name of the service to invoke (e.g. "wm.server:ping")svc_in
- inputs for the servicetype
- service invoke type (see RoutingConstants.TYPE_*)
RoutingAbortedException
public static com.wm.data.IData invokeWrapper(BizDocEnvelope doc, java.lang.String svc_nm, com.wm.data.IData svc_in, java.lang.String invokeType, boolean throwif) throws RoutingAbortedException
RoutingAbortedException
public static boolean setResponse(java.lang.String type, byte[] data)
type
- MIME type of the response data (e.g. "text/plain")data
- byte data to use as response
public static java.lang.String send(BizDocEnvelope doc, java.lang.String proto, com.wm.data.IData pipe)
doc
- the document to sendproto
- the protocol to send it on (see RoutingConstants)
public static BizDocEnvelope mapMonitoredAttributes(java.lang.String docID)
public static void writeEventDetails(com.webmethods.common.mapi.Event evt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |