public class KeyboardService extends Object
User: Sergey, Date: 18.03.14 18:14
.Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
KeyboardService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
IdentifierInfo |
create(int version,
KeyboardInfo keyboardInfo)
Create keyboard on the server.
|
void |
delete(int version,
String identifier)
Delete keyboard from the server.
|
KeyboardInfo |
get(Integer version,
String identifier)
Returns an entity.
|
List<KeyboardInfo> |
list(Integer version)
Returns list of entities.
|
List<KeyboardInfo> |
list(Integer version,
Integer firstResult,
Integer maxResults,
String like,
KeyboardInfo.Fields orderBy,
Boolean orderDesc)
Returns list of entities.
|
List<KeyboardInfo> |
listDiff(int versionFrom,
int versionTo)
Returns list of item changes between two versions.
|
void |
put(int version,
KeyboardInfo keyboardInfo)
Put keyboard to the server.
|
private URL url
private Credentials credentials
private Transport transport
public KeyboardService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic KeyboardInfo get(Integer version, String identifier)
version
- latest version of seller, may be null (if latest data needed)identifier
- identifies entityVersionConflictJsonException
- if version mismatchNotFoundJsonException
- if entity is not foundKeyboardServiceSample
public void put(int version, KeyboardInfo keyboardInfo)
version
- expected latest version of sellerkeyboardInfo
- data to putVersionConflictJsonException
- if version mismatchpublic IdentifierInfo create(int version, KeyboardInfo keyboardInfo)
version
- expected latest version of sellerkeyboardInfo
- data to putVersionConflictJsonException
- if version mismatchpublic void delete(int version, String identifier)
version
- current version of the entityidentifier
- identifies entityVersionConflictJsonException
- if version mismatchpublic List<KeyboardInfo> listDiff(int versionFrom, int versionTo)
versionFrom
- version from includedversionTo
- version to includedKeyboardInfo.deleted
= true)public List<KeyboardInfo> list(Integer version)
version
- version or null if fresh data requiredpublic List<KeyboardInfo> list(Integer version, Integer firstResult, Integer maxResults, String like, KeyboardInfo.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", "NAME", "WIDTH", "HEIGHT", "DEVICE_FORM_FACTOR"orderDesc
- field to direction of orderingversion
- version or null if fresh data requiredCopyright © 2015. All rights reserved.