Interface BBjAdminBBjReplicationJob

All Superinterfaces:
BBjAdminCommitPropertyWriter, BBjAdminCommitWriter, BBjAdminPropertyReader, BBjAdminPropertyWriter, BBjAdminReplicationJob, Remote, Serializable
All Known Subinterfaces:
BBjAdminBBjReplicationJob_1310

public interface BBjAdminBBjReplicationJob extends BBjAdminReplicationJob
A single BBj replication job that will be added to the replication system. This type of job contains a map of source files and/or directories from one system to destination directories and/or files on the same system or another system.

The following code sample shows how to interact with a BBjAdminBBjReplicationJob to get its enabled status as well as find out if there is currently an error condition on the job:

Java Sample

import com.basis.api.admin.BBjAdminBase;
import com.basis.api.admin.BBjAdminFactory;
import com.basis.api.admin.BBjAdminList;
import com.basis.api.admin.BBjAdminReplicationJob;

...
// Get the API instance
BBjAdminBase api = BBjAdminFactory.getBBjAdmin(InetAddress.getByName("myserver"), 2002, true, "admin", "mypassword");

// Get the list of replication jobs
BBjAdminList jobList = api.getReplicationJobs();

// Check each job to see if an error is present on any of them.
for (int j = 0; j < jobList.size(); j++) {
    BBjAdminReplicationJob job = jobList.get(j);
    String jobName = job.getString(BBjAdminReplicationJob.NAME);
    if (!job.getBoolean(BBjAdminReplicationJob.ENABLED)) {
        System.out.println("Job " + jobName + " is not currently enabled.");
    }
    if (job.getCurrentError() != null) {
        System.out.println("Job " + jobName + " currently has a problem: " + job.getCurrentError().getMessage());
    }
}

// Release the API instance
api.release();

BBj Sample

REM Get the API instance
api! = BBjAdminFactory.getBBjAdmin("admin", "admin123")

REM Get the list of replication jobs
jobList! = api!.getReplicationJobs()

REM Check each job to see if an error is present on any of them.
for j = 0 to jobList!.size() - 1
    job! = jobList!.get(j)
    jobName$ = job!.getString(BBjAdminReplicationJob.NAME)
    if job!.getBoolean(BBjAdminReplicationJob.ENABLED) = 0 then
        PRINT "Job " + jobName$ + " is not currently enabled."
    endif
    if job!.getCurrentError() <> NULL() then
        PRINT "Job " + jobName$ + " currently has a problem: " + job!.getCurrentError().getMessage()
    endif
next j

REM Release the API instance.
api!.release()