Interface BBjAdminAuditReplicationJob
- All Superinterfaces:
BBjAdminCommitPropertyWriter
,BBjAdminCommitWriter
,BBjAdminPropertyReader
,BBjAdminPropertyWriter
,BBjAdminReplicationJob
,Remote
,Serializable
In BBj 13.0 and higher, Data Change Auditing is the process of building an audit trail via Change Audit Jobs. Each job consists of a job name, location for the audit log database(s), a list of one or more directories and/or data files to be monitored, and the frequency at which the log database should rollover.
When an application changes a monitored data file using direct file access calls from a BBj program or via SQL, the auditing system logs the change and type of change to an "audit log database." At any time, an administrator can query the log database using the interface built into the Enterprise Manager or query the log database tables directly using SQL.
When using change auditing, overhead is typically minimal since in most cases, administrators configure jobs to use the default asynchronous mode. In asynchronous mode, the audit system adds audit details to a background queue rather than waiting for the log operation to complete before continuing. In synchronous mode (not recommended) it completes the logging of the audit details before allowing the original write or remove operation on the file to complete.
BBj Sample Code
declare BBjAdminBase api!
declare BBjAdminList auditJobs!
declare BBjAdminAuditReplicationJob job!
api! = BBjAdminFactory.getBBjAdmin("admin", "admin123")
REM Get a list of all the audit jobs currently configured
auditJobs! = api!.getAuditJobs()
print "* Currently configured audit jobs *"
if auditJobs!.size() > 0
for i = 0 to auditJobs!.size() - 1
job! = cast(BBjAdminAuditReplicationJob, auditJobs!.get(i))
print " " + job!.getString(BBjAdminAuditReplicationJob.NAME)
next i
endif
print
print "* CREATE A NEW AUDIT JOB *"
print "* Note: Job will be configured to rollover every month *"
input "Enter the name for a new audit job: ", name$
input "Enter the full path for the audit database root directory (must be empty): ", dbRoot$
input "Enter the full path to a file to add to the job: ", filename$
REM Create the new job with the appropriate rollover frequency and add a single file to the job
rolloverFrequency = BBjAdminAuditReplicationJob.ROLLOVER_MONTHLY
job! = api!.createAuditReplicationJob(name$,dbRoot$,0,rolloverFrequency,1)
job!.addFile(filename$,0,"")
job!.commit()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
static final String
static final int
static final int
static final String
static final int
static final int
Fields inherited from interface com.basis.api.admin.BBjAdminReplicationJob
ADVISORY_LOCKING, ENABLED, EVENT_EMAIL_RECIPIENTS, EVENT_EMAIL_SERVICE, EVENT_HANDLER, EVENT_HANDLER_CLASSPATH, EVENT_HANDLER_CONFIG, EVENT_HANDLER_PWD, EVENT_HANDLER_USER, EVENT_HANDLER_WORKING_DIR, ID, LOCAL, MAX_BANDWIDTH, NAME, RECOPY_ENABLED, STATE_COPYING_FILES, STATE_ERROR, STATE_NOT_SINCE_START, SYNCHRONOUS
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExclude
(String p_source) Adds a file to the list of files to exclude from replication.void
Adds the specified file to the list of files being audited.void
Clears all exclusions.void
Clears the entire list of files.Returns a list of the excluded files and directories.getFiles()
Returns a list of files and directories that will be audited.void
removeFile
(String p_file) Removes the specified file from the list of files being audited.Methods inherited from interface com.basis.api.admin.BBjAdminCommitPropertyWriter
getChangedProperties, getClearedProperties, getOriginalProperties
Methods inherited from interface com.basis.api.admin.BBjAdminCommitWriter
commit, rollback
Methods inherited from interface com.basis.api.admin.BBjAdminPropertyReader
checkValueEqual, contains, contains, getBoolean, getDouble, getInt, getList, getLong, getProperties, getString, getType, getTypes, getValue
Methods inherited from interface com.basis.api.admin.BBjAdminPropertyWriter
addType, canAddNewProperties, canClear, clear, clearProperties, clearProperty, getReadOnly, hasChanged, isReadOnly, setBoolean, setDouble, setInt, setList, setLong, setProperties, setString, setValue
Methods inherited from interface com.basis.api.admin.BBjAdminReplicationJob
cancelDisableWhenCaughtUpToNow, disableWhenCaughtUpToNow, getCurrentError, getDescriptiveProperties, getLastInSync, getLastInSyncString, getLastLag, getLastOpRate, getLastTimestamp, getLastTimestampRatio, getLastTimestampSummary, getLastWaitForLog, getStartProcesses, setDescriptiveProperties, setEnabled, waitingToDisable
-
Field Details
-
ROLLOVER_TYPE
- See Also:
-
ROLLOVER_FREQUENCY
- See Also:
-
DB_ROOT
- See Also:
-
ROLLOVER_NONE
static final int ROLLOVER_NONE- See Also:
-
ROLLOVER_DAILY
static final int ROLLOVER_DAILY- See Also:
-
ROLLOVER_WEEKLY
static final int ROLLOVER_WEEKLY- See Also:
-
ROLLOVER_MONTHLY
static final int ROLLOVER_MONTHLY- See Also:
-
ROLLOVER_YEARLY
static final int ROLLOVER_YEARLY- See Also:
-
-
Method Details
-
getFiles
BBjAdminList<String> getFiles()Returns a list of files and directories that will be audited. -
addFile
Adds the specified file to the list of files being audited.- Parameters:
p_file
-p_advisory
- TODOp_modes
- TODO- Throws:
BBjAdminException
-
removeFile
Removes the specified file from the list of files being audited.- Parameters:
p_file
-- Throws:
BBjAdminException
-
clearFiles
Clears the entire list of files.- Throws:
BBjAdminException
-
clearExclusions
Clears all exclusions.- Throws:
BBjAdminException
-
addExclude
Adds a file to the list of files to exclude from replication.- Parameters:
p_source
-- Throws:
BBjAdminException
-
getExclusions
Returns a list of the excluded files and directories.- Throws:
BBjAdminException
-