public class KeyboardEntryService extends Object
User: Sergey, Date: 29.03.14 20:24
.Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
KeyboardEntryService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
IdentifierInfo |
create(int version,
KeyboardEntryInfo keyboardEntryInfo)
Create keyboardEntry on the server.
|
void |
delete(int version,
String identifier)
Delete entity from the server.
|
KeyboardEntryInfo |
get(Integer version,
String identifier)
Returns an entity.
|
List<KeyboardEntryInfo> |
list(Integer version)
Returns list of entities.
|
List<KeyboardEntryInfo> |
list(Integer version,
Integer firstResult,
Integer maxResults,
String like,
KeyboardEntryInfo.Fields orderBy,
Boolean orderDesc)
Returns list of entities.
|
List<KeyboardEntryInfo> |
listDiff(int versionFrom,
int versionTo)
Returns list of item changes between two versions.
|
void |
put(int version,
KeyboardEntryInfo keyboardEntryInfo)
Put keyboardEntry to the server.
|
private URL url
private Credentials credentials
private Transport transport
public KeyboardEntryService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic KeyboardEntryInfo get(Integer version, String identifier)
version
- latest version of seller, may be null (if latest data needed)identifier
- identifies entity. must match to Constraints.WINDOWS_FILENAME_REGEX
VersionConflictJsonException
- if version mismatchNotFoundJsonException
- if entity is not foundpublic void put(int version, KeyboardEntryInfo keyboardEntryInfo)
version
- expected latest version of sellerkeyboardEntryInfo
- data to putVersionConflictJsonException
- if version mismatchReferenceNotFoundJsonException
- if category in KeyboardEntryInfo.keyboard
is not found
if product in KeyboardEntryInfo.product
is not foundpublic IdentifierInfo create(int version, KeyboardEntryInfo keyboardEntryInfo)
version
- expected latest version of sellerkeyboardEntryInfo
- data to putVersionConflictJsonException
- if version mismatchReferenceNotFoundJsonException
- if category in KeyboardEntryInfo.keyboard
is not found
if product in KeyboardEntryInfo.product
is not foundpublic void delete(int version, String identifier)
version
- current seller versionidentifier
- identifies entity. must match to Constraints.WINDOWS_FILENAME_REGEX
VersionConflictJsonException
- if version mismatchpublic List<KeyboardEntryInfo> listDiff(int versionFrom, int versionTo)
versionFrom
- version from includedversionTo
- version to includedKeyboardEntryInfo.deleted
= true)public List<KeyboardEntryInfo> list(Integer version)
version
- version or null if fresh data requiredpublic List<KeyboardEntryInfo> list(Integer version, Integer firstResult, Integer maxResults, String like, KeyboardEntryInfo.Fields orderBy, Boolean orderDesc)
firstResult
- when pagination starts or nullmaxResults
- amount of items per page or nulllike
- search string filter or nullorderBy
- field to order by, possible values are "IDENTIFIER", "PRODUCT_NAME", "PRODUCT_BARCODE",
"PRODUCT_NETTO", "PRODUCT_SALES_UNIT", "PRODUCT_COUNTED_IN_PRICE", "KEYBOARD_NAME",
"SUB_KEYBOARD_NAME", "POSITION_X", "POSITION_Y", "WIDTH", "HEIGHT", "KEY_ACTION", "LABEL"orderDesc
- field to direction of orderingversion
- version or null if fresh data requiredCopyright © 2016. All rights reserved.