public interface PushService
Push
messages to
Device
.
Implementations of this service will typically persist Push
messages from a database, retrieve devices from a service, and send the
message to the devices using an implementatin of the SendService
interface.Modifier and Type | Method and Description |
---|---|
int |
countPushes()
Returns the number of
Push messages persisted. |
List<Push> |
findAllPush()
Returns a list of ALL the
Push messages that are
persisted.WARNING: This method can return A LOT of data |
List<Push> |
findAllPushByPageNumber(Integer pageNum)
Returns a list of ALL the
Push messages per page number that are
persisted.The number of records per page is fetched from property file. WARNING: This method can return A LOT of data |
List<Device> |
findDevicesForPush(Push push)
Finds a list of
Devices that was linked to a
Push . |
Push |
findPushById(Long id)
Finds a
Push by its ID. |
List<PushDeviceTuple> |
findUnsentPushTuples()
Finds a list of unsent
PushDeviceTuple . |
String |
getUserDetails(String pushId)
Find User details by push ID.
|
boolean |
removePush(Push push)
Removes a
Push message. |
void |
savePush(Push push)
Persists a
Push message. |
void |
savePush(Push push,
List<Device> Devices)
Persists a push messages that should be sent to many devices
|
int |
sendPush(List<PushDeviceTuple> tuples)
Attempts to send
PushDeviceTuple |
int |
sendPush(Push push,
Device device)
Sends a
Push message to the specified Device
without persisting the message. |
int |
sendPush(Push push,
List<Device> devices)
Sends a Push
|
int |
sendPushToUsers(Push push,
List<String> usernames)
Sends a
Push
|
void savePush(Push push)
Push
message.push
- Push message to persist.boolean removePush(Push push)
Push
message.push
- Push message to persist.void savePush(Push push, List<Device> Devices)
push
- Push message to be sent.Devices
- Devices the Push message should be sent to.int countPushes()
Push
messages persisted.Push
messages persisted.Push findPushById(Long id)
Push
by its ID.id
- ID of the Push
to find.Push
that has the specified ID.List<Push> findAllPush()
Push
messages that are
persisted.Push
messages.List<Push> findAllPushByPageNumber(Integer pageNum)
Push
messages per page number that are
persisted.Push
messages.List<Device> findDevicesForPush(Push push)
Devices
that was linked to a
Push
.push
- Push
to find devices of.Devices
that was linked.List<PushDeviceTuple> findUnsentPushTuples()
PushDeviceTuple
.PushDeviceTuple
.int sendPush(Push push, Device device)
Push
message to the specified Device
without persisting the message.push
- Push message to send.device
- Device to send the message to.int sendPush(Push push, List<Device> devices)
Push
push
- Push message to send.devices
- Devices to send the message to.int sendPushToUsers(Push push, List<String> usernames)
Push
push
- Push message to send.usernames
- List of usernames to send push notifications too.int sendPush(List<PushDeviceTuple> tuples)
PushDeviceTuple
tuples
- List of PushDeviceTuple
to send.String getUserDetails(String pushId)
pushId
- ID of the Push
.Copyright © 2011–2014 The Kuali Foundation. All rights reserved.