net.rim.pushsdk.push.request
Class PushRequest

java.lang.Object
  extended by net.rim.pushsdk.push.request.PushRequest
All Implemented Interfaces:
Serializable

public class PushRequest
extends Object
implements Serializable

Value object that represents a push request object.

A push request object model captures the high-level attributes that overall define a push message at push time. The SDK can persist this value object to storage so that you can query old push requests in storage at a later time (i.e. for generating reports, etc.). For one push request, there will also be many push request details saved to storage (one for each subscriber).

Author:
dstrelbytsky
See Also:
Serialized Form

Constructor Summary
PushRequest()
          Default constructor for creating a push request object.
PushRequest(PushRequest pushRequest)
          Copy Constructor.
 
Method Summary
 Integer getAddressCount()
          Gets the total count of the addresses associated with the push request.
 String getBearer()
          Gets the bearer associated with the push request.
 Long getContentSize()
          Gets the content size of the push message in megabytes.
 Date getCreatedDate()
          Gets the date at which the push request was created.
 DeliveryMethod getDeliveryMethod()
          Gets the delivery method associated with the request.
 String getEnterpriseNotifyUrl()
          Gets the notify URL associated with this request for the enterprise/BES PPG.
 StatusCode getEnterpriseStatusCode()
          Gets the status code of the push request as returned by the enterprise/BES PPG.
 String getEnterpriseStatusDesc()
          Gets a description of the status code description of the push request as returned by the enterprise/BES PPG.
 Date getExpiryDate()
          Gets the expiry date of the push request.
 String getId()
          Gets the id of the push request.
 Date getModifiedDate()
          Gets the date at which the push request was last modified.
 String getNotifyUrl()
          Deprecated. As of version 1.1, use getPublicNotifyUrl() or getEnterpriseNotifyUrl()
 String getPublicNotifyUrl()
          Gets the notify URL associated with this request for the public/BIS PPG.
 StatusCode getPublicStatusCode()
          Gets the status code of the push request as returned by the public/BIS PPG.
 String getPublicStatusDesc()
          Gets a description of the status code description of the push request as returned by the public/BIS PPG.
 String getPushApplicationId()
          Gets the id of the push application associated with this request.
 StatusCode getStatusCode()
          Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.
 String getStatusDesc()
          Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.
 Collection<SubscriberPartial> getSubscribers()
          Gets the list of subscribers associated with the push request.
 Long getTotalContentSize()
          Gets the total content size of the push request in megabytes.
 void setAddressCount(Integer addressCount)
          Sets the total count of addresses associated with the push request.
 void setBearer(String bearer)
          Sets the bearer associated with the push request.
 void setContentSize(Long contentSize)
          Sets the content size of the push message in megabytes.
 void setCreatedDate(Date createdDate)
          Sets the date at which the push request was created.
 void setDeliveryMethod(DeliveryMethod deliveryMethod)
          Sets the delivery method associated with the request.
 void setEnterpriseNotifyUrl(String enterpriseNotifyUrl)
          Sets the notify URL associated with the request for the enterprise/BES PGG
 void setEnterpriseStatusCode(StatusCode enterpriseStatusCode)
          Sets the status code of the push request returned from the enterprise/BES PPG upon push submission.
 void setEnterpriseStatusDesc(String enterpriseStatusDesc)
          Sets the description of the status code returned from the enterprise/BES PPG upon push submission.
 void setExpiryDate(Date expiryDate)
          Sets the expiry date of the push request.
 void setId(String id)
          Sets the id of the push request.
 void setModifiedDate(Date modifiedDate)
          Sets the date at which the push request was last modified.
 void setNotifyUrl(String notifyUrl)
          Deprecated. As of version 1.1, use setPublicNotifyUrl(String) or setEnterpriseNotifyUrl(String)
 void setPublicNotifyUrl(String publicNotifyUrl)
          Sets the notify URL associated with the request for the public/BIS PGG
 void setPublicStatusCode(StatusCode publicStatusCode)
          Sets the status code of the push request returned from the public/BIS PPG upon push submission.
 void setPublicStatusDesc(String publicStatusDesc)
          Sets the description of the status code returned from the public/BIS PPG upon push submission.
 void setPushApplicationId(String pushApplicationId)
          Sets the id of the push application associated with this request.
 void setStatusCode(StatusCode statusCode)
          Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.
 void setStatusDesc(String statusDesc)
          Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.
 void setSubscribers(Collection<SubscriberPartial> subscribers)
          Sets the list of subscribers associated with the push request.
 void setTotalContentSize(Long totalContentSize)
          Sets the total content size of the push request in megabytes.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PushRequest

public PushRequest(PushRequest pushRequest)
Copy Constructor.

Parameters:
pushRequest - a PushRequest object

PushRequest

public PushRequest()
Default constructor for creating a push request object.

Method Detail

getId

public String getId()
Gets the id of the push request.

Returns:
the push request id

setId

public void setId(String id)
Sets the id of the push request.

Parameters:
id - the push request id

getPushApplicationId

public String getPushApplicationId()
Gets the id of the push application associated with this request.

Returns:
the push application id

setPushApplicationId

public void setPushApplicationId(String pushApplicationId)
Sets the id of the push application associated with this request.

Parameters:
pushApplicationId - the push application id

getNotifyUrl

@Deprecated
public String getNotifyUrl()
Deprecated. As of version 1.1, use getPublicNotifyUrl() or getEnterpriseNotifyUrl()

Gets the notify URL associated with this request.

Returns:
the notify URL; null if not set
Throws:
IllegalArgumentException - The return value for this method is undefined if both public/BIS and enterprise/BES notify URLs present. Please use the specific getters.
See Also:
PushApplication

setNotifyUrl

@Deprecated
public void setNotifyUrl(String notifyUrl)
Deprecated. As of version 1.1, use setPublicNotifyUrl(String) or setEnterpriseNotifyUrl(String)

Sets the notify URL associated with the request.

Parameters:
notifyUrl - the notify URL
See Also:
PushApplication

getPublicNotifyUrl

public String getPublicNotifyUrl()
Gets the notify URL associated with this request for the public/BIS PPG.

Returns:
the notify URL used by the public/BIS PPG
Since:
1.1
See Also:
PushApplication

setPublicNotifyUrl

public void setPublicNotifyUrl(String publicNotifyUrl)
Sets the notify URL associated with the request for the public/BIS PGG

Parameters:
publicNotifyUrl - the notify URL used by the public/BIS PPG
Since:
1.1
See Also:
PushApplication

getEnterpriseNotifyUrl

public String getEnterpriseNotifyUrl()
Gets the notify URL associated with this request for the enterprise/BES PPG.

Returns:
the notify URL used by the enterprise/BES PPG
Since:
1.1
See Also:
PushApplication

setEnterpriseNotifyUrl

public void setEnterpriseNotifyUrl(String enterpriseNotifyUrl)
Sets the notify URL associated with the request for the enterprise/BES PGG

Parameters:
enterpriseNotifyUrl - the notify URL used by the enterprise/BES PPG
Since:
1.1
See Also:
PushApplication

getDeliveryMethod

public DeliveryMethod getDeliveryMethod()
Gets the delivery method associated with the request.

Returns:
the delivery method

setDeliveryMethod

public void setDeliveryMethod(DeliveryMethod deliveryMethod)
Sets the delivery method associated with the request.

Parameters:
deliveryMethod - the delivery method

getStatusCode

@Deprecated
public StatusCode getStatusCode()
Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.

Gets the status code of the push request.

Note: The status code only represents the status returned from the PPG upon push submission.

Returns:
the push request's status code

setStatusCode

@Deprecated
public void setStatusCode(StatusCode statusCode)
Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.

Sets the status code of the push request.

Parameters:
statusCode - the push request's status code

getStatusDesc

@Deprecated
public String getStatusDesc()
Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.

Gets a description of the status code associated with the push request.

Returns:
the description of the status code

setStatusDesc

@Deprecated
public void setStatusDesc(String statusDesc)
Deprecated. As of release 1.1, the status code of the PushRequest is no longer used. Since the PushRequest may have been sent to both the public/BIS PPG and the enterprise/BES PPG the status of the overall push is ambiguous. Instead, look at the status code in the PushRequestDetail for each subscriber.

Sets the description of the status code associated with the push request.

Parameters:
statusDesc - the description of the status code

getPublicStatusCode

public StatusCode getPublicStatusCode()
Gets the status code of the push request as returned by the public/BIS PPG.

Note: The status code only represents the status returned from the public/BIS PPG upon push submission.

Returns:
the push request's status code; can be null if this object is loaded through the DAO since this value is not persisted with the PushRequest
Since:
1.1

setPublicStatusCode

public void setPublicStatusCode(StatusCode publicStatusCode)
Sets the status code of the push request returned from the public/BIS PPG upon push submission. This value is to be considered transient and will not be persisted to storage with the PushRequest.

Parameters:
publicStatusCode - the push request's status code
Since:
1.1

getPublicStatusDesc

public String getPublicStatusDesc()
Gets a description of the status code description of the push request as returned by the public/BIS PPG.

Note: This value is not persisted with the PushRequest.

Returns:
the description of the status code; can be null if this object is loaded through the DAO since this value is not persisted with the PushRequest
Since:
1.1

setPublicStatusDesc

public void setPublicStatusDesc(String publicStatusDesc)
Sets the description of the status code returned from the public/BIS PPG upon push submission. This value is to be considered transient and will not be persisted to storage with the PushRequest.

Parameters:
publicStatusDesc - the description of the status code
Since:
1.1

getEnterpriseStatusCode

public StatusCode getEnterpriseStatusCode()
Gets the status code of the push request as returned by the enterprise/BES PPG.

Note: The status code only represents the status returned from the enterprise/BES upon push submission.

Returns:
the push request's status code; can be null if this object is loaded through the DAO since this value is not persisted with the PushRequest
Since:
1.1

setEnterpriseStatusCode

public void setEnterpriseStatusCode(StatusCode enterpriseStatusCode)
Sets the status code of the push request returned from the enterprise/BES PPG upon push submission. This value is to be considered transient and will not be persisted to storage with the PushRequest.

Parameters:
enterpriseStatusCode - the push request's status code
Since:
1.1

getEnterpriseStatusDesc

public String getEnterpriseStatusDesc()
Gets a description of the status code description of the push request as returned by the enterprise/BES PPG.

Returns:
the description of the status code; can be null if this object is loaded through the DAO since this value is not persisted with the PushRequest
Since:
1.1

setEnterpriseStatusDesc

public void setEnterpriseStatusDesc(String enterpriseStatusDesc)
Sets the description of the status code returned from the enterprise/BES PPG upon push submission. . This value is to be considered transient and will not be persisted to storage with the PushRequest.

Parameters:
enterpriseStatusDesc - the description of the status code
Since:
1.1

getExpiryDate

public Date getExpiryDate()
Gets the expiry date of the push request.

Returns:
the push request's expiry date

setExpiryDate

public void setExpiryDate(Date expiryDate)
Sets the expiry date of the push request.

Parameters:
expiryDate - the push request's expiry date

getBearer

public String getBearer()
Gets the bearer associated with the push request. Note: The bearer attribute cannot currently be set when performing a push through the PushService interface.

Returns:
the bearer associated with the push request

setBearer

public void setBearer(String bearer)
Sets the bearer associated with the push request. Note: The bearer attribute cannot currently be set when performing a push through the PushService interface.

Parameters:
bearer - the bearer associated with the push request

getSubscribers

public Collection<SubscriberPartial> getSubscribers()
Gets the list of subscribers associated with the push request.

Note: When loading the push request from the persistent store this will be null if using the SDK default DAO implementation for performance reasons.

Returns:
a list of subscribers

setSubscribers

public void setSubscribers(Collection<SubscriberPartial> subscribers)
Sets the list of subscribers associated with the push request.

Parameters:
subscribers - a list of subscribers

getAddressCount

public Integer getAddressCount()
Gets the total count of the addresses associated with the push request. This is not a calculated value - it will return the value as set from the setAddressCount(Integer).

Returns:
a count of addresses

setAddressCount

public void setAddressCount(Integer addressCount)
Sets the total count of addresses associated with the push request. This value should be set to the sum of the public subscribers and enterprise subscribers.

Parameters:
addressCount - a count of addresses

getContentSize

public Long getContentSize()
Gets the content size of the push message in megabytes.

Returns:
the content size

setContentSize

public void setContentSize(Long contentSize)
Sets the content size of the push message in megabytes.

Parameters:
contentSize - the content size

getTotalContentSize

public Long getTotalContentSize()
Gets the total content size of the push request in megabytes. If multiple addresses are being sent to, the total would be the number of addresses * content size.

Returns:
the total content size

setTotalContentSize

public void setTotalContentSize(Long totalContentSize)
Sets the total content size of the push request in megabytes. If multiple addresses are being sent to, the total would be the number of addresses * content size.

Parameters:
totalContentSize - the total content size

getCreatedDate

public Date getCreatedDate()
Gets the date at which the push request was created.

Returns:
the push request's created date

setCreatedDate

public void setCreatedDate(Date createdDate)
Sets the date at which the push request was created.

Parameters:
createdDate - the push request's created date

getModifiedDate

public Date getModifiedDate()
Gets the date at which the push request was last modified.

Returns:
the push request's last modified date

setModifiedDate

public void setModifiedDate(Date modifiedDate)
Sets the date at which the push request was last modified.

Parameters:
modifiedDate - the push request's last modified date

toString

public String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class Object
Returns:
a String representation of this object.


Copyright © 2011 Research In Motion. All Rights Reserved.