Package com.clover.sdk.v1.printer.job
Class PrintJobsContract
- java.lang.Object
-
- com.clover.sdk.v1.printer.job.PrintJobsContract
-
public class PrintJobsContract extends Object
Contract for communication with the print jobs provider. The print jobs provider is used for interacting with Clover's print queue. A subset of the total functionality of the print job queue is exposed in this interface. Specifically, clients are allowed to add print jobs (PrintJobsConnector.print(Printer, PrintJob)
and get the state of a print job (PrintJobsConnector.getState(String)
. It is highly recommended to usePrintJobsConnector
to interface with the print job queue, but you can also useContentProvider.call(String, String, Bundle)
directly applying the contract documented by this class.
-
-
Field Summary
Fields Modifier and Type Field Description static Uri
AUTHORITY_URI
A content:// style uri to the authority for the print job provider.static String
EXTRA_PRINTER
Extra required for call methodMETHOD_PRINT
, aPrinter
where the print job shall be printed.static String
EXTRA_PRINTJOB
Extra required for call methodMETHOD_PRINT
, aPrintJob
, the print job to print.static String
EXTRA_PRINTJOB_ID
Extra required for call methodMETHOD_GET_STATE
, aString
, the print job ID to for which to obtain status.static String
EXTRA_PRINTJOB_STATE
Extra required for call methodMETHOD_GET_PRINTJOB_IDS
, anint
, the state of the to be returned print jobs.static String
METHOD_GET_PRINTJOB_IDS
Call method name to invoke "get print jobs".static String
METHOD_GET_STATE
Call method name to invoke "get state".static String
METHOD_PRINT
Call method name to invoke "print".static String
RESULT_GET_PRINTJOB_IDS
Result returned from from call methodMETHOD_GET_PRINTJOB_IDS
, anArrayList
, the print job IDs with the given state.static String
RESULT_GET_STATE
Result returned from from call methodMETHOD_GET_STATE
, anint
, the print job state.static String
RESULT_PRINT
Result returned from from call methodMETHOD_PRINT
, aString
, the print job ID.static int
STATE_DONE
Print job status: done.static int
STATE_ERROR
Print job status: error.static int
STATE_IN_QUEUE
Print job status: in queue.static int
STATE_PRINTING
Print job status: printing.
-
Constructor Summary
Constructors Constructor Description PrintJobsContract()
-
-
-
Field Detail
-
AUTHORITY_URI
public static final Uri AUTHORITY_URI
A content:// style uri to the authority for the print job provider.
-
STATE_IN_QUEUE
public static final int STATE_IN_QUEUE
Print job status: in queue. The print job is queued and will be printed shortly, assuming the printer is not offline and is otherwise able to print.- See Also:
- Constant Field Values
-
STATE_PRINTING
public static final int STATE_PRINTING
Print job status: printing. The print job is being sent to the printer.- See Also:
- Constant Field Values
-
STATE_DONE
public static final int STATE_DONE
Print job status: done. The print job has sent the printer with no errors.- See Also:
- Constant Field Values
-
STATE_ERROR
public static final int STATE_ERROR
Print job status: error. The print job was sent to the printer but printing failed. The system will re-attempt to print the print job shortly.- See Also:
- Constant Field Values
-
METHOD_PRINT
public static final String METHOD_PRINT
Call method name to invoke "print". When invoked, the extras bundle must include the printer (EXTRA_PRINTER
) and the print job (EXTRA_PRINTJOB
). The result bundle will contain aString
that is the print job ID at the keyRESULT_PRINT
.
-
METHOD_GET_STATE
public static final String METHOD_GET_STATE
Call method name to invoke "get state". When invoked, the extras bundle must include the print job ID (EXTRA_PRINTJOB_ID
). The result bundle will contain anint
that is the print job state at the keyRESULT_GET_STATE
.
-
METHOD_GET_PRINTJOB_IDS
public static final String METHOD_GET_PRINTJOB_IDS
Call method name to invoke "get print jobs". When invoked, the extras bundle must include a print job state (EXTRA_PRINTJOB_STATE
). Only print jobs that have the given state are returned. The result bundle will contain anArrayList
that is the matching print job IDs at the keyRESULT_GET_PRINTJOB_IDS
.
-
EXTRA_PRINTER
public static final String EXTRA_PRINTER
Extra required for call methodMETHOD_PRINT
, aPrinter
where the print job shall be printed.- See Also:
METHOD_PRINT
, Constant Field Values
-
EXTRA_PRINTJOB
public static final String EXTRA_PRINTJOB
Extra required for call methodMETHOD_PRINT
, aPrintJob
, the print job to print.- See Also:
METHOD_PRINT
, Constant Field Values
-
EXTRA_PRINTJOB_ID
public static final String EXTRA_PRINTJOB_ID
Extra required for call methodMETHOD_GET_STATE
, aString
, the print job ID to for which to obtain status.- See Also:
METHOD_GET_STATE
, Constant Field Values
-
EXTRA_PRINTJOB_STATE
public static final String EXTRA_PRINTJOB_STATE
Extra required for call methodMETHOD_GET_PRINTJOB_IDS
, anint
, the state of the to be returned print jobs.- See Also:
METHOD_GET_PRINTJOB_IDS
, Constant Field Values
-
RESULT_PRINT
public static final String RESULT_PRINT
Result returned from from call methodMETHOD_PRINT
, aString
, the print job ID.- See Also:
METHOD_PRINT
, Constant Field Values
-
RESULT_GET_STATE
public static final String RESULT_GET_STATE
Result returned from from call methodMETHOD_GET_STATE
, anint
, the print job state.
-
RESULT_GET_PRINTJOB_IDS
public static final String RESULT_GET_PRINTJOB_IDS
Result returned from from call methodMETHOD_GET_PRINTJOB_IDS
, anArrayList
, the print job IDs with the given state.
-
-