public class SynchronizationSample extends Object
Modifier and Type | Field and Description |
---|---|
private ServiceFactory |
apiServiceFactory |
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
SynchronizationSample(URL url,
Credentials credentials,
Transport transport) |
Modifier and Type | Method and Description |
---|---|
private CategoryInfo |
buildCategoryInfo(String name) |
private DayInfo |
buildDayInfo(String cashRegisterName,
long cash,
Date close,
int dayNumber,
Date open) |
private KeyboardEntryInfo |
buildKeyboardEntryInfo(int positionX,
int positionY,
int width,
int height,
KeyAction action) |
private KeyboardInfo |
buildKeyboardInfo(String name,
int width,
int height,
DeviceFormFactor deviceFormFactor) |
private OrderInfo |
buildOrderInfo(List<OrderItemInfo> orderItemInfos) |
private PaymentInfo |
buildPaymentInfo(int amount,
PaymentType paymentType) |
private PrintInfo |
buildPrintInfo(int receiptNumber,
PrintType printType,
String controlCode,
DeliveryType deliveryType,
long created) |
private ProductInfo |
buildProductInfo(String identifier,
String name,
String barcode,
long netto,
SalesUnit salesUnit) |
private SaleInfo |
buildSaleInfo(String cashRegisterName,
int receiptNumber,
List<SaleProductInfo> saleProducts,
List<PaymentInfo> payments,
List<PrintInfo> prints,
long absoluteDiscount,
int relativeDiscount,
long brutto,
String sellerIdentifier,
long vanillaBrutto,
long discount,
long vat,
List<VatRateSumInfo> vatRateSums,
String controlUnitId,
String tripIdentifier) |
private SaleProductInfo |
buildSaleProductInfo(long absoluteDiscount,
int relativeDiscount,
Date created,
long delta,
boolean isDeltaUnit,
long vanillaBrutto,
long brutto,
long discount,
long effectiveBrutto,
long netto,
long productBrutto,
long vat,
long vatRate,
SyncProduct original) |
private SaleSlotInfo |
buildSaleSlotInfo(String name) |
private TaxInfo |
buildTaxInfo(String name,
int vat) |
private TreasurerInfo |
buildTreasurerInfo(String name,
String ssn) |
private TripInfo |
buildTripInfo(String cashRegisterName,
int index,
String routeCode,
String tripCode) |
private VatRateSumInfo |
buildVatRateSum(long vanillaBrutto,
long vanillaNetto,
long vanillaVat,
long brutto,
long netto,
long vat,
Integer vatRate) |
private boolean |
doSync(MemoryLocalStorage storage) |
void |
test()
This test is written to be used from Diagnostics.java.
Test expects, that apiServiceFactory is connected to some non-empty service, which was already filled with data, contains seller, entities, etc. |
private final ServiceFactory apiServiceFactory
private static final org.apache.commons.logging.Log LOG
public SynchronizationSample(URL url, Credentials credentials, Transport transport)
public void test() throws Exception
This test is written to be used from Diagnostics.java.
Test expects, that apiServiceFactory is connected to some non-empty service, which was already filled with data, contains seller,
entities, etc.
So, this test should be called AFTER all other tests in Diagnostics (those tests actually prepare all data
and fill the remote service with required content).
If test is used from somewhere else (e.g. from unit tests), it should be called after all preparation is made, at least the code,
which runs before this test, should create/update/assure, that remote service has at least non-null seller info.
Exception
private boolean doSync(MemoryLocalStorage storage)
private ProductInfo buildProductInfo(String identifier, String name, String barcode, long netto, SalesUnit salesUnit)
private CategoryInfo buildCategoryInfo(String name)
private TreasurerInfo buildTreasurerInfo(String name, String ssn)
private OrderInfo buildOrderInfo(List<OrderItemInfo> orderItemInfos)
private KeyboardInfo buildKeyboardInfo(String name, int width, int height, DeviceFormFactor deviceFormFactor)
private KeyboardEntryInfo buildKeyboardEntryInfo(int positionX, int positionY, int width, int height, KeyAction action)
private SaleSlotInfo buildSaleSlotInfo(String name)
private DayInfo buildDayInfo(String cashRegisterName, long cash, Date close, int dayNumber, Date open)
private SaleProductInfo buildSaleProductInfo(long absoluteDiscount, int relativeDiscount, Date created, long delta, boolean isDeltaUnit, long vanillaBrutto, long brutto, long discount, long effectiveBrutto, long netto, long productBrutto, long vat, long vatRate, SyncProduct original)
private PaymentInfo buildPaymentInfo(int amount, PaymentType paymentType)
private PrintInfo buildPrintInfo(int receiptNumber, PrintType printType, String controlCode, DeliveryType deliveryType, long created)
private VatRateSumInfo buildVatRateSum(long vanillaBrutto, long vanillaNetto, long vanillaVat, long brutto, long netto, long vat, Integer vatRate)
private SaleInfo buildSaleInfo(String cashRegisterName, int receiptNumber, List<SaleProductInfo> saleProducts, List<PaymentInfo> payments, List<PrintInfo> prints, long absoluteDiscount, int relativeDiscount, long brutto, String sellerIdentifier, long vanillaBrutto, long discount, long vat, List<VatRateSumInfo> vatRateSums, String controlUnitId, String tripIdentifier)
Copyright © 2018. All rights reserved.