public class TreasurerService extends Object
Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
TreasurerService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
IdentifierInfo |
create(int version,
TreasurerInfo treasurerInfo)
Create treasurer on the server.
|
void |
delete(int version,
String identifier)
Delete entity from the server.
|
TreasurerInfo |
get(Integer version,
String identifier)
Returns an treasurer entity.
|
List<TreasurerInfo> |
list(Integer version)
Returns list of entities.
|
List<TreasurerInfo> |
list(Integer version,
Integer firstResult,
Integer maxResults,
String like,
TreasurerInfo.Fields orderBy,
Boolean orderDesc)
Returns list of entities.
|
List<TreasurerInfo> |
listDiff(int versionFrom,
int versionTo)
Returns list of item changes between two versions.
|
void |
put(int version,
TreasurerInfo treasurerInfo)
Put treasurer to the server.
|
private URL url
private Credentials credentials
private Transport transport
public TreasurerService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic TreasurerInfo 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, TreasurerInfo treasurerInfo)
version
- expected latest version of sellertreasurerInfo
- data to putVersionConflictJsonException
- if version mismatchpublic IdentifierInfo create(int version, TreasurerInfo treasurerInfo)
version
- expected latest version of sellertreasurerInfo
- data to putVersionConflictJsonException
- if version mismatchpublic void delete(int version, String identifier)
version
- current seller versionidentifier
- identifies entity. must match to Constraints.WINDOWS_FILENAME_REGEX
VersionConflictJsonException
- if version mismatchNotFoundJsonException
- if entity is not foundpublic List<TreasurerInfo> listDiff(int versionFrom, int versionTo)
versionFrom
- version from includedversionTo
- version to includedcom.srv4pos.server.api.treasurer.TreasurerInfo#isDeleted()
= true)public List<TreasurerInfo> list(Integer version)
version
- version or null if fresh data requiredpublic List<TreasurerInfo> list(Integer version, Integer firstResult, Integer maxResults, String like, TreasurerInfo.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 TreasurerInfo.Fields
orderDesc
- field to direction of orderingversion
- version or null if fresh data requiredCopyright © 2015. All rights reserved.