Package VASSAL.script.expression
Class AuditTrail
java.lang.Object
VASSAL.script.expression.AuditTrail
Class to track the evaluation history of an expression.
AuditTrails will create an overhead on every BeanShell expression evaluated, so only
generate them if a preference has been set by the user.
-
Constructor Summary
ConstructorDescriptionAuditTrail
(Auditable source, String sourceField) AuditTrail
(Auditable source, String originalExpression, String sourceField) Create a new AuditTrailAuditTrail
(AuditTrail audit) Copy constructor for AuditTrail -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(String message) Add a message to the Audit Trailstatic AuditTrail
Factory method to create a new AuditTrail only if auditing is enabledstatic AuditTrail
Factory method to create a new AuditTrail only if auditing is enabledstatic AuditTrail
Factory method to create a new AuditTrail only if auditing is enabledstatic AuditTrail
create
(Auditable source, Expression originalExpression) Factory method to create a new AuditTrail only if auditing is enabledstatic AuditTrail
create
(Auditable source, Expression originalExpression, String comment) Factory method to create a new AuditTrail only if auditing is enabledstatic AuditTrail
create
(Auditable source, FormattedString originalExpression) static AuditTrail
create
(Auditable source, FormattedString originalExpression, String comment) static boolean
static boolean
void
setExpression
(String expression) static void
setReportingInProgress
(boolean reportingInProgress) void
toString()
Override toString to return a formatted Audit Report
-
Constructor Details
-
AuditTrail
Copy constructor for AuditTrail- Parameters:
audit
- AuditTrail to copy
-
AuditTrail
-
AuditTrail
-
-
Method Details
-
isEnabled
public static boolean isEnabled() -
isReportingInProgress
public static boolean isReportingInProgress() -
setReportingInProgress
public static void setReportingInProgress(boolean reportingInProgress) -
create
Factory method to create a new AuditTrail only if auditing is enabled- Parameters:
source
- Audit source componentoriginalExpression
- Expression being auditedcomment
- Additional comment about the audit source- Returns:
- An AuditTrail object if auditing is enabled, otherwise null
-
create
Factory method to create a new AuditTrail only if auditing is enabled- Parameters:
source
- Audit source componentoriginalExpression
- Expression being auditedcomment
- Additional comment about the audit source- Returns:
- An AuditTrail object if auditing is enabled, otherwise null
-
create
public static AuditTrail create(Auditable source, FormattedString originalExpression, String comment) -
create
Factory method to create a new AuditTrail only if auditing is enabled- Parameters:
source
- Audit source componentoriginalExpression
- Expression being audited- Returns:
- An AuditTrail object if auditing is enabled, otherwise null
-
create
Factory method to create a new AuditTrail only if auditing is enabled- Parameters:
source
- Audit source componentoriginalExpression
- Expression being audited- Returns:
- An AuditTrail object if auditing is enabled, otherwise null
-
create
-
create
Factory method to create a new AuditTrail only if auditing is enabled- Parameters:
source
- Audit source component- Returns:
- An AuditTrail object if auditing is enabled, otherwise null
-
setExpression
-
addMessage
Add a message to the Audit Trail- Parameters:
message
- message to record in Audit Trail
-
setSource
-
toString
-