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 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 ProductInfo |
buildProductInfo(String name,
String barcode,
long netto,
SalesUnit salesUnit) |
private SaleSlotInfo |
buildSaleSlotInfo(String name) |
private TaxInfo |
buildTaxInfo(String name,
int vat) |
private TreasurerInfo |
buildTreasurerInfo(String name,
String ssn) |
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 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)
Copyright © 2016. All rights reserved.