net.sf.jcopist.service
Interface IDocumentService


public interface IDocumentService

Describes the main service, which generates and sends documents.


Method Summary
 java.util.Collection<java.lang.String> getPrintersNameList()
           
 Result process(Job _job)
          Processes a job synchronously.
 void retryFailed()
          Get all failed document in database and resubmit it to the DocumentManager
 void submit(Job _job)
          Submits a job for asynchronous processing.
 void submit(Job[] _jobs)
          Submits a list of jobs for asynchronous processing.
 

Method Detail

process

Result process(Job _job)
               throws UnavailableException,
                      java.lang.IllegalArgumentException,
                      ServerException
Processes a job synchronously.
The generated document is returned to the client.

Parameters:
_job - the job. As the document is returned directly to the client, the transports property must be null.
Returns:
the resulting document.
Throws:
UnavailableException - if the synchronous service is not activated on the server, or if the server is shutting down and doesn't accept any more requests.
java.lang.IllegalArgumentException - if the job's transports property is not null.
ServerException - if an internal error occurs on the server side.

submit

void submit(Job _job)
            throws UnavailableException,
                   RejectedException,
                   java.lang.IllegalArgumentException,
                   ServerException
Submits a job for asynchronous processing.
The generated document will be sent according to the specified transports.

Parameters:
_job - the job. As the document is sent asynchronously, the transport property must contain at least one element.
Throws:
UnavailableException - if the synchronous service is not activated on the server, or if the server is shutting down and doesn't accept any more requests.
RejectedException - if the server can't process the request at the current time. The client might submit the request again later.
java.lang.IllegalArgumentException - if the job's transports property is empty.
ServerException - if an internal error occurs on the server side.

retryFailed

void retryFailed()
                 throws ServerException
Get all failed document in database and resubmit it to the DocumentManager

Throws:
ServerException

submit

void submit(Job[] _jobs)
            throws UnavailableException,
                   RejectedException,
                   java.lang.IllegalArgumentException,
                   ServerException
Submits a list of jobs for asynchronous processing.

Parameters:
_jobs - the job. As the document is sent asynchronously, the transport property of each Job must contain at least one element.
Throws:
UnavailableException - if the synchronous service is not activated on the server, or if the server is shutting down and doesn't accept any more requests.
RejectedException - if the server can't process the request at the current time. The client might submit the request again later.
java.lang.IllegalArgumentException - if one of the job's transports property is empty.
ServerException - if an internal error occurs on the server side.

getPrintersNameList

java.util.Collection<java.lang.String> getPrintersNameList()
Returns:
the list of available OpenOffice PrinterService


Copyright © 2007. All Rights Reserved.