net.rim.pushsdk.pushappmgmt
Interface PushApplicationDAO

All Known Implementing Classes:
PushAppMemoryDAOImpl, PushAppRDBMSDAOImpl

public interface PushApplicationDAO

Data access interface for a push application.

Author:
mdicesare

Method Summary
 void addPushApplication(PushApplication pushApplication)
          Adds the specified push application to the persistent store.
 void changePushApplicationCredentials(String id, String newUsername, String newPassword, String modifiedBy)
          Deprecated. As of release 1.1, replaced by changePushApplicationPublicCredentials(String, String, String) for updating the public credentials of a push application and changePushApplicationEnterpriseCredentials(String, String, String, String) for updating the enterprise credentials of a push application.
 void changePushApplicationEnterpriseCredentials(String id, String newUsername, String newPassword, String modifiedBy)
          Change the enterprise username and password of a push application that has a type of Enterprise Push or Public+Enterprise Push.
 void changePushApplicationPublicCredentials(String id, String newPassword, String modifiedBy)
          Change the public password of a push application that has a type of Public Push, Web Signal, or Public+Enterprise Push.
 void changePushApplicationTypeFromEnterpriseToPublicAndEnterprise(String id, String publicPassword, String publicNotifyUrl, String modifiedBy)
          Changes the type of a push application from Enterprise Push to Public+Enterprise Push.
 void changePushApplicationTypeFromPublicToPublicAndEnterprise(String id, String enterpriseUsername, String enterprisePassword, String enterpriseNotifyUrl, String modifiedBy)
          Changes the type of a push application from Public Push to Public+Enterprise Push.
 void deletePushApplication(String id, String deletedBy)
          Warning!
Removes a push application entirely and permanently from the persistent store (and any related entities if a foreign key cascading relationship exists).
 void disablePushApplication(String id, String modifiedBy)
          Disables (sets to inactive) a push application.
 void enablePushApplication(String id, Date expiryDate, String modifiedBy)
          Enables (sets to active) a push application.
 void enablePushApplication(String id, String modifiedBy)
          Enables (sets to active) a push application.
 List<PushApplication> findAll()
          Finds a list of all the push applications in storage.
 PushApplication findById(String id)
          Finds the push application with the specified push application id.
 PushApplication findByName(String name)
          Finds the push application with the specified name.
 List<PushApplication> findByStatus(PushApplicationStatus status)
          Finds a list of push applications with the specified status.
 List<PushApplication> findByType(PushApplicationType type)
          Finds a list of push applications with the specified type.
 void setPushSDKProperties(PushSDKProperties pushSDKProperties)
          Deprecated. This setter was added in 1.1, but is deprecated, since it is used only to support backwards compatibility.
 void updatePushApplication(PushApplication pushApplication)
          Updates the details of a push application.
 

Method Detail

addPushApplication

void addPushApplication(PushApplication pushApplication)
                        throws org.springframework.dao.DataAccessException
Adds the specified push application to the persistent store.

Parameters:
pushApplication - the push application to add
Throws:
org.springframework.dao.DataAccessException - if any errors occur

updatePushApplication

void updatePushApplication(PushApplication pushApplication)
                           throws org.springframework.dao.DataAccessException
Updates the details of a push application. Note: This method cannot be used to update a push application's status or to change the password of a push application.

Parameters:
pushApplication - the updated push application
Throws:
org.springframework.dao.DataAccessException - if any errors occur

changePushApplicationTypeFromPublicToPublicAndEnterprise

void changePushApplicationTypeFromPublicToPublicAndEnterprise(String id,
                                                              String enterpriseUsername,
                                                              String enterprisePassword,
                                                              String enterpriseNotifyUrl,
                                                              String modifiedBy)
                                                              throws org.springframework.dao.DataAccessException
Changes the type of a push application from Public Push to Public+Enterprise Push.

Parameters:
id - the id of the push application
enterpriseUsername - an optional username for enterprise (BES) pushes; null if not required
enterprisePassword - an optional password for enterprise (BES) pushes; null if not required
enterpriseNotifyUrl - a full notification URL for enterprise (BES) acknowledgements; null if using a service level of Push Essentials
modifiedBy - the user that is changing the push application's type
Throws:
org.springframework.dao.DataAccessException - if any errors occur
Since:
1.1

changePushApplicationTypeFromEnterpriseToPublicAndEnterprise

void changePushApplicationTypeFromEnterpriseToPublicAndEnterprise(String id,
                                                                  String publicPassword,
                                                                  String publicNotifyUrl,
                                                                  String modifiedBy)
                                                                  throws org.springframework.dao.DataAccessException
Changes the type of a push application from Enterprise Push to Public+Enterprise Push.

Parameters:
id - the id of the push application
publicPassword - a password for public (BIS) pushes
publicNotifyUrl - a notification URL fragment for public (BIS) acknowledgements; null if using a service level of Push Essentials
modifiedBy - the user that is changing the push application's type
Throws:
org.springframework.dao.DataAccessException - if any errors occur
Since:
1.1

findById

PushApplication findById(String id)
                         throws org.springframework.dao.DataAccessException
Finds the push application with the specified push application id.

Parameters:
id - the id of the push application to lookup
Returns:
the push application; null if the push application is not found
Throws:
org.springframework.dao.DataAccessException - if any errors occur

findByName

PushApplication findByName(String name)
                           throws org.springframework.dao.DataAccessException
Finds the push application with the specified name.

Parameters:
name - the name of the push application to lookup
Returns:
the push application; null if the push application is not found
Throws:
org.springframework.dao.DataAccessException - if any errors occur

findByStatus

List<PushApplication> findByStatus(PushApplicationStatus status)
                                   throws org.springframework.dao.DataAccessException
Finds a list of push applications with the specified status.

Parameters:
status - the status of a push application
Returns:
a list of push applications; otherwise, an empty list, if no matches could be found
Throws:
org.springframework.dao.DataAccessException - if any errors occur

findByType

List<PushApplication> findByType(PushApplicationType type)
                                 throws org.springframework.dao.DataAccessException
Finds a list of push applications with the specified type.

Parameters:
type - the type of a push application
Returns:
a list of push applications; otherwise, an empty list, if no matches could be found
Throws:
org.springframework.dao.DataAccessException - if any errors occur

findAll

List<PushApplication> findAll()
                              throws org.springframework.dao.DataAccessException
Finds a list of all the push applications in storage.

Returns:
a list of push applications; otherwise, an empty list, if there are none in storage
Throws:
org.springframework.dao.DataAccessException - if any errors occur

disablePushApplication

void disablePushApplication(String id,
                            String modifiedBy)
                            throws org.springframework.dao.DataAccessException
Disables (sets to inactive) a push application.

Parameters:
id - the id of the push application
modifiedBy - the user that disabled the push application
Throws:
org.springframework.dao.DataAccessException - if any errors occur

enablePushApplication

void enablePushApplication(String id,
                           Date expiryDate,
                           String modifiedBy)
                           throws org.springframework.dao.DataAccessException
Enables (sets to active) a push application.

Parameters:
id - the id of the push application
expiryDate - the new expiry date for the push application
modifiedBy - the user that enabled the push application
Throws:
org.springframework.dao.DataAccessException - if any errors occur

enablePushApplication

void enablePushApplication(String id,
                           String modifiedBy)
                           throws org.springframework.dao.DataAccessException
Enables (sets to active) a push application. Expiry date will remain unchanged.

Parameters:
id - the id of the push application
modifiedBy - the user that enabled the push application
Throws:
org.springframework.dao.DataAccessException - if any errors occur

deletePushApplication

void deletePushApplication(String id,
                           String deletedBy)
                           throws org.springframework.dao.DataAccessException
Warning!
Removes a push application entirely and permanently from the persistent store (and any related entities if a foreign key cascading relationship exists). Related entities may include any push messages sent to the push application and any subscriptions for the push application.

Parameters:
id - the id of the push application to remove entirely and permanently
deletedBy - an identifier that identifies the caller of this API. The deletedBy value will be placed into the log files at info level for audit purposes
Throws:
org.springframework.dao.DataAccessException - if any errors occur

changePushApplicationCredentials

@Deprecated
void changePushApplicationCredentials(String id,
                                                 String newUsername,
                                                 String newPassword,
                                                 String modifiedBy)
                                      throws org.springframework.dao.DataAccessException
Deprecated. As of release 1.1, replaced by changePushApplicationPublicCredentials(String, String, String) for updating the public credentials of a push application and changePushApplicationEnterpriseCredentials(String, String, String, String) for updating the enterprise credentials of a push application.

Change the credentials of a push application.

Parameters:
id - the id of the push application
newUsername - the new username for the push application (Note: for an application with a type of Public Push, this parameter is ignored, since it needs to match the id.)
newPassword - the new password for the push application
modifiedBy - the user that is changing the push application's password
Throws:
org.springframework.dao.DataAccessException - if any errors occur

changePushApplicationPublicCredentials

void changePushApplicationPublicCredentials(String id,
                                            String newPassword,
                                            String modifiedBy)
                                            throws org.springframework.dao.DataAccessException
Change the public password of a push application that has a type of Public Push, Web Signal, or Public+Enterprise Push.

Parameters:
id - the id of the push application
newPassword - the new password for the push application
modifiedBy - the user that is changing the push application's public credentials
Throws:
org.springframework.dao.DataAccessException - if any errors occur
Since:
1.1

changePushApplicationEnterpriseCredentials

void changePushApplicationEnterpriseCredentials(String id,
                                                String newUsername,
                                                String newPassword,
                                                String modifiedBy)
                                                throws org.springframework.dao.DataAccessException
Change the enterprise username and password of a push application that has a type of Enterprise Push or Public+Enterprise Push.

Parameters:
id - the id of the push application
newUsername - the new username for the push application (might be null)
newPassword - the new password for the push application (might be null)
modifiedBy - the user that is changing the push application's enterprise credentials
Throws:
org.springframework.dao.DataAccessException - if any errors occur
Since:
1.1

setPushSDKProperties

@Deprecated
void setPushSDKProperties(PushSDKProperties pushSDKProperties)
Deprecated. This setter was added in 1.1, but is deprecated, since it is used only to support backwards compatibility.

Support for dependency injection. This will override the default PushSDKProperties implementation.

Parameters:
pushSDKProperties -
Since:
1.1


Copyright © 2011 Research In Motion. All Rights Reserved.