Class AuditTrail

java.lang.Object
VASSAL.script.expression.AuditTrail

public class AuditTrail extends Object
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 Details

    • AuditTrail

      public AuditTrail(AuditTrail audit)
      Copy constructor for AuditTrail
      Parameters:
      audit - AuditTrail to copy
    • AuditTrail

      public AuditTrail(Auditable source, String originalExpression, String sourceField)
      Create a new AuditTrail
      Parameters:
      source - Audit source component
      originalExpression - Expression being audited
      sourceField - Comment describing the source field of the expression being audited
    • AuditTrail

      public AuditTrail(Auditable source, String sourceField)
  • Method Details

    • isEnabled

      public static boolean isEnabled()
    • isReportingInProgress

      public static boolean isReportingInProgress()
    • setReportingInProgress

      public static void setReportingInProgress(boolean reportingInProgress)
    • create

      public static AuditTrail create(Auditable source, String originalExpression, String comment)
      Factory method to create a new AuditTrail only if auditing is enabled
      Parameters:
      source - Audit source component
      originalExpression - Expression being audited
      comment - Additional comment about the audit source
      Returns:
      An AuditTrail object if auditing is enabled, otherwise null
    • create

      public static AuditTrail create(Auditable source, Expression originalExpression, String comment)
      Factory method to create a new AuditTrail only if auditing is enabled
      Parameters:
      source - Audit source component
      originalExpression - Expression being audited
      comment - 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

      public static AuditTrail create(Auditable source, String originalExpression)
      Factory method to create a new AuditTrail only if auditing is enabled
      Parameters:
      source - Audit source component
      originalExpression - Expression being audited
      Returns:
      An AuditTrail object if auditing is enabled, otherwise null
    • create

      public static AuditTrail create(Auditable source, Expression originalExpression)
      Factory method to create a new AuditTrail only if auditing is enabled
      Parameters:
      source - Audit source component
      originalExpression - Expression being audited
      Returns:
      An AuditTrail object if auditing is enabled, otherwise null
    • create

      public static AuditTrail create(Auditable source, FormattedString originalExpression)
    • create

      public static AuditTrail create(Auditable source)
      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

      public void setExpression(String expression)
    • addMessage

      public void addMessage(String message)
      Add a message to the Audit Trail
      Parameters:
      message - message to record in Audit Trail
    • setSource

      public void setSource(Auditable source)
    • toString

      public String toString()
      Override toString to return a formatted Audit Report
      Overrides:
      toString in class Object
      Returns:
      Audit Report