com.partnersoft.v3x.apps.Staker.server
Interface JobLibrarian

All Known Implementing Classes:
LocalJobLibrarian, SocketJobLibrarian

public interface JobLibrarian

A front end to the JobLibrary. Handles locking, merging, checkout, etc. Library clients should use this class to access the library; administrators can use the library directly. Also encapsulates any network transfers necessary.


Method Summary
 void addJob(Job newJob)
          Add a new job to the library.
 void addJobLibraryListener(JobLibraryListener nosey)
           
 java.util.Iterator allHeaders()
          Get a list of all the job headers in the library.
 java.util.Iterator allJobNumbers()
          Get a list of all the job numbers.
 java.util.ArrayList allJobNumbersList()
          Get a list of all the job numbers.
 java.util.Iterator allJobsAssignedTo(java.lang.String stakerName)
          Get a list of all the job numbers assigned to the given staker
 void checkinHeader(CheckedOutJobHeader header)
          Check in a job header; merges it with any other versions in the library.
 void checkinJob(CheckedOutJob job)
          Check in job with modifications.
 CheckedOutJobHeader checkoutHeader(java.lang.String jobNumber)
           
 CheckedOutJob checkoutJob(java.lang.String jobNumber)
          Check out a job for modifications.
 void close()
          Close down for the day.
 void createJob(java.lang.String jobName)
           
 void fireJobChanged(java.lang.String jobNumber)
          Fires a change event on a job - usually results in the job being resent to external interfaces etc.
 void forceReleaseJob(java.lang.String jobNumber)
          Release job; this will eject the checkout for that job - use with caution.
 boolean jobExists(java.lang.String jobNumber)
          Check if a job exists in the library.
 java.lang.String jobStatus(java.lang.String jobNumber)
          Get status for a job.
 java.lang.Object processCustomRequest(CustomLibraryRequest request)
          Process a special request.
 void releaseHeader(CheckedOutJobHeader header)
          Release a job header from checkout; doesn't modify.
 void releaseJob(CheckedOutJob job)
          Release job - checks in without modifications.
 void removeJobLibraryListener(JobLibraryListener nosey)
           
 JobHeader viewHeader(java.lang.String jobNumber)
          See the job header corresponding to the job number.
 Job viewJob(java.lang.String jobNumber)
          See the job corresponding to the job number.
 

Method Detail

allHeaders

java.util.Iterator allHeaders()
                              throws JobLibraryException
Get a list of all the job headers in the library.

Throws:
JobLibraryException

allJobNumbers

java.util.Iterator allJobNumbers()
                                 throws JobLibraryException
Get a list of all the job numbers.

Throws:
JobLibraryException

allJobNumbersList

java.util.ArrayList allJobNumbersList()
                                      throws JobLibraryException
Get a list of all the job numbers.

Throws:
JobLibraryException

allJobsAssignedTo

java.util.Iterator allJobsAssignedTo(java.lang.String stakerName)
                                     throws JobLibraryException
Get a list of all the job numbers assigned to the given staker

Throws:
JobLibraryException

createJob

void createJob(java.lang.String jobName)
               throws JobLibraryException
Throws:
JobLibraryException

addJob

void addJob(Job newJob)
            throws JobLibraryException
Add a new job to the library.

Throws:
JobLibraryException

viewHeader

JobHeader viewHeader(java.lang.String jobNumber)
                     throws JobLibraryException
See the job header corresponding to the job number.

Throws:
JobLibraryException

checkoutHeader

CheckedOutJobHeader checkoutHeader(java.lang.String jobNumber)
                                   throws JobLibraryException
Throws:
JobLibraryException

releaseHeader

void releaseHeader(CheckedOutJobHeader header)
                   throws JobLibraryException
Release a job header from checkout; doesn't modify.

Throws:
JobLibraryException

checkinHeader

void checkinHeader(CheckedOutJobHeader header)
                   throws JobLibraryException
Check in a job header; merges it with any other versions in the library.

Throws:
JobLibraryException

viewJob

Job viewJob(java.lang.String jobNumber)
            throws JobLibraryException
See the job corresponding to the job number.

Throws:
JobLibraryException

checkoutJob

CheckedOutJob checkoutJob(java.lang.String jobNumber)
                          throws JobLibraryException
Check out a job for modifications. This grants an exclusive lock.

Throws:
JobLibraryException

releaseJob

void releaseJob(CheckedOutJob job)
                throws JobLibraryException
Release job - checks in without modifications.

Throws:
JobLibraryException

fireJobChanged

void fireJobChanged(java.lang.String jobNumber)
                    throws JobLibraryException
Fires a change event on a job - usually results in the job being resent to external interfaces etc.

Throws:
JobLibraryException

forceReleaseJob

void forceReleaseJob(java.lang.String jobNumber)
                     throws JobLibraryException
Release job; this will eject the checkout for that job - use with caution.

Throws:
JobLibraryException

checkinJob

void checkinJob(CheckedOutJob job)
                throws JobLibraryException
Check in job with modifications. Merges header with current version in library; replaces other job information with new copy.

Throws:
JobLibraryException

processCustomRequest

java.lang.Object processCustomRequest(CustomLibraryRequest request)
                                      throws JobLibraryException
Process a special request.

Throws:
JobLibraryException

close

void close()
           throws JobLibraryException
Close down for the day.

Throws:
JobLibraryException

jobExists

boolean jobExists(java.lang.String jobNumber)
                  throws JobLibraryException
Check if a job exists in the library.

Throws:
JobLibraryException

jobStatus

java.lang.String jobStatus(java.lang.String jobNumber)
                           throws JobLibraryException
Get status for a job.

Throws:
JobLibraryException

addJobLibraryListener

void addJobLibraryListener(JobLibraryListener nosey)

removeJobLibraryListener

void removeJobLibraryListener(JobLibraryListener nosey)