Package com.clover.sdk.v1.printer.job
Class PrintJob
- java.lang.Object
-
- com.clover.sdk.v1.printer.job.PrintJob
-
- All Implemented Interfaces:
Parcelable
- Direct Known Subclasses:
BalanceInquiryPrintJob
,GiftCardPrintJob
,ImagePrintJob
,ImagePrintJob2
,MultipleImagePrintJob
,StaticOrderBasedPrintJob
,TestFiscalPrintJob
,TestOrderPrintJob
,TestReceiptPrintJob
,TextPrintJob
,TokenRequestBasedPrintJob
,ViewPrintJob
public abstract class PrintJob extends Object implements Parcelable
Base class for print jobs. Flags may be added to a PrintJob to alter the results. Subclasses may automatically add some flags. Some flags are incompatible.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrintJob.Builder
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static int
FLAG_BILL
Indicate this print out is a bill of sale, transaction such as payments will not print outstatic int
FLAG_CUSTOMER
Print receipt for the customer with appropriate verbiage and without signature linestatic int
FLAG_EXPEDITOR
When this flag is set on a print job for an order receipt it will print subtitle "Expo Receipt" or localized version of it.static int
FLAG_FORCE_SIGNATURE
Force customer signature line on print out even if normally not requiredstatic int
FLAG_FORCE_TIP
Force customer tip line on print out even if normally not requiredstatic int
FLAG_MERCHANT
Print receipt for the merchant with signature line if requiredstatic int
FLAG_NO_SIGNATURE
Do not show customer signature line on print out even if normally requiredstatic int
FLAG_NO_TIP
static int
FLAG_NONE
static int
FLAG_REFUND
Indicate this print job is for a refund, additional refund information will be included on print outstatic int
FLAG_REPRINT
Indicate this is a reprint on the print outstatic int
FLAG_SALE
Deprecated.static int
FLAG_UNLABELED_ITEMS
When this flag is set on a print job for an order receipt it will print subtitle "Unlabeled Items" or localized version of it.static int
FLAG_USE_PRINT_GROUP
Enable the printing of print groups for the receipt.int
flags
boolean
printToAny
Deprecated.UsePrintJobsConnector.print(PrintJob)
to print to any suitable configured printer.-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PrintJob(int flags)
Deprecated.protected
PrintJob(Parcel in)
protected
PrintJob(PrintJob.Builder builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
cancel()
int
describeContents()
abstract Category
getPrinterCategory()
void
print(Context context, Account account)
Deprecated.void
print(Context context, Account account, Printer printer)
Deprecated.void
writeToParcel(Parcel dest, int f)
-
-
-
Field Detail
-
FLAG_NONE
public static final int FLAG_NONE
- See Also:
- Constant Field Values
-
FLAG_REPRINT
public static final int FLAG_REPRINT
Indicate this is a reprint on the print out- See Also:
- Constant Field Values
-
FLAG_BILL
public static final int FLAG_BILL
Indicate this print out is a bill of sale, transaction such as payments will not print out- See Also:
- Constant Field Values
-
FLAG_SALE
@Deprecated public static final int FLAG_SALE
Deprecated.- See Also:
- Constant Field Values
-
FLAG_REFUND
public static final int FLAG_REFUND
Indicate this print job is for a refund, additional refund information will be included on print out- See Also:
- Constant Field Values
-
FLAG_NO_SIGNATURE
public static final int FLAG_NO_SIGNATURE
Do not show customer signature line on print out even if normally required- See Also:
- Constant Field Values
-
FLAG_FORCE_SIGNATURE
public static final int FLAG_FORCE_SIGNATURE
Force customer signature line on print out even if normally not required- See Also:
- Constant Field Values
-
FLAG_CUSTOMER
public static final int FLAG_CUSTOMER
Print receipt for the customer with appropriate verbiage and without signature line- See Also:
- Constant Field Values
-
FLAG_MERCHANT
public static final int FLAG_MERCHANT
Print receipt for the merchant with signature line if required- See Also:
- Constant Field Values
-
FLAG_USE_PRINT_GROUP
public static final int FLAG_USE_PRINT_GROUP
Enable the printing of print groups for the receipt. Equivalent to the builder method.
-
FLAG_EXPEDITOR
public static final int FLAG_EXPEDITOR
When this flag is set on a print job for an order receipt it will print subtitle "Expo Receipt" or localized version of it. Also, please make sure you are printing whole order when you are setting this flag. The title "Expo Receipt" will help expeditor at restaurant to quickly identify this is a whole order receipt and he/she can assemble the order without missing a single itemNote : you can either set this flag
FLAG_EXPEDITOR
orFLAG_UNLABELED_ITEMS
but not both on a same print job- See Also:
- Constant Field Values
-
FLAG_UNLABELED_ITEMS
public static final int FLAG_UNLABELED_ITEMS
When this flag is set on a print job for an order receipt it will print subtitle "Unlabeled Items" or localized version of it. Please, make sure when you are setting this flag on a print job for an order receipt, print only unlabeled items, you can useStaticOrderPrintJob.Builder.itemIds(ArrayList)
to pass list of unlabeled line item ids.you can either set this flag or
FLAG_UNLABELED_ITEMS
FLAG_EXPEDITOR
but not both on a same print job- See Also:
- Constant Field Values
-
FLAG_NO_TIP
public static final int FLAG_NO_TIP
- See Also:
- Constant Field Values
-
FLAG_FORCE_TIP
public static final int FLAG_FORCE_TIP
Force customer tip line on print out even if normally not required- See Also:
- Constant Field Values
-
flags
public final int flags
-
printToAny
@Deprecated public final boolean printToAny
Deprecated.UsePrintJobsConnector.print(PrintJob)
to print to any suitable configured printer. This field is ignored when callingPrintJobsConnector.print(PrintJob)
orPrintJobsConnector.print(Printer, PrintJob)
.Indicates that this job should be printed to any available printer in case the default is not available. Defaults to false.
-
-
Constructor Detail
-
PrintJob
@Deprecated protected PrintJob(int flags)
Deprecated.
-
PrintJob
protected PrintJob(PrintJob.Builder builder)
-
PrintJob
protected PrintJob(Parcel in)
-
-
Method Detail
-
getPrinterCategory
public abstract Category getPrinterCategory()
-
print
@Deprecated public void print(Context context, Account account)
Deprecated.UsePrintJobsConnector.print(PrintJob)
. This method provides no mechanism to understand success or failure, and no way to retrieve the status of the print job.Send this PrintJob to the default printer.
-
print
@Deprecated public void print(Context context, Account account, Printer printer)
Deprecated.UsePrintJobsConnector.print(Printer, PrintJob)
. This method provides no mechanism to understand success or failure, and no way to retrieve the status of the print job.Send this PrintJob to the specified printer.
-
cancel
public void cancel()
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int f)
- Specified by:
writeToParcel
in interfaceParcelable
-
-