|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.subscription.web.SubscriptionRequestParser
public class SubscriptionRequestParser
Parses the needed parameters out of various subscription-related HTTP requests.
| Field Summary | |
|---|---|
static String |
REQUEST_PARAM_ADDRESS
The subscriber's address (e.g. |
static String |
REQUEST_PARAM_MODEL
The model number of the subscriber's device HTTP request parameter. |
static String |
REQUEST_PARAM_OS_VERSION
The OS version of the subscriber's device HTTP request parameter. |
static String |
REQUEST_PARAM_PASSWORD
The subscriber's password HTTP request parameter. |
static String |
REQUEST_PARAM_PUSH_APP_ID
The push application id HTTP request parameter. |
static String |
REQUEST_PARAM_TYPE
The subscriber's type HTTP request parameter. |
static String |
REQUEST_PARAM_USERNAME
The subscriber's username HTTP request parameter. |
| Constructor Summary | |
|---|---|
SubscriptionRequestParser()
|
|
| Method Summary | |
|---|---|
AuthenticationRequest |
parseAuthenticationRequest(javax.servlet.http.HttpServletRequest request)
Parses out the HTTP request parameters from an authentication request and constructs an authentication request with the app id, username and password fields set. |
ResumeRequest |
parseResumeRequest(javax.servlet.http.HttpServletRequest request)
Parses out the HTTP request parameters from a resume request and constructs a resume request with the app id field set. |
SubscribeRequest |
parseSubscribeRequest(javax.servlet.http.HttpServletRequest request)
Parses out the HTTP request parameters from a subscribe request and constructs a subscribe request with the following fields set: app id, address, OS version, model number, and type (the type field can be null if the app id does not correspond to a push application with a type of Public+Enterprise Push). |
SuspendRequest |
parseSuspendRequest(javax.servlet.http.HttpServletRequest request)
Parses out the HTTP request parameters from a suspend request and constructs a suspend request with the app id field set. |
UnsubscribeRequest |
parseUnsubscribeRequest(javax.servlet.http.HttpServletRequest request)
Parses out the HTTP request parameters from an unsubscribe request and constructs an unsubscribe request with the app id field set. |
protected static String |
trim(String str)
Trims white space from a String, if the String is not null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REQUEST_PARAM_PUSH_APP_ID
public static final String REQUEST_PARAM_ADDRESS
public static final String REQUEST_PARAM_OS_VERSION
public static final String REQUEST_PARAM_MODEL
public static final String REQUEST_PARAM_USERNAME
public static final String REQUEST_PARAM_PASSWORD
public static final String REQUEST_PARAM_TYPE
| Constructor Detail |
|---|
public SubscriptionRequestParser()
| Method Detail |
|---|
public SubscribeRequest parseSubscribeRequest(javax.servlet.http.HttpServletRequest request)
request - an HTTP request
SubIllegalArgumentException - if the "type" request parameter was invalid (i.e. anything but null or the valid values)public UnsubscribeRequest parseUnsubscribeRequest(javax.servlet.http.HttpServletRequest request)
request - an HTTP request
public SuspendRequest parseSuspendRequest(javax.servlet.http.HttpServletRequest request)
request - an HTTP request
public ResumeRequest parseResumeRequest(javax.servlet.http.HttpServletRequest request)
request - an HTTP request
public AuthenticationRequest parseAuthenticationRequest(javax.servlet.http.HttpServletRequest request)
request - an HTTP request
protected static String trim(String str)
str - the String to be trimmed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||