|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SubscriptionService
Interface for performing subscription operations.
| Method Summary | |
|---|---|
void |
batchIncrementConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
Deprecated. As of release 1.1, the SDK will no longer keep a count of consecutive failed pushes when result notification is received from the PPG. If this functionality is desired it should be implemented by push initiator's themselves by subclassing the FailureNotificationListener from the acknowledgement component. The SDK no longer keeps this count because the public/BIS PPG will be implementing this logic on the platform side instead. For enterprise/BES the push initiator must implement the logic if desired. |
void |
batchResetConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
Deprecated. As of release 1.1, the SDK will no longer keep a count of consecutive failed pushes when result notification is received from the PPG. If this functionality is desired it should be implemented by push initiator's themselves by subclassing the FailureNotificationListener from the acknowledgement component. The SDK no longer keeps this count because the public/BIS PPG will be implementing this logic on the platform side instead. For enterprise/BES the push initiator must implement the logic if desired. |
void |
deleteInactiveSubscription(String pushApplicationId,
String subscriberId,
String deletedBy)
Deletes an inactive subscription from storage. |
void |
deleteSubscriptions(String pushApplicationId,
String deletedBy)
Warning! Deletes all the subscriptions from storage (and potentially the cache) for a push application entirely and permanently. |
List<SubscriberPartial> |
findByAddressAndIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified address and the specified subscriber id and NOT the specified status. |
List<SubscriberPartial> |
findByAddressAndNotIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified address and NOT the specified subscriber id and NOT the specified status. |
List<SubscriberPartial> |
findByAppId(String pushApplicationId,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id. |
List<SubscriberPartial> |
findByAppIdAndAddress(String pushApplicationId,
String address)
Finds a list of subscribers with the specified push application id and address. |
Subscriber |
findByAppIdAndId(String pushApplicationId,
String subscriberId)
Finds the subscriber with the specified id and push application id. |
List<SubscriberPartial> |
findByAppIdAndIdsAndStatus(String pushApplicationId,
List<String> subscriberIds,
SubscriberStatus status)
Finds a list of subscribers for the given push application id that are in the specified subscriber id list with the specified status. |
List<SubscriberPartial> |
findByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id and status. |
List<SubscriberPartial> |
findByAppIdAndType(String pushApplicationId,
SubscriberType type,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id and type. |
List<SubscriberPartial> |
findByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status,
int startIndex,
int endIndex)
Finds a list of subscribers with the specified push application id, type, and status. |
List<SubscriberPartial> |
findById(String subscriberId)
Finds a list of subscribers with the specified id. |
List<SubscriberPartial> |
findByIdAndNotStatus(String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified id and NOT the specified status. |
List<SubscriberPartial> |
findByIdAndStatus(String subscriberId,
SubscriberStatus status)
Finds a list of subscribers with the specified id and status. |
List<SubscriberPartial> |
findByIdPattern(String subscriberIdPattern,
int startIndex,
int endIndex)
Finds a list of subscribers whose id contains the given subscriberIdPattern. |
int |
getConsecutiveFailedPushCount(SubscriberPartial subscriber)
Deprecated. As of release 1.1, the SDK will no longer keep a count of consecutive failed pushes when result notification is received from the PPG. If this functionality is desired it should be implemented by push initiator's themselves by subclassing the FailureNotificationListener from the acknowledgement component. The SDK no longer keeps this count because the public/BIS PPG will be implementing this logic on the platform side instead. For enterprise/BES the push initiator must implement the logic if desired. |
List<DeviceModelCount> |
getDeviceModelCount(String pushApplicationId)
Gets a count of the number of users of a push application (regardless of status) for each BlackBerry device model. |
List<DeviceModelCount> |
getDeviceModelCount(String pushApplicationId,
SubscriberStatus status)
Gets a count of the number of users of a push application with a given status for each BlackBerry device model. |
List<OsVersionCount> |
getOsVersionCount(String pushApplicationId)
Gets a count of the number of users of a push application (regardless of status) for each OS version running on a BlackBerry device. |
List<OsVersionCount> |
getOsVersionCount(String pushApplicationId,
SubscriberStatus status)
Gets a count of the number of users of a push application with a given status for each OS version running on a BlackBerry device. |
int |
getResumeCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of users that had their subscriptions resumed for an application between the given date range. |
int |
getSizeByAppId(String pushApplicationId)
Gets a count of all the subscribers in storage with the specified push application id. |
int |
getSizeByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status)
Gets a count of all the subscribers in storage with the specified push application id and status. |
int |
getSizeByAppIdAndType(String pushApplicationId,
SubscriberType type)
Gets a count of all the subscribers in storage with the specified push application id and type. |
int |
getSizeByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status)
Gets a count of all the subscribers in storage with the specified push application id, type, and status. |
int |
getSizeByIdPattern(String subscriberIdPattern)
Gets a count of all the subscribers in storage whose id contains the given subscriberIdPattern. |
int |
getSubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of new subscribers to an application for a given date range. |
int |
getSuspendCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of users that had their subscriptions suspended for an application between the given date range. |
int |
getUnsubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
Gets a count of the number of users that unsubscribed from an application between the given date range. |
void |
incrementConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
Deprecated. As of release 1.1, the SDK will no longer keep a count of consecutive failed pushes when result notification is received from the PPG. If this functionality is desired it should be implemented by push initiator's themselves by subclassing the FailureNotificationListener from the acknowledgement component. The SDK no longer keeps this count because the public/BIS PPG will be implementing this logic on the platform side instead. For enterprise/BES the push initiator must implement the logic if desired. |
List<SubscriberPartial> |
matchByAppIdAndIdsAndStatus(String pushApplicationId,
List<String> subscriberIds,
SubscriberStatus status)
Returns a list of subscribers for the given push application id that are in the specified subscriber id list with the specified status. |
void |
notifyPPG(SubscriptionType subscriptionType,
String pushApplicationId,
String address)
Notifies the PPG directly with a suspend/resume/unsubscribe request for a given address (e.g. |
void |
resetConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
Deprecated. As of release 1.1, the SDK will no longer keep a count of consecutive failed pushes when result notification is received from the PPG. If this functionality is desired it should be implemented by push initiator's themselves by subclassing the FailureNotificationListener from the acknowledgement component. The SDK no longer keeps this count because the public/BIS PPG will be implementing this logic on the platform side instead. For enterprise/BES the push initiator must implement the logic if desired. |
void |
resumeSubscription(ResumeRequest resumeRequest)
Resumes a user's subscription to a push application. |
void |
setContentProviderSubscriptionService(ContentProviderSubscriptionService contentProviderSubscriptionService)
Support for dependency injection. |
void |
setHttpClient(HttpClient client)
Support for dependency injection. |
void |
setPushApplicationService(PushApplicationService pushApplicationService)
Support for dependency injection. |
void |
setPushSDKProperties(PushSDKProperties pushSDKProperties)
Support for dependency injection. |
void |
setSubscriptionDAO(SubscriptionDAO subscriptionDAO)
Support for dependency injection. |
void |
setSubscriptionQueryService(SubscriptionQueryService subscriptionQueryService)
Support for dependency injection. |
void |
subscribe(SubscribeRequest subscribeRequest)
Subscribes a user to a push application. |
void |
suspendSubscription(SuspendRequest suspendRequest)
Suspends a user's subscription to a push application. |
SubscriberSyncResult |
syncSubscribersByStatusInPPG(String pushApplicationId,
SubscriberStatus statusInPPG,
String syncedBy)
Syncs the status of subscribers in storage by looking up subscribers on the PPG end that have the given status and updates the corresponding subscribers on the SDK side. |
SubscriberSyncResult |
syncSubscribersWithPPG(String pushApplicationId,
String syncedBy)
Deprecated. As of release 1.1, replaced by the syncSubscribersWithPPGForStatus(String, SubscriberStatus, int, int, String)
method instead. |
SubscriberSyncResult |
syncSubscribersWithPPGByStatus(String pushApplicationId,
SubscriberStatus status,
String syncedBy)
Deprecated. As of release 1.1, replaced by the syncSubscribersWithPPGForStatus(String, SubscriberStatus, int, int, String)
method instead. |
SubscriberSyncResult |
syncSubscribersWithPPGForStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex,
String syncedBy)
Syncs the status of subscribers in storage with the status on the PPG end. |
Subscriber |
syncSubscriberWithPPG(String pushApplicationId,
String subscriberId,
String syncedBy)
Syncs the status of a single subscriber in storage with its status on the PPG end. |
void |
unsubscribe(UnsubscribeRequest unsubscribeRequest)
Unsubscribes a user from a push application. |
SubscriptionValidationResult |
validateSubscriptions(String pushApplicationId,
List<String> subscriberIds)
Validates the passed in list of subscriber ids to determine which ones do not exist, which ones are active, which ones are inactive, and which ones are suspended. |
| Method Detail |
|---|
void subscribe(SubscribeRequest subscribeRequest)
throws InvalidPushAppException,
CPSubscriptionFailureException,
PushSDKException
ContentProviderSubscriptionService onSubscribeSuccess(SubscribeRequest) or
onSubscribeFailure(SubscribeRequest) method depending on success or failure of this service's subscribe.
subscribeRequest - object containing all the information required for a subscribe (if the type field is not set, it will be set
during the subscribe to PUBLIC for Public Push apps and ENTERPRISE for Enterprise Push apps)
SubIllegalArgumentException - if any of the information passed in fails validation
UnsupportedOperationException - if the push application the user is attempting to subscribe to does not support subscription operations
InvalidPushAppException - if the push application specified is invalid
CPSubscriptionFailureException - if there were issues performing the content provider's subscribe operation
PushSDKException - if any unrecoverable errors occurContentProviderSubscriptionService
void unsubscribe(UnsubscribeRequest unsubscribeRequest)
throws SubDoesNotExistException,
InvalidPushAppException,
CPSubscriptionFailureException,
PushSDKException
ContentProviderSubscriptionService onUnsubscribeSuccess(UnsubscribeRequest) or
onUnsubscribeFailure(UnsubscribeRequest) method depending on success or failure of this service's unsubscribe.
unsubscribeRequest - object containing all the information required for an unsubscribe
SubIllegalArgumentException - if any of the information passed in fails validation
UnsupportedOperationException - if the push application the user is attempting to unsubscribe from does not support subscription operations
SubDoesNotExistException - if the subscriber specified cannot be found
InvalidPushAppException - if the push application specified is invalid
CPSubscriptionFailureException - if there were issues performing the content provider's unsubscribe operation
PushSDKException - if any unrecoverable errors occurContentProviderSubscriptionService
void suspendSubscription(SuspendRequest suspendRequest)
throws SubDoesNotExistException,
InvalidSubStatusException,
InvalidPushAppException,
CPSubscriptionFailureException,
PushSDKException
ContentProviderSubscriptionService onSuspendSuccess(SuspendRequest) or
onSuspendFailure(SuspendRequest) method depending on success or failure of this service's suspend.
suspendRequest - object containing all the information required for a suspend
SubIllegalArgumentException - if any of the information passed in fails validation
UnsupportedOperationException - if the push application the user is attempting to suspend their subscription for does not support subscription
operations
SubDoesNotExistException - if the subscriber specified cannot be found
InvalidSubStatusException - if the current status of the subscriber does not allow for this operation
InvalidPushAppException - if the push application specified is invalid
CPSubscriptionFailureException - if there were issues performing the content provider's suspend operation
PushSDKException - if any unrecoverable errors occurContentProviderSubscriptionService
void resumeSubscription(ResumeRequest resumeRequest)
throws SubDoesNotExistException,
InvalidSubStatusException,
InvalidPushAppException,
CPSubscriptionFailureException,
PushSDKException
ContentProviderSubscriptionService onResumeSuccess(ResumeRequest) or
onResumeFailure(ResumeRequest) method depending on success or failure of this service's resume.
resumeRequest - object containing all the information required for a resume
SubIllegalArgumentException - if any of the information passed in fails validation
UnsupportedOperationException - if the push application the user is attempting to resume their subscription to does not support subscription
operations
SubDoesNotExistException - if the subscriber specified cannot be found
InvalidSubStatusException - if the current status of the subscriber does not allow for this operation
InvalidPushAppException - if the push application specified is invalid
CPSubscriptionFailureException - if there were issues performing the content provider's resume operation
PushSDKException - if any unrecoverable errors occurContentProviderSubscriptionService
void deleteInactiveSubscription(String pushApplicationId,
String subscriberId,
String deletedBy)
throws SubDoesNotExistException,
InvalidSubStatusException,
InvalidPushAppException,
PushSDKException
pushApplicationId - the id of the push applicationsubscriberId - the id of the subscriberdeletedBy - the id of the user deleting the inactive subscription; used for logging purposes only
IllegalArgumentException - if any of the information passed in fails validation
SubDoesNotExistException - if the subscriber specified cannot be found
InvalidSubStatusException - if the subscriber being deleted is not inactive
InvalidPushAppException - if the push application specified is invalid
PushSDKException - if any unrecoverable errors occur
void deleteSubscriptions(String pushApplicationId,
String deletedBy)
throws InvalidPushAppException,
PushSDKException
pushApplicationId - the id of the push applicationdeletedBy - the id of the user deleting the inactive subscription; used for logging purposes only
InvalidPushAppException - if the push application specified is invalid
PushSDKException - if any unrecoverable errors occur
void notifyPPG(SubscriptionType subscriptionType,
String pushApplicationId,
String address)
throws InvalidPushAppException,
PPGCommunicationFailureException,
PushSDKException
subscriptionType - the subscription operation to be performed on the PPG (subscribe is not supported)pushApplicationId - the id of the push applicationaddress - a subscriber's address (e.g. PIN, email address, or subscriber id for Web Signals)
UnsupportedOperationException - if a subscribe operation is attempted (only suspend/resume/unsubscribe are supported) or if the PPG does not
support subscription operations
InvalidPushAppException - if the specified push application id does not match an existing push application
PPGCommunicationFailureException - if any errors occur while trying to communicate with the PPG
PushSDKException - if any unrecoverable errors occur
Subscriber findByAppIdAndId(String pushApplicationId,
String subscriberId)
throws PushSDKException
pushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
PushSDKException - if any unrecoverable errors occur
List<SubscriberPartial> findByAppIdAndAddress(String pushApplicationId,
String address)
throws PushSDKException
pushApplicationId - the id of the push applicationaddress - the address of the subscriber (case insensitive)
PushSDKException - if any unrecoverable errors occur
List<SubscriberPartial> findByAddressAndNotIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
throws PushSDKException
address - the address of the subscriber (case insensitive)subscriberId - the id of the subscriberstatus - a subscriber status
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<SubscriberPartial> findByAddressAndIdAndNotStatus(String address,
String subscriberId,
SubscriberStatus status)
throws PushSDKException
address - the address of the subscriber (case insensitive)subscriberId - the id of the subscriberstatus - a subscriber status
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<SubscriberPartial> findById(String subscriberId)
throws PushSDKException
subscriberId - the id of the subscriber
PushSDKException - if any unrecoverable errors occur
List<SubscriberPartial> findByIdPattern(String subscriberIdPattern,
int startIndex,
int endIndex)
throws PushSDKException
subscriberIdPattern.
Note: Index arguments are present to address memory concerns, since if we retrieve a full list it might be quite large.
Indexes are inclusive and start at 0.
Note: If the number of subscribers requested (endIndex - startIndex + 1) is above a certain threshold (defined by the
"subscription.find.max.results" property in PushSDK.properties), then the find operation will not be executed
and an IllegalArgumentException will be returned. This is to help ensure that memory concerns are being
addressed.
subscriberIdPattern - a whole or partial subscriberId to matchstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
IllegalArgumentException - if the number of subscribers requested exceeds the defined threshold
PushSDKException - if any unrecoverable errors occur
int getSizeByIdPattern(String subscriberIdPattern)
throws PushSDKException
subscriberIdPattern.
subscriberIdPattern - a whole or partial subscriberId to match
PushSDKException - if any unrecoverable errors occur
List<SubscriberPartial> findByIdAndStatus(String subscriberId,
SubscriberStatus status)
throws PushSDKException
subscriberId - the id of the subscriberstatus - a subscriber status
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<SubscriberPartial> findByIdAndNotStatus(String subscriberId,
SubscriberStatus status)
throws PushSDKException
subscriberId - the id of the subscriberstatus - a subscriber status
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<SubscriberPartial> findByAppId(String pushApplicationId,
int startIndex,
int endIndex)
throws PushSDKException
PushSDK.properties), then the find operation will not be executed
and an IllegalArgumentException will be returned. This is to help ensure that memory concerns are being
addressed.
pushApplicationId - the id of the push applicationstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
IllegalArgumentException - if the number of subscribers requested exceeds the defined threshold
PushSDKException - if any unrecoverable errors occur
int getSizeByAppId(String pushApplicationId)
throws PushSDKException
pushApplicationId - the id of the push application
PushSDKException - if any unrecoverable errors occur
List<SubscriberPartial> findByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex)
throws PushSDKException
PushSDK.properties), then the find operation will not be executed
and an IllegalArgumentException will be returned. This is to help ensure that memory concerns are being
addressed.
pushApplicationId - the id of the push applicationstatus - a subscriber statusstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
IllegalArgumentException - if the number of subscribers requested exceeds the defined threshold
PushSDKException - if any unrecoverable errors occurSubscriberStatus
int getSizeByAppIdAndStatus(String pushApplicationId,
SubscriberStatus status)
throws PushSDKException
pushApplicationId - the id of the push applicationstatus - a subscriber status
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<SubscriberPartial> findByAppIdAndIdsAndStatus(String pushApplicationId,
List<String> subscriberIds,
SubscriberStatus status)
throws PushSDKException
SubStatusAlternateMatchManager class for subscriber matching.
pushApplicationId - the id of the push applicationsubscriberIds - only subscribers with one of these ids will be returnedstatus - only subscribers that match this status will be returned
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<SubscriberPartial> findByAppIdAndType(String pushApplicationId,
SubscriberType type,
int startIndex,
int endIndex)
throws PushSDKException
PushSDK.properties), then the find operation will not be executed
and an IllegalArgumentException will be returned. This is to help ensure that memory concerns are being
addressed.
pushApplicationId - the id of the push applicationtype - the type of a subscriberstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
IllegalArgumentException - if the number of subscribers requested exceeds the defined threshold
PushSDKException - if any unrecoverable errors occurSubscriberType
int getSizeByAppIdAndType(String pushApplicationId,
SubscriberType type)
throws PushSDKException
pushApplicationId - the id of the push applicationtype - the type of a subscriber
PushSDKException - if any unrecoverable errors occurSubscriberType
List<SubscriberPartial> findByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status,
int startIndex,
int endIndex)
throws PushSDKException
PushSDK.properties), then the find operation will not be executed
and an IllegalArgumentException will be returned. This is to help ensure that memory concerns are being
addressed.
pushApplicationId - the id of the push applicationtype - the type of a subscriberstatus - the status of a subscriberstartIndex - the index of the first entry to be retrievedendIndex - the index of the last entry to be retrieved
IllegalArgumentException - if the number of subscribers requested exceeds the defined threshold
PushSDKException - if any unrecoverable errors occurSubscriberType,
SubscriberStatus
int getSizeByAppIdAndTypeAndStatus(String pushApplicationId,
SubscriberType type,
SubscriberStatus status)
throws PushSDKException
pushApplicationId - the id of the push applicationtype - the type of a subscriberstatus - the staotus of a subscriber
PushSDKException - if any unrecoverable errors occurSubscriberType,
SubscriberStatus
SubscriptionValidationResult validateSubscriptions(String pushApplicationId,
List<String> subscriberIds)
throws PushSDKException
subscriberIds list that is passed in.
If the size of the subscriberIds list is less than or equal to the "subscription.validation.high.water.mark"
property in PushSDK.properties, each subscriber id from the list will be looked up in storage and put into its
appropriate list in the validation results based on its status or if it cannot be found.
If the size of the subscriberIds list is greater than the "subscription.validation.high.water.mark" property
in PushSDK.properties, a performance enhancing algorithm is used to divide up the subscriber ids into their
appropriate lists in the validation results.
Note: Logging with a level of DEBUG can be turned on to get information back on how long subscription validation is taking,
and which of the subscription validation algorithms was used.
pushApplicationId - the push application id to which the subscriber ids are subscribed tosubscriberIds - list of subscriber ids to validate
PushSDKException - if any unrecoverable errors occurSubscriptionValidationResult
@Deprecated
void incrementConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
throws PushSDKException
pushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
PushSDKException - if any unrecoverable errors occur
@Deprecated
void resetConsecutiveFailedPushCount(String pushApplicationId,
String subscriberId)
throws PushSDKException
pushApplicationId - the id of the push applicationsubscriberId - the id of the subscriber
PushSDKException - if any unrecoverable errors occur
@Deprecated
void batchIncrementConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
throws PushSDKException
subscribers - list of subscribers to increment count
PushSDKException - if any unrecoverable errors occur
@Deprecated
void batchResetConsecutiveFailedPushCount(List<SubscriberPartial> subscribers)
throws PushSDKException
subscribers - list of subscribers to reset count
PushSDKException - if any unrecoverable errors occur
@Deprecated
int getConsecutiveFailedPushCount(SubscriberPartial subscriber)
throws PushSDKException
subscriber - SubscriberPartial object with push application id and subscriber id set
PushSDKException - if any errors occur
List<SubscriberPartial> matchByAppIdAndIdsAndStatus(String pushApplicationId,
List<String> subscriberIds,
SubscriberStatus status)
throws PushSDKException
SubStatusAlternateMatchManager class and differs from the
findByAppIdAndIdsAndStatus method. It is not threaded and does not divide up the subscriber ids into several
queries to be made to storage based on the "max.in.clause.values" property in PushSDK.properties.
pushApplicationId - the id of the push applicationsubscriberIds - only subscribers with one of these ids will be returnedstatus - only subscribers that match this status will be returned
IllegalArgumentException - if the list of subscriber ids exceeds the defined "max.in.clause.values" threshold
PushSDKException - if any unrecoverable errors occurSubscriberStatus
int getSubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws PushSDKException
pushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
PushSDKException - if any unrecoverable errors occur
int getUnsubscribeCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws PushSDKException
pushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
PushSDKException - if any unrecoverable errors occur
int getResumeCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws PushSDKException
pushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
PushSDKException - if any unrecoverable errors occur
int getSuspendCount(String pushApplicationId,
Date fromDate,
Date toDate)
throws PushSDKException
pushApplicationId - the id of the push applicationfromDate - inclusive from date parameter of the rangetoDate - inclusive to date parameter of the range
PushSDKException - if any unrecoverable errors occur
List<DeviceModelCount> getDeviceModelCount(String pushApplicationId)
throws PushSDKException
pushApplicationId - the id of the push application
PushSDKException - if any unrecoverable errors occur
List<DeviceModelCount> getDeviceModelCount(String pushApplicationId,
SubscriberStatus status)
throws PushSDKException
pushApplicationId - the id of the push applicationstatus - the status of a subscriber
PushSDKException - if any unrecoverable errors occurSubscriberStatus
List<OsVersionCount> getOsVersionCount(String pushApplicationId)
throws PushSDKException
pushApplicationId - the id of the push application
PushSDKException - if any unrecoverable errors occur
List<OsVersionCount> getOsVersionCount(String pushApplicationId,
SubscriberStatus status)
throws PushSDKException
pushApplicationId - the id of the push applicationstatus - the status of a subscriber
PushSDKException - if any unrecoverable errors occurSubscriberStatus
SubscriberSyncResult syncSubscribersWithPPGForStatus(String pushApplicationId,
SubscriberStatus status,
int startIndex,
int endIndex,
String syncedBy)
throws InvalidPushAppException,
PushSDKException,
SubQueryFailureException
SubQueryFailureException or PushSDKException will be thrown if there are issues sending requests
to the PPG or getting responses back from the PPG. Any errors that occur during the updating of the statuses of subscribers
will appear in the returned SubscriberSyncResult object.
The update errors that are returned in the SubscriberSyncResult object can be handled as follows:
unsubscribe(UnsubscribeRequest) or suspendSubscription(SuspendRequest) based
on the subscription type of the failure.notifyPPG(SubscriptionType, String, String).suspendSubscription(SuspendRequest).unsubscribe(UnsubscribeRequest).unsubscribe(UnsubscribeRequest).notifyPPG(SubscriptionType, String, String) to
suspend on the PPG end.notifyPPG(SubscriptionType, String, String) to
unsubscribe on the PPG end.notifyPPG(SubscriptionType, String, String) to
unsubscribe on the PPG end.
pushApplicationId - the id of the push applicationstatus - the status of a subscriber in the SDKstartIndex - the start index to sync subscribers fromendIndex - the end index to stop syncing subscribers atsyncedBy - an identifier that identifies the caller of this API. The syncedBy value will be placed into the log files at
info level for audit purposes
IllegalArgumentException - if any of the information passed in fails validation
InvalidPushAppException - if the push application specified is invalid
UnsupportedOperationException - if the PPG does not support a subscription sync operation
SubQueryFailureException - if a status query request sent to the PPG during the sync failed
PushSDKException - if any unrecoverable errors occur
Subscriber syncSubscriberWithPPG(String pushApplicationId,
String subscriberId,
String syncedBy)
throws InvalidPushAppException,
SubDoesNotExistException,
SubQueryFailureException,
CPSubscriptionFailureException,
PPGCommunicationFailureException,
PushSDKException
findByAppIdAndId(String, String).
pushApplicationId - the id of the push applicationsubscriberId - the id of the subscribersyncedBy - an identifier that identifies the caller of this API. The syncedBy value will be placed into the log files at
info level for audit purposes
IllegalArgumentException - if any of the information passed in fails validation
InvalidPushAppException - if the push application specified is invalid
SubDoesNotExistException - if the subscriber specified could not be found
UnsupportedOperationException - if the PPG does not support a subscription sync operation
SubQueryFailureException - if a status query request sent to the PPG during the sync failed
CPSubscriptionFailureException - if there was an error performing a content provider's subscription operation during the sync
PPGCommunicationFailureException - if there was an error trying to communicate with the PPG while performing a subscription operation during the
sync
PushSDKException - if any unrecoverable errors occur
SubscriberSyncResult syncSubscribersByStatusInPPG(String pushApplicationId,
SubscriberStatus statusInPPG,
String syncedBy)
throws InvalidPushAppException,
PushSDKException,
SubQueryFailureException
statusInPPG. If the push application corresponding to
pushApplicationId has a large number of ACTIVE subscribers, then you might get a "22006" error back from the
public (BIS) PPG when passing a value of ACTIVE for statusInPPG. The same goes for the SUSPENDED case. If a
"22006" error is encountered, please use
syncSubscribersWithPPGForStatus(String, SubscriberStatus, int, int, String) for syncing instead.
The reason behind wanting to sync is that it is possible for the statuses of subscribers on the PPG side and on the SDK
side to become out of sync with each other over time. syncSubscribersWithPPGForStatus(String, SubscriberStatus, int, int, String). They perform very different
functions.
This method is threaded so that the results back from the sync request can be processed more efficiently. Any errors that
occur during the updating of the statuses of subscribers will appear in the returned SubscriberSyncResult
object.
The update errors that are returned in the SubscriberSyncResult object can be handled as follows:
unsubscribe(UnsubscribeRequest) or suspendSubscription(SuspendRequest) based
on the subscription type of the failure.notifyPPG(SubscriptionType, String, String).
pushApplicationId - the id of the push applicationstatusInPPG - the status of a subscriber in the PPG (must be either ACTIVE or SUSPENDED)syncedBy - an identifier that identifies the caller of this API. The syncedBy value will be placed into the log files at
info level for audit purposes
IllegalArgumentException - if any of the information passed in fails validation
InvalidPushAppException - if the push application specified is invalid
UnsupportedOperationException - if the PPG does not support a subscription sync operation
SubQueryFailureException - if a status query request sent to the PPG during the sync failed
PushSDKException - if any unrecoverable errors occurSubscriberStatus
@Deprecated
SubscriberSyncResult syncSubscribersWithPPG(String pushApplicationId,
String syncedBy)
throws InvalidPushAppException,
PushSDKException,
SubQueryFailureException
syncSubscribersWithPPGForStatus(String, SubscriberStatus, int, int, String)
method instead.
SubQueryFailureException or PushSDKException will be thrown if there are issues sending requests
to the PPG or getting responses back from the PPG. Any errors that occur during the updating of the statuses of subscribers
will appear in the returned SubscriberSyncResult object.
The update errors that are returned in the SubscriberSyncResult object can be handled as follows:
unsubscribe or suspendSubscription method based on the
subscription type of the failure.notifyPPG method.suspendSubscription method.unsubscribe method.unsubscribe method.notifyPPG method to suspend on the PPG
end.notifyPPG method to unsubscribe on the
PPG end.notifyPPG method to unsubscribe on the
PPG end.
pushApplicationId - the id of the push applicationsyncedBy - an identifier that identifies the caller of this API. The syncedBy value will be placed into the log files at
info level for audit purposes
IllegalArgumentException - if any of the information passed in fails validation
InvalidPushAppException - if the push application specified is invalid
UnsupportedOperationException - if the PPG does not support a subscription sync operation
SubQueryFailureException - if a status query request sent to the PPG during the sync failed
PushSDKException - if any unrecoverable errors occur
@Deprecated
SubscriberSyncResult syncSubscribersWithPPGByStatus(String pushApplicationId,
SubscriberStatus status,
String syncedBy)
throws InvalidPushAppException,
PushSDKException,
SubQueryFailureException
syncSubscribersWithPPGForStatus(String, SubscriberStatus, int, int, String)
method instead.
SubQueryFailureException or PushSDKException will be thrown if there are issues sending requests
to the PPG or getting responses back from the PPG. Any errors that occur during the updating of the statuses of subscribers
will appear in the returned SubscriberSyncResult object.
The update errors that are returned in the SubscriberSyncResult object can be handled as follows:
unsubscribe or suspendSubscription method based on the
subscription type of the failure.notifyPPG method.syncSubscribersWithPPG(pushApplicationId, syncedBy) method for a description of the syncing rules.
Note: This method will only look at subscribers in the SDK of a given status. A full sync is recommended for normal use.
This method is more for when errors occur during the syncing process for subscribers of a certain status and a partial
resync is needed. For a full sync, see the syncSubscribersWithPPG(pushApplicationId, syncedBy) method.
pushApplicationId - the id of the push applicationstatus - the status of a subscriber in the SDKsyncedBy - an identifier that identifies the caller of this API. The syncedBy value will be placed into the log files at
info level for audit purposes
IllegalArgumentException - if any of the information passed in fails validation
InvalidPushAppException - if the push application specified is invalid
UnsupportedOperationException - if the PPG does not support a subscription sync operation
SubQueryFailureException - if a status query request sent to the PPG during the sync failed
PushSDKException - if any unrecoverable errors occurSubscriberStatusvoid setSubscriptionDAO(SubscriptionDAO subscriptionDAO)
subscriptionDAO - a Subscriber Data Access Objectvoid setPushApplicationService(PushApplicationService pushApplicationService)
pushApplicationService - a Push Application Service Objectvoid setHttpClient(HttpClient client)
HttpClient implementation.
client - void setPushSDKProperties(PushSDKProperties pushSDKProperties)
PushSDKProperties implementation.
pushSDKProperties - void setContentProviderSubscriptionService(ContentProviderSubscriptionService contentProviderSubscriptionService)
contentProviderSubscriptionService - a Content Provider Subscription Service Objectvoid setSubscriptionQueryService(SubscriptionQueryService subscriptionQueryService)
subscriptionQueryService - a Subscription Query Service Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||