net.rim.pushsdk.subscription.auth
Class AuthenticationRequest

java.lang.Object
  extended by net.rim.pushsdk.subscription.auth.BaseAuthenticationRequest
      extended by net.rim.pushsdk.subscription.auth.AuthenticationRequest
All Implemented Interfaces:
Serializable

public class AuthenticationRequest
extends BaseAuthenticationRequest

Represents the details from an HTTP request to be used for authenticating a subscriber.

Author:
mdandrea
See Also:
Serialized Form

Field Summary
protected  String password
          The password that will be used to authenticate a subscriber.
static String PASSWORD_ERROR_FIELD
          Field which will always appear in exceptions thrown relating to the subscriber's password.
protected  SubscriptionType subscriptionType
          The type of subscription operation being performed.
 
Fields inherited from class net.rim.pushsdk.subscription.auth.BaseAuthenticationRequest
APP_ID_ERROR_FIELD, pushApplicationId, username, USERNAME_ERROR_FIELD
 
Constructor Summary
AuthenticationRequest()
          Constructs an authentication request.
AuthenticationRequest(String pushApplicationId, String username, String password, SubscriptionType subscriptionType)
          Constructs an authentication request with the given application id, username, password, and subscription type.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two authentication requests are found to be equal and false otherwise.
 String getPassword()
          Gets the current password of a subscriber.
 SubscriptionType getSubscriptionType()
          Gets the current subscription operation type.
 int hashCode()
          Returns a hashcode for this authentication request.
 void setPassword(String password)
          Sets the subscriber's password.
 void setSubscriptionType(SubscriptionType subscriptionType)
          Sets the subscription operation type.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class net.rim.pushsdk.subscription.auth.BaseAuthenticationRequest
getPushApplicationId, getUsername, setPushApplicationId, setUsername
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PASSWORD_ERROR_FIELD

public static final String PASSWORD_ERROR_FIELD
Field which will always appear in exceptions thrown relating to the subscriber's password.

See Also:
Constant Field Values

password

protected String password
The password that will be used to authenticate a subscriber.


subscriptionType

protected SubscriptionType subscriptionType
The type of subscription operation being performed.

Constructor Detail

AuthenticationRequest

public AuthenticationRequest()
Constructs an authentication request.


AuthenticationRequest

public AuthenticationRequest(String pushApplicationId,
                             String username,
                             String password,
                             SubscriptionType subscriptionType)
Constructs an authentication request with the given application id, username, password, and subscription type.

Parameters:
pushApplicationId - the id of the push application a user is attempting to authenticate for
username - the username that will be used to authenticate a subscriber
password - the password that will be used to authenticate a subscriber
subscriptionType - the type of subscription operation being performed
Method Detail

getPassword

public String getPassword()
Gets the current password of a subscriber.

Returns:
the password that will be used to authenticate a subscriber

setPassword

public void setPassword(String password)
Sets the subscriber's password.

Parameters:
password - the password that will be used to authenticate a subscriber

getSubscriptionType

public SubscriptionType getSubscriptionType()
Gets the current subscription operation type.

Returns:
the type of subscription operation being performed
See Also:
SubscriptionType

setSubscriptionType

public void setSubscriptionType(SubscriptionType subscriptionType)
Sets the subscription operation type.

Parameters:
subscriptionType - the type of subscription operation being performed
See Also:
SubscriptionType

hashCode

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

Overrides:
hashCode in class BaseAuthenticationRequest
Returns:
a hashcode for this authentication request.

equals

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

Overrides:
equals in class BaseAuthenticationRequest
Returns:
whether two authentication requests are equal

toString

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

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


Copyright © 2011 Research In Motion. All Rights Reserved.