|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserLogAccess
UserLogAccess interface creates an entry in the Audit Log. Users of this interface can get a handle of this implementation from the from the input data and set user-defined state value for a particular entry in the Audit Log. The following script fragment shows how to get and log to the UserLogAccess object from JavaScript:
The logClient object is available only during the duration of the scripts and is not a serializable or persistent object.var logClient = job.get("logObj"); var PENDING = Packages.com.tibco.ax.fw.util.UserLogAccess.PENDING; logClient.log("STATE_VALUE", PENDING, "Received the file from trading partner.");
Note:
For every invocation of log(java.lang.String, int, java.lang.String)
within a JavaScript, a new Audit Log entry is created
on the Details Panel of the Audit Log Viewer. The very first call to log(java.lang.String, int, java.lang.String)
during the execution of the
Script will create a summary entry in the Audit Log Viewer as a separate row and so
it is up to the JavaScript user to mark the status of the summary row appropriately as COMPLETED
or ERROR depending on the decisions made in the JavaScript execution.
Field Summary | |
---|---|
static int |
COMPLETED
COMPLETED status to be specified for the log entry. |
static int |
ERROR
ERROR status to be specified for the log entry. |
static int |
PENDING
PENDING status to be specified for the log entry. |
Method Summary | |
---|---|
void |
log(java.lang.String state,
int status,
java.lang.String desc)
Creates an entry in the Audit Log with the given state, status and description. |
Field Detail |
---|
static final int ERROR
static final int PENDING
static final int COMPLETED
Method Detail |
---|
void log(java.lang.String state, int status, java.lang.String desc) throws java.lang.Exception
UserLogAccess
.
state
- is the state that is defined in the Audit Log entry.
The value cannot be null and an exception will be thrown if the value is null.status
- is a valid value that can be one of the following:
ERROR
, PENDING
or COMPLETED
.
If an invalid value is set, an exception will be thrown.desc
- is the description that is set for this log entry.
The value cannot be null and an exception will be thrown if the value is null.
java.lang.Exception
- if state, desc values are null or if the status
value is not a valid value. Exception will also be thrown if there are errors due to JDBC
SQL connection errors or any errors thrown from the database.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |