|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.pap.control.PapControl
public abstract class PapControl
Base class for all PAP control objects.
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_KEY_VALUE_SEPARATOR
The separator to use for attributes. |
static String |
CLOSE_BRACKET
A close bracket for an XML tag. |
static String |
CLOSE_BRACKET_WITH_SLASH
A forward slash followed by a close bracket for an XML tag. |
static String |
DTD_DECLARATION_BES
Deprecated. The enterprise (BES) DTD will now be obtained from the PushSDK.properties file. |
static String |
DTD_DECLARATION_PUBLIC
Deprecated. The public (BIS) DTD will now be obtained from the PushSDK.properties file. |
static String |
EPILOGUE
Deprecated. As of version 1.1 ,the XML epilogue should be generated on demand by calling the getEpilogue() method. |
static String |
ESCAPED_DOUBLE_QUOTE
An escaped double quote. |
static String |
FORWARD_SLASH
A forward slash. |
static String |
NEW_LINE
A new-line character (i.e. |
static String |
OPEN_BRACKET
An open bracket for an XML tag. |
static String |
OPEN_BRACKET_WITH_SLASH
An open bracket for an XML tag followed by a forward slash. |
static String |
PREAMBLE_BES
Deprecated. As of version 1.1, the enterprise (BES) XML preamble should be generated on demand by calling the getPreamble() method. |
static String |
PREAMBLE_PUBLIC
Deprecated. As of version 1.1, the public (BIS) XML preamble should be generated on demand by calling the getPreamble() method. |
protected String |
pushId
The push id associated with the PAP control. |
protected PushSDKProperties |
pushSDKProperties
Defaults to the provided PushSDKPropertiesImpl implementation, but can be overridden with the setter. |
protected Boolean |
usingPublicPush
True if a public (BIS) push is being performed; false otherwise. |
static String |
XML_DECLARATION
The XML declaration tag. |
| Constructor Summary | |
|---|---|
PapControl()
|
|
| Method Summary | |
|---|---|
static String |
getAttribute(String attribute,
String value)
Gets an attribute in the following form: attribute=\"value\". |
ContentType |
getContentType()
Gets the content type of the PAP control. |
static String |
getEndTag(String tag)
Gets an XML end tag with the given tag name. |
protected String |
getEpilogue()
Gets the PAP control epilogue. |
protected String |
getPreamble()
Gets the PAP control preamble. |
static String |
getStartTagClosed(String tag)
Gets a closed XML start tag (i.e. |
static String |
getStartTagOpen(String tag)
Gets an open XML start tag (i.e. |
boolean |
isUsingPublicPush()
Whether or not a PAP control is being used for a public (BIS) push or an enterprise (BES) push. |
void |
setPushSDKProperties(PushSDKProperties pushSDKProperties)
Sets the push SDK properties to be used with the PAP control. |
void |
setUsingPublicPush(boolean usingPublicPush)
Sets whether or not to use a PAP control for a public (BIS) push or for an enterprise (BES) push. |
protected abstract void |
validate()
Validates the information contained within the PAP control. |
protected void |
validatePushIdForSpecialCharacters(String pushId)
Validates if the provided push id does not contain any special characters defined in the "parser.special.characters" property of the PushSDK.properties file. |
abstract void |
writeTo(ByteArrayOutputStream out)
Writes the PAP control out to the specified output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NEW_LINE
public static final String OPEN_BRACKET
public static final String CLOSE_BRACKET
public static final String ESCAPED_DOUBLE_QUOTE
public static final String FORWARD_SLASH
public static final String OPEN_BRACKET_WITH_SLASH
public static final String CLOSE_BRACKET_WITH_SLASH
public static final String ATTRIBUTE_KEY_VALUE_SEPARATOR
public static final String XML_DECLARATION
@Deprecated public static final String DTD_DECLARATION_BES
@Deprecated public static final String DTD_DECLARATION_PUBLIC
@Deprecated public static final String PREAMBLE_BES
getPreamble() method.
@Deprecated public static final String PREAMBLE_PUBLIC
getPreamble() method.
@Deprecated public static final String EPILOGUE
getEpilogue() method.
protected PushSDKProperties pushSDKProperties
PushSDKPropertiesImpl implementation, but can be overridden with the setter.
protected Boolean usingPublicPush
protected String pushId
| Constructor Detail |
|---|
public PapControl()
| Method Detail |
|---|
public abstract void writeTo(ByteArrayOutputStream out)
throws IOException
out - the output stream
IOException - if any errors occur writing to the output streampublic void setUsingPublicPush(boolean usingPublicPush)
usingPublicPush - true if using the PAP control for a public (BIS) push; false otherwisepublic boolean isUsingPublicPush()
PushSDKProperties for backwards compatibility.
public void setPushSDKProperties(PushSDKProperties pushSDKProperties)
pushSDKProperties - the push SDK propertiespublic ContentType getContentType()
public static String getAttribute(String attribute,
String value)
attribute - the attribute namevalue - the value of the attribute
public static String getEndTag(String tag)
tag - the tag name
public static String getStartTagOpen(String tag)
tag - the tag name
public static String getStartTagClosed(String tag)
tag - the tag name
protected String getPreamble()
protected String getEpilogue()
protected void validatePushIdForSpecialCharacters(String pushId)
pushId - push id to validateprotected abstract void validate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||