|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScriptEnvironment
ScriptEnvironment
provides methods for the JavaScript code
to access Sentinel objects created within the context of an action.
The environment can be accessed within the script using a variable called
scriptEnv
.
Example to access the correlated event and print causal events:
importPackage(java.lang); var corrEvt = scriptEnv.getCorrelatedEvent(); var causalEvents = corrEvt.getCorrelatedEventCollection(); if (causalEvents) { for (var it = causalEvents.iterator(); it.hasNext(); ) { var event = it.next(); System.out.println(event.toXmlString()); } }
scriptEnv
is read only and any assignment to it will fail silently.
Method Summary | |
---|---|
java.lang.String |
getContextName()
The name of the context within which the script action is executed. |
CorrelatedEvent |
getCorrelatedEvent()
|
Event |
getCurrentEvent()
|
Incident |
getIncident()
|
java.lang.String |
getRuleName()
|
Method Detail |
---|
java.lang.String getContextName()
CorrelatedEvent getCorrelatedEvent()
Event getCurrentEvent()
Incident getIncident()
getContextName()
java.lang.String getRuleName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |