net.rim.pushsdk.subscription.web
Enum SubscriptionStatusCode

java.lang.Object
  extended by java.lang.Enum<SubscriptionStatusCode>
      extended by net.rim.pushsdk.subscription.web.SubscriptionStatusCode
All Implemented Interfaces:
Serializable, Comparable<SubscriptionStatusCode>

public enum SubscriptionStatusCode
extends Enum<SubscriptionStatusCode>

Status codes returned by the subscription servlets (subscribe, unsubscribe, suspend, resume).

Author:
mdandrea

Enum Constant Summary
CANNOT_RESUME_SINCE_UNSUBSCRIBED
          If a user's subscription to a push application is inactive (i.e.
CANNOT_SUSPEND_SINCE_UNSUBSCRIBED
          If a user's subscription to a push application is inactive (i.e.
CONTENT_PROVIDER_SUBSCRIPTION_FAILED
          If the content provider's subscription attempt (subscribe/unsubscribe/suspend/resume) failed.
INVALID_ADDRESS
          If the address is null or empty or is longer than 40 characters in length.
INVALID_PARAMETERS
          If the OS version is null or empty.
INVALID_PASSWORD
          If the password is null or empty.
INVALID_PUSH_APPLICATION
          If the push application id is null or empty, if the push application with the given id cannot be found, or if the push application was found but was inactive or expired.
INVALID_SUBSCRIBER_ID
          If the subscriber id is null or empty (e.g.
INVALID_TYPE
          For applications of type Public+Enterprise Push, if the subscriber type is null or empty.
INVALID_USERNAME
          If the username is null or empty.
SUBSCRIBER_AUTHENTICATION_FAILED
          Authentication of the subscriber, based on the username and password they passed in, failed.
SUBSCRIBER_NOT_FOUND
          If a user's subscription to a push application cannot be found.
SUBSCRIPTION_NOT_SUPPORTED
          If subscription is not supported for a push application.
SUCCESS
          A successful subscription operation.
SYSTEM_ERROR
          If any other errors occur.
 
Method Summary
 String toString()
          Returns a status code of the following form rc=xxxxx.
static SubscriptionStatusCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SubscriptionStatusCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SUCCESS

public static final SubscriptionStatusCode SUCCESS
A successful subscription operation. (i.e. rc=200)


INVALID_ADDRESS

public static final SubscriptionStatusCode INVALID_ADDRESS
If the address is null or empty or is longer than 40 characters in length. (i.e. rc=10001)


INVALID_PARAMETERS

public static final SubscriptionStatusCode INVALID_PARAMETERS
If the OS version is null or empty. Or, if the model is null or empty. (i.e. rc=10011)


INVALID_PUSH_APPLICATION

public static final SubscriptionStatusCode INVALID_PUSH_APPLICATION
If the push application id is null or empty, if the push application with the given id cannot be found, or if the push application was found but was inactive or expired. (i.e. rc=10002)


SUBSCRIBER_NOT_FOUND

public static final SubscriptionStatusCode SUBSCRIBER_NOT_FOUND
If a user's subscription to a push application cannot be found. (i.e. rc=10007)


INVALID_SUBSCRIBER_ID

public static final SubscriptionStatusCode INVALID_SUBSCRIBER_ID
If the subscriber id is null or empty (e.g. if it could not be obtained through authentication of a user), is longer than 42 character in length, or if it matched the reserved "push_all" keyword. (i.e. rc=10020)


CANNOT_SUSPEND_SINCE_UNSUBSCRIBED

public static final SubscriptionStatusCode CANNOT_SUSPEND_SINCE_UNSUBSCRIBED
If a user's subscription to a push application is inactive (i.e. the user is unsubscribed), then it cannot be suspended. (i.e. rc=10021)


CANNOT_RESUME_SINCE_UNSUBSCRIBED

public static final SubscriptionStatusCode CANNOT_RESUME_SINCE_UNSUBSCRIBED
If a user's subscription to a push application is inactive (i.e. the user is unsubscribed), then it cannot be resumed. (i.e. rc=10022)


INVALID_USERNAME

public static final SubscriptionStatusCode INVALID_USERNAME
If the username is null or empty. (i.e. rc=10023)


INVALID_PASSWORD

public static final SubscriptionStatusCode INVALID_PASSWORD
If the password is null or empty. (i.e. rc=10024)


SUBSCRIPTION_NOT_SUPPORTED

public static final SubscriptionStatusCode SUBSCRIPTION_NOT_SUPPORTED
If subscription is not supported for a push application. This will only be possible for applications with a type of Enterprise Push which have the bypass subscription flag set to true. The error will also occur if attempting to subscribe to a Web Signal through the incorrect servlet. (i.e. rc=10025)


SUBSCRIBER_AUTHENTICATION_FAILED

public static final SubscriptionStatusCode SUBSCRIBER_AUTHENTICATION_FAILED
Authentication of the subscriber, based on the username and password they passed in, failed. (i.e. rc=10026)


CONTENT_PROVIDER_SUBSCRIPTION_FAILED

public static final SubscriptionStatusCode CONTENT_PROVIDER_SUBSCRIPTION_FAILED
If the content provider's subscription attempt (subscribe/unsubscribe/suspend/resume) failed. (i.e. rc=10027)


INVALID_TYPE

public static final SubscriptionStatusCode INVALID_TYPE
For applications of type Public+Enterprise Push, if the subscriber type is null or empty. For push applications of any type, if the subscriber type is specified (i.e. not null or empty) and it does not match "public" or "enterprise". (i.e. rc=10028)

Since:
1.1

SYSTEM_ERROR

public static final SubscriptionStatusCode SYSTEM_ERROR
If any other errors occur. (i.e. rc=-9999)

Method Detail

values

public static SubscriptionStatusCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SubscriptionStatusCode c : SubscriptionStatusCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SubscriptionStatusCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toString

public String toString()
Returns a status code of the following form rc=xxxxx.

Overrides:
toString in class Enum<SubscriptionStatusCode>


Copyright © 2011 Research In Motion. All Rights Reserved.