Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.dataobjs
Class DBAudit

    java.lang.Object
      com.knowgate.dataobjs.DBAudit

    public class DBAudit

extends java.lang.Object

Keeps an operations log at a file or database table.

Constructor Summary
`DBAudit()`

Method Summary
`static java.lang.String` | `analyze(java.lang.String sFile)`
`protected void` | `finalize()`
`static void` | `log(JDCConnection oConn, short iIdEntity, java.lang.String sCoOp, java.lang.String sGUUser, java.lang.String sGUEntity1, java.lang.String sGUEntity2, int iIdTransact, int iIPAddr, java.lang.String sTxParams1, java.lang.String sTxParams2)` Write a log entry into k_auditing database table
`static void` | `log(short iIdEntity, java.lang.String sCoOp, java.lang.String sGUUser, java.lang.String sGUEntity1, java.lang.String sGUEntity2, int iIdTransact, java.lang.String sIPAddr, java.lang.String sTxParams1, java.lang.String sTxParams2)` Write a log entry into javatrx.txt file
`static void` | `main(java.lang.String[] argv)`
`static void` | `setAuditFile(java.lang.String sFilePath)` Set path to log output file

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBAudit

    public DBAudit()

Method Detail

### finalize

    protected void finalize()
                     throws java.io.IOException

  Overrides:
    `finalize` in class `java.lang.Object`
  Throws:
    `java.io.IOException`

### log

    public static void log(JDCConnection oConn,
                           short iIdEntity,
                           java.lang.String sCoOp,
                           java.lang.String sGUUser,
                           java.lang.String sGUEntity1,
                           java.lang.String sGUEntity2,
                           int iIdTransact,
                           int iIPAddr,
                           java.lang.String sTxParams1,
                           java.lang.String sTxParams2)
                    throws java.sql.SQLException

  Write a log entry into k_auditing database table

  Parameters:
    `oConn` - Database connection, if null then data if dumped to a flat file.
    `iIdEntity` - - Internal ClassId short nombre for audited class.
    `sCoOp` - - Operation Code (4 alphanumeric digits)
    `sGUUser` - - GUID of user performing the operation (máx. 32 characters)
    `sGUEntity1` - - GUID of primary entity (or source entitity) for the operation (máx. 32 characters)
    `sGUEntity2` - - GUID of secondary entity (or target entitity) for the operation (máx. 32 characters)
    `iIdTransact` - - Transaction Identifier
    `iIPAddr` - - User IP address
    `sTxParams1` - - Aditional parameters related to entity 1 (máx 255 characters)
    `sTxParams2` - - Aditional parameters related to entity 2 (máx 255 characters)
  Throws:
    `java.sql.SQLException`
    `java.lang.SecurityException`

### log

    public static void log(short iIdEntity,
                           java.lang.String sCoOp,
                           java.lang.String sGUUser,
                           java.lang.String sGUEntity1,
                           java.lang.String sGUEntity2,
                           int iIdTransact,
                           java.lang.String sIPAddr,
                           java.lang.String sTxParams1,
                           java.lang.String sTxParams2)

  Write a log entry into javatrx.txt file

  Parameters:
    `iIdEntity` - - Internal ClassId short nombre for audited class.
    `sCoOp` - - Operation Code (4 alphanumeric digits)
    `sGUUser` - - GUID of user performing the operation (máx. 32 characters)
    `sGUEntity1` - - GUID of primary entity (or source entitity) for the operation (máx. 32 characters)
    `sGUEntity2` - - GUID of secondary entity (or target entitity) for the operation (máx. 32 characters)
    `iIdTransact` - - Transaction Identifier
    `iIPAddr` - - User IP address
    `sTxParams1` - - Aditional parameters related to entity 1 (máx 255 characters)
    `sTxParams2` - - Aditional parameters related to entity 2 (máx 255 characters)
  Throws:
    `java.lang.SecurityException` - if there aren't sufficient permissions for writting at javatrc.txt file

### setAuditFile

    public static void setAuditFile(java.lang.String sFilePath)
                             throws java.io.IOException

  Set path to log output file

  Parameters:
    `sFilePath` - Physical file path
  Throws:
    `java.io.IOException`

### analyze

    public static java.lang.String analyze(java.lang.String sFile)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### main

    public static void main(java.lang.String[] argv)
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD