net.rim.pushsdk.subscription.web
Class UnsubscribeRequest

java.lang.Object
  extended by net.rim.pushsdk.subscription.web.BaseRequest
      extended by net.rim.pushsdk.subscription.web.UnsubscribeRequest
All Implemented Interfaces:
Serializable

public class UnsubscribeRequest
extends BaseRequest

Represents the details of an unsubscribe request.

Author:
mdandrea
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.rim.pushsdk.subscription.web.BaseRequest
pushApplicationId, subscriberId
 
Constructor Summary
UnsubscribeRequest()
          Constructs an unsubscribe request.
UnsubscribeRequest(String pushApplicationId, String subscriberId)
          Constructs an unsubscribe request with the given app id and subscriber id.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two unsubscribe requests are found to be equal and false otherwise.
 int hashCode()
          Returns a hashcode for this unsubscribe request.
 boolean isAutomaticUnsubscribe()
          Returns true when the unsubscribe request comes automatically from the system and not from a user.
 boolean isNotifyPPG()
          Returns true if the PPG should be notified of this unsubscribe request.
 void setAutomaticUnsubscribe(boolean isAutomaticUnsubscribe)
          Set to true for an unsubscribe request from the system and false for one from an external user.
 void setNotifyPPG(boolean isNotifyPPG)
          Set to true if the PPG should be notified of this unsubscribe request.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class net.rim.pushsdk.subscription.web.BaseRequest
getPushApplicationId, getSubscriberId, setPushApplicationId, setSubscriberId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnsubscribeRequest

public UnsubscribeRequest()
Constructs an unsubscribe request.


UnsubscribeRequest

public UnsubscribeRequest(String pushApplicationId,
                          String subscriberId)
Constructs an unsubscribe request with the given app id and subscriber id.

Parameters:
pushApplicationId - the app id of a push application
subscriberId - the id of a subscriber to a push application
Method Detail

isAutomaticUnsubscribe

public boolean isAutomaticUnsubscribe()
Returns true when the unsubscribe request comes automatically from the system and not from a user. Otherwise, returns false.

Returns:
true for an automatic unsubscribe; false, otherwise

setAutomaticUnsubscribe

public void setAutomaticUnsubscribe(boolean isAutomaticUnsubscribe)
Set to true for an unsubscribe request from the system and false for one from an external user.

Parameters:
isAutomaticUnsubscribe - whether or not we are dealing with an automatic unsubscribe request

setNotifyPPG

public void setNotifyPPG(boolean isNotifyPPG)
Set to true if the PPG should be notified of this unsubscribe request.

Parameters:
isNotifyPPG - true if the PPG should be notified; false otherwise
Since:
1.1

isNotifyPPG

public boolean isNotifyPPG()
Returns true if the PPG should be notified of this unsubscribe request.

Returns:
whether the PPG should be notified
Since:
1.1

hashCode

public int hashCode()
Returns a hashcode for this unsubscribe request.

Overrides:
hashCode in class BaseRequest
Returns:
a hashcode for this unsubscribe request.

equals

public boolean equals(Object obj)
Returns true if two unsubscribe requests are found to be equal and false otherwise.

Overrides:
equals in class BaseRequest
Returns:
whether two unsubscribe requests are equal

toString

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

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


Copyright © 2011 Research In Motion. All Rights Reserved.