Package com.clover.sdk.v1.printer
Class IPrinterService.Default
- java.lang.Object
-
- com.clover.sdk.v1.printer.IPrinterService.Default
-
- All Implemented Interfaces:
IInterface
,IPrinterService
- Enclosing interface:
- IPrinterService
public static class IPrinterService.Default extends Object implements IPrinterService
Default implementation for IPrinterService.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.clover.sdk.v1.printer.IPrinterService
IPrinterService.Default, IPrinterService.Stub
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IBinder
asBinder()
Printer
getPrinterById(String id, ResultStatus status)
Returns the printer which matches thePrinter.getUuid()
if any, or null if none.List<Printer>
getPrinters(ResultStatus status)
Get all configured printers for this merchant.List<Printer>
getPrintersByCategory(Category category, ResultStatus status)
Get all printers configured by this merchant for the given category.TypeDetails
getPrinterTypeDetails(Printer p, ResultStatus status)
Returns the TypeDetails for the given printer.boolean
isPrinterSet(Category category, ResultStatus status)
Returns true if there is any configured printer in the given category.void
removePrinter(Printer p, ResultStatus status)
Removes a printer from being configured.Printer
setPrinter(Printer p, ResultStatus status)
Adds a printer optionally with a category.
-
-
-
Method Detail
-
getPrinters
public List<Printer> getPrinters(ResultStatus status) throws RemoteException
Get all configured printers for this merchant. A printer must be associated to at least one category to be considered configured. The same printer may be configured for more than one category and if so will appear multiple times in the returned list.- Specified by:
getPrinters
in interfaceIPrinterService
- Throws:
RemoteException
-
getPrintersByCategory
public List<Printer> getPrintersByCategory(Category category, ResultStatus status) throws RemoteException
Get all printers configured by this merchant for the given category.- Specified by:
getPrintersByCategory
in interfaceIPrinterService
- Throws:
RemoteException
-
isPrinterSet
public boolean isPrinterSet(Category category, ResultStatus status) throws RemoteException
Returns true if there is any configured printer in the given category.- Specified by:
isPrinterSet
in interfaceIPrinterService
- Throws:
RemoteException
-
getPrinterById
public Printer getPrinterById(String id, ResultStatus status) throws RemoteException
Returns the printer which matches thePrinter.getUuid()
if any, or null if none. This may return a printer which has not been configured.- Specified by:
getPrinterById
in interfaceIPrinterService
- Throws:
RemoteException
-
removePrinter
public void removePrinter(Printer p, ResultStatus status) throws RemoteException
Removes a printer from being configured. If a category is supplied then the printer has only the configuration for that category removed. If no category is supplied then the printer is completely removed.- Specified by:
removePrinter
in interfaceIPrinterService
- Throws:
RemoteException
-
setPrinter
public Printer setPrinter(Printer p, ResultStatus status) throws RemoteException
Adds a printer optionally with a category. If a new printer is added without a category it is unconfigured. A new or existing printer may configured by supplying a category.- Specified by:
setPrinter
in interfaceIPrinterService
- Throws:
RemoteException
-
getPrinterTypeDetails
public TypeDetails getPrinterTypeDetails(Printer p, ResultStatus status) throws RemoteException
Returns the TypeDetails for the given printer.- Specified by:
getPrinterTypeDetails
in interfaceIPrinterService
- Throws:
RemoteException
-
asBinder
public IBinder asBinder()
- Specified by:
asBinder
in interfaceIInterface
-
-