public class AddressBookService extends java.lang.Object implements IInCoreAddressBook
Constructor and Description |
---|
AddressBookService(javax.sql.DataSource dataSource,
org.elasticsearch.client.Client esearchClient,
Container container,
BmContext context) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ItemValue<VCard>> |
all() |
java.util.List<java.lang.String> |
allUids()
List all items from container
|
ContainerChangeset<java.lang.String> |
changeset(java.lang.Long since) |
ContainerChangeset<java.lang.Long> |
changesetById(java.lang.Long since) |
ContainerChangelog |
containerChangelog(java.lang.Long since) |
void |
copy(java.util.List<java.lang.String> uids,
java.lang.String descContainerUid)
Copy entries from one AddressBook to another one
|
void |
create(java.lang.String uid,
VCard card)
Creates a new
VCard entry. |
void |
createById(long id,
VCard card) |
void |
delete(java.lang.String uid)
Delete vcard entry
|
void |
deletePhoto(java.lang.String uid) |
java.util.List<java.lang.String> |
findByEmail(java.lang.String email) |
ItemValue<VCard> |
getComplete(java.lang.String uid)
Fetch a
VCard from its unique uid |
byte[] |
getIcon(java.lang.String uid)
A scaled-down (22px x 22px) version of the photo
|
ItemValue<VCardInfo> |
getInfo(java.lang.String uid)
Fetch a
VCardInfo from its unique uid |
byte[] |
getPhoto(java.lang.String uid) |
long |
getVersion() |
ItemChangelog |
itemChangelog(java.lang.String itemUid,
java.lang.Long since) |
void |
move(java.util.List<java.lang.String> uids,
java.lang.String descContainerUid)
Move entries from one AddressBook to another one
|
java.util.List<ItemValue<VCard>> |
multipleGet(java.util.List<java.lang.String> uids)
Fetch multiple
VCard s from theirs uniques uids |
void |
reset() |
ListResult<ItemValue<VCardInfo>> |
search(VCardQuery query)
ElasticSearch based vcard search
|
void |
setPhoto(java.lang.String uid,
byte[] photo) |
ContainerChangeset<java.lang.String> |
sync(java.lang.Long since,
VCardChanges changes)
CLIENT_WIN style
|
void |
update(java.lang.String uid,
VCard card)
Modifies an existing
VCard entry. |
ContainerUpdatesResult |
updates(VCardChanges changes)
Updates multiples entries at once (should be transactional: if one
operation fail, nothing is written)
|
public java.util.List<java.lang.String> allUids() throws ServerFault
IAddressBook
allUids
in interface IAddressBook
ServerFault
public void create(java.lang.String uid, VCard card) throws ServerFault
IAddressBook
VCard
entry.create
in interface IAddressBook
uid
- uid of the entrycard
- value of the entryServerFault
public void createById(long id, VCard card) throws ServerFault
createById
in interface IAddressBook
ServerFault
public void update(java.lang.String uid, VCard card) throws ServerFault
IAddressBook
VCard
entry.update
in interface IAddressBook
uid
- uid of the entrycard
- value of the entryServerFault
public ItemValue<VCard> getComplete(java.lang.String uid) throws ServerFault
IAddressBook
VCard
from its unique uidgetComplete
in interface IAddressBook
ItemValue
ServerFault
public java.util.List<ItemValue<VCard>> multipleGet(java.util.List<java.lang.String> uids) throws ServerFault
IAddressBook
VCard
s from theirs uniques uidsmultipleGet
in interface IAddressBook
List>
ServerFault
public ItemValue<VCardInfo> getInfo(java.lang.String uid) throws ServerFault
IAddressBook
VCardInfo
from its unique uidgetInfo
in interface IAddressBook
ServerFault
public ListResult<ItemValue<VCardInfo>> search(VCardQuery query) throws ServerFault
IAddressBook
search
in interface IAddressBook
ServerFault
public void delete(java.lang.String uid) throws ServerFault
IAddressBook
delete
in interface IAddressBook
ServerFault
public ContainerChangelog containerChangelog(java.lang.Long since) throws ServerFault
containerChangelog
in interface IChangelogSupport
ContainerChangelog
ServerFault
public ItemChangelog itemChangelog(java.lang.String itemUid, java.lang.Long since) throws ServerFault
itemChangelog
in interface IChangelogSupport
ContainerChangelog
ServerFault
public ContainerChangeset<java.lang.String> changeset(java.lang.Long since) throws ServerFault
changeset
in interface IChangelogSupport
ContainerChangeset
ServerFault
public ContainerChangeset<java.lang.Long> changesetById(java.lang.Long since) throws ServerFault
changesetById
in interface IChangelogSupport
ContainerChangeset
with internal
numeric idsServerFault
public ContainerUpdatesResult updates(VCardChanges changes) throws ServerFault
IAddressBook
updates
in interface IAddressBook
ServerFault
public ContainerChangeset<java.lang.String> sync(java.lang.Long since, VCardChanges changes) throws ServerFault
IAddressBook
sync
in interface IAddressBook
ServerFault
public void copy(java.util.List<java.lang.String> uids, java.lang.String descContainerUid) throws ServerFault
IAddressBook
copy
in interface IAddressBook
ServerFault
public void move(java.util.List<java.lang.String> uids, java.lang.String descContainerUid) throws ServerFault
IAddressBook
move
in interface IAddressBook
ServerFault
public java.util.List<ItemValue<VCard>> all() throws ServerFault
ServerFault
public void setPhoto(java.lang.String uid, byte[] photo) throws ServerFault
setPhoto
in interface IAddressBook
ServerFault
public void deletePhoto(java.lang.String uid) throws ServerFault
deletePhoto
in interface IAddressBook
ServerFault
public byte[] getPhoto(java.lang.String uid) throws ServerFault
getPhoto
in interface IAddressBook
ServerFault
public byte[] getIcon(java.lang.String uid) throws ServerFault
IAddressBook
getIcon
in interface IAddressBook
ServerFault
public java.util.List<java.lang.String> findByEmail(java.lang.String email) throws ServerFault
findByEmail
in interface IInCoreAddressBook
ServerFault
public void reset() throws ServerFault
reset
in interface IAddressBook
ServerFault
public long getVersion() throws ServerFault
getVersion
in interface IChangelogSupport
ServerFault
Copyright © 2021. All Rights Reserved.