Namespace: OpenEdge.Mobile
Class 
PushNotificationMessageBuilder
Parent classes:
Inherits: OpenEdge.Net.HTTP.ConfigBuilder
ABSTRACT

Copyright (c) 2014, 2015 by Progress Software Corporation. All rights reserved.
File:PushNotificationMessageBuilder
Purpose:Helper class to build a notification message easily
Author(s):pjudge
Created:Fri Jun 13 13:11:41 EDT 2014
Notes:* Supported filter types:
Mobile db ABL
String Character
Boolean Logical
Number Decimal
Date Datetime-tz
Array JsonArray/JsonObject
Object JsonArray/JsonObject
Pointer JsonObject
Geo JsonObject




Method Summary
Options Name Purpose
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddArrayFilter (character, JsonConstruct, PushNotificationFilterOperandEnum) /** General method to add array filters to the payload. Supported operands: Includes/NotIncludes/Matches @param character The name of the type of filter (type/deviceID/etc) @param JsonConstruct The value to add. Could be Object (matches only) or array (Includes/NotIncludes) @param PushNotificationFilterOperandEnum The operand (eq/ne/etc) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddDateFilter (character, datetime, PushNotificationFilterOperandEnum) /** A general method to add Date filter values to the notification query/filter. Supported operands: eq/ne/gt/ge/lt/le/ @param character The filter name @param datetime The filter value @param PushNotificationFilterOperandEnum The operand (eg Equals or NotEqual) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddGeoFilter (character, JsonObject, PushNotificationFilterOperandEnum) /** General method to add Geolocations filters to the payload. Note that the objects required by the GEO type must have particular properties, but this method only validates some of the properties. Supported operands: near/nearSphere/within @param character The name of the type of filter (type/deviceID/etc) @param JsonObject The value to add. @param PushNotificationFilterOperandEnum The operand (eq/ne/etc) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddLogicalFilter (character, logical, PushNotificationFilterOperandEnum) /** A general method to add logical/boolean filter values to the notification query/filter. Only Equals and NotEqual supported @param character The filter name @param logical The filter value @param PushNotificationFilterOperandEnum The operand (eg Equals or NotEqual) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddNumericFilter (character, decimal, PushNotificationFilterOperandEnum) /** A general method to add numeric(decimal) filter values to the notification query/filter. Supported operands: eq/eq/gt/ge/lt/le/inc/ninc @param character The filter name @param decimal The filter value @param PushNotificationFilterOperandEnum The operand (eg Equals or NotEqual) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddObjectFilter (character, JsonConstruct, PushNotificationFilterOperandEnum) /** General method to add object filters to the payload. Note that the arrays required by Includes/NotIncludes must contain objects themselves, but this method does NOT validate the contents of the array. The notification service will do so. Supported operands: Includes/NotIncludes/Equals/NotEqual @param character The name of the type of filter (type/deviceID/etc) @param JsonConstruct The value to add. Could be Object (EqualEquals/NotEqual ) or array (Includes/NotIncludes) @param PushNotificationFilterOperandEnum The operand (eq/ne/etc) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddPointerFilter (character, JsonObject, PushNotificationFilterOperandEnum) /** General method to add object filters to the payload. Note that the objects required by the Pointer type must have particular properties, but this method validates some of the properties. Supported operands: Equals/NotEqual @param character The name of the type of filter (type/deviceID/etc) @param JsonObject The value to add. @param PushNotificationFilterOperandEnum The operand (eq/ne/etc) @return PushNotificationMessageBuilder This builder object */
# A OpenEdge.Mobile.PushNotificationMessageBuilder AddStringFilter (character, character, PushNotificationFilterOperandEnum) /** General method to add string/character filters to the payload. Supported operands: Equals/NotEqual/Includes/NotIncludes @param character The name of the type of filter (type/deviceID/etc) @param character The value to add @param PushNotificationFilterOperandEnum The operand (eq/ne/etc) @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder At (datetime-tz) /** Sets the time at which to schedule the notification. No-op if this is a send-immediate message. @param datetime-tz A time in the future (at least the following minute) at which to send the notification. @return PushNotificationMessageBuilder This builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder Badges (integer)
# OpenEdge.Mobile.PushNotificationMessageBuilder Build () /** Factory method for retrieving an instance of the server. @param URI A URI representing the notification server @param character The (mandatory) API key to enable notifications */
# OpenEdge.Mobile.PushNotificationMessageBuilder ExcludeChannels (JsonArray) /** Excludes the array of named channels. @param JsonArray An array of channels. @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder ExcludeDevice (character) /** Exclude the device from the Push notification filter . @param character A device ID @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder ExcludePlatform (ApplicationPlatformEnum) /** Excludes the given platform (can be multiple) @param ApplicationPlatformEnum The mobile platform to include @return PushNotificationMessageBuilder The current builder */
Progress.Json.ObjectModel.JsonArray GetArrayProperty (JsonObject, character) /** Returns an Array for the property, even if another value was previously set. @param JsonObject The parent @param character The property name @return JsonArray The corresponding property's value (always JsonArray) */
Progress.Json.ObjectModel.JsonObject GetObjectProperty (JsonObject, character) /** Returns an object for the property, even if another value was previously set. @param JsonObject The parent @param character The property name @return JsonObject The corresponding property's value (always JsonObject) */
# OpenEdge.Mobile.PushNotificationMessageBuilder IncludeChannels (JsonArray) /** Includes the array of named channels. @param JsonArray An array of channels. @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder IncludeDevice (character) /** Include the device in the Push notification filter . @param character A device ID @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder IncludePlatform (ApplicationPlatformEnum) /** Includes the given platform @param ApplicationPlatformEnum The mobile platform to include @return PushNotificationMessageBuilder The current builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder MatchChannels (JsonObject) /** Filter for matching the array of named channels. @param JsonArray An array of channels. @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder Message (character)
# OpenEdge.Mobile.PushNotificationMessageBuilder NotOnDevice (character) /** Push notification for all devices except for the given device id @param character A device ID @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder NotOnPlatform (ApplicationPlatformEnum) /** Exclude only the specified platform from the notification. @param ApplicationPlatformEnum The mobile platform to include @return PushNotificationMessageBuilder The current builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder OnDevice (character) /** Push notification for the given device id only. @param character A device ID @return PushNotificationMessageBuilder This builder object */
# OpenEdge.Mobile.PushNotificationMessageBuilder OnPlatform (ApplicationPlatformEnum) /** Send the notification to only this platform. @param ApplicationPlatformEnum The mobile platform to include @return PushNotificationMessageBuilder The current builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder Schedule (character, integer) /** Factory for this builder, for messages to schedule for future sending @param character The message text to be sent. @param integer The badge counter (only used for iOS). @return PushNotificationMessageBuilder The new builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder Send (character, integer) /** Factory for this builder, for messages to send immediately. @param character The message text to be sent. @param integer The badge counter (only used for iOS). @return PushNotificationMessageBuilder The new builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder SendNow (logical)
# OpenEdge.Mobile.PushNotificationMessageBuilder Titled (character) /** CHANNELS END **/
# OpenEdge.Mobile.PushNotificationMessageBuilder UseDeviceTimeZone () /** Tells the notification to use the device's timezone (not the timezone of the scheduled time). No-op for a send-immediate message. @return PushNotificationMessageBuilder This builder */
# OpenEdge.Mobile.PushNotificationMessageBuilder UseDeviceTimeZone (logical) /** Tells the notification to use the device's timezone (not the timezone of the scheduled time). No-op for a send-immediate message. @param logical TRUE if we are to use the device time zone. @return PushNotificationMessageBuilder The current builder */

Constructor Summary
Options Name Purpose
PushNotificationMessageBuilder () /** Constructor. */

Property Summary
Options Name Purpose
CHARACTER OperandValue /* List of operands that the message need. A property to keep it read-only. The index of this array matches the Value of the PushNotificationFilterOperandEnum property in question. */
# A Progress.Json.ObjectModel.JsonObject Payload /** Returns the newly-constructed payload. */
# LOGICAL SendImmediate /* Some operations ignored if this is a send-immediate */


Method Detail
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddArrayFilter (character, JsonConstruct, PushNotificationFilterOperandEnum)

Purpose: General method to add array filters to the payload.
Supported operands: Includes/NotIncludes/Matches
or array (Includes/NotIncludes)
Parameters:
pcFilterName CHARACTER
poFilterValue Progress.Json.ObjectModel.JsonConstruct
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddDateFilter (character, datetime, PushNotificationFilterOperandEnum)

Purpose: A general method to add Date filter values to the notification
query/filter.
Supported operands: eq/ne/gt/ge/lt/le/
Parameters:
pcFilterName CHARACTER
ptFilterValue DATETIME
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddGeoFilter (character, JsonObject, PushNotificationFilterOperandEnum)

Purpose: General method to add Geolocations filters to the payload. Note that the
objects required by the GEO type must have particular properties,
but this method only validates some of the properties.
Supported operands: near/nearSphere/within
Parameters:
pcFilterName CHARACTER
poFilterValue Progress.Json.ObjectModel.JsonObject
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddLogicalFilter (character, logical, PushNotificationFilterOperandEnum)

Purpose: A general method to add logical/boolean filter values to the notification
query/filter. Only Equals and NotEqual supported
Parameters:
pcFilterName CHARACTER
plFilterValue LOGICAL
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddNumericFilter (character, decimal, PushNotificationFilterOperandEnum)

Purpose: A general method to add numeric(decimal) filter values to the notification
query/filter.
Supported operands: eq/eq/gt/ge/lt/le/inc/ninc
Parameters:
pcFilterName CHARACTER
pdFilterValue DECIMAL
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddObjectFilter (character, JsonConstruct, PushNotificationFilterOperandEnum)

Purpose: General method to add object filters to the payload. Note that the
arrays required by Includes/NotIncludes must contain objects themselves,
but this method does NOT validate the contents of the array. The notification
service will do so.
Supported operands: Includes/NotIncludes/Equals/NotEqual
or array (Includes/NotIncludes)
Parameters:
pcFilterName CHARACTER
poFilterValue Progress.Json.ObjectModel.JsonConstruct
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddPointerFilter (character, JsonObject, PushNotificationFilterOperandEnum)

Purpose: General method to add object filters to the payload. Note that the
objects required by the Pointer type must have particular properties,
but this method validates some of the properties.
Supported operands: Equals/NotEqual
Parameters:
pcFilterName CHARACTER
poFilterValue Progress.Json.ObjectModel.JsonObject
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder AddStringFilter (character, character, PushNotificationFilterOperandEnum)

Purpose: General method to add string/character filters to the payload.
Supported operands: Equals/NotEqual/Includes/NotIncludes
Parameters:
pcFilterName CHARACTER
pcFilterValue CHARACTER
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder At (datetime-tz)

Purpose: Sets the time at which to schedule the notification. No-op if this is a
send-immediate message.
at which to send the notification.
Parameters:
ptSendAt DATETIME-TZ
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder Badges (integer)

Parameters:
piBadgeCount INTEGER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder Build ()

Purpose: Factory method for retrieving an instance of the server.
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder ExcludeChannels (JsonArray)

Purpose: Excludes the array of named channels.
Parameters:
poChannels Progress.Json.ObjectModel.JsonArray
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder ExcludeDevice (character)

Purpose: Exclude the device from the Push notification filter .
Parameters:
pcDeviceId CHARACTER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder ExcludePlatform (ApplicationPlatformEnum)

Purpose: Excludes the given platform (can be multiple)
Parameters:
poPlatform OpenEdge.Mobile.ApplicationPlatformEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The current builder
Top

Progress.Json.ObjectModel.JsonArray GetArrayProperty (JsonObject, character)

Purpose: Returns an Array for the property, even if another value was previously
set.
Parameters:
poParent Progress.Json.ObjectModel.JsonObject
pcPropertyName CHARACTER
Returns Progress.Json.ObjectModel.JsonArray
JsonArray The corresponding property's value (always JsonArray)
Top

Progress.Json.ObjectModel.JsonObject GetObjectProperty (JsonObject, character)

Purpose: Returns an object for the property, even if another value was previously
set.
Parameters:
poParent Progress.Json.ObjectModel.JsonObject
pcPropertyName CHARACTER
Returns Progress.Json.ObjectModel.JsonObject
JsonObject The corresponding property's value (always JsonObject)
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder IncludeChannels (JsonArray)

Purpose: Includes the array of named channels.
Parameters:
poChannels Progress.Json.ObjectModel.JsonArray
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder IncludeDevice (character)

Purpose: Include the device in the Push notification filter .
Parameters:
pcDeviceId CHARACTER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder IncludePlatform (ApplicationPlatformEnum)

Purpose: Includes the given platform
Parameters:
poPlatform OpenEdge.Mobile.ApplicationPlatformEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The current builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder MatchChannels (JsonObject)

Purpose: Filter for matching the array of named channels.
Parameters:
poChannels Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder Message (character)

Parameters:
pcMessage CHARACTER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder NotOnDevice (character)

Purpose: Push notification for all devices except for the given device id
Parameters:
pcDeviceId CHARACTER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder NotOnPlatform (ApplicationPlatformEnum)

Purpose: Exclude only the specified platform from the notification.
Parameters:
poPlatform OpenEdge.Mobile.ApplicationPlatformEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The current builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder OnDevice (character)

Purpose: Push notification for the given device id only.
Parameters:
pcDeviceId CHARACTER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder object
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder OnPlatform (ApplicationPlatformEnum)

Purpose: Send the notification to only this platform.
Parameters:
poPlatform OpenEdge.Mobile.ApplicationPlatformEnum
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The current builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder Schedule (character, integer)

Purpose: Factory for this builder, for messages to schedule for future sending
Parameters:
pcMessage CHARACTER
piBadge INTEGER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The new builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder Send (character, integer)

Purpose: Factory for this builder, for messages to send immediately.
Parameters:
pcMessage CHARACTER
piBadge INTEGER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The new builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder SendNow (logical)

Parameters:
plSendNow LOGICAL
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder Titled (character)

Purpose: CHANNELS END
Parameters:
pcTitle CHARACTER
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder UseDeviceTimeZone ()

Purpose: Tells the notification to use the device's timezone (not the timezone
of the scheduled time). No-op for a send-immediate message.
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder This builder
Top

PROTECTED OpenEdge.Mobile.PushNotificationMessageBuilder UseDeviceTimeZone (logical)

Purpose: Tells the notification to use the device's timezone (not the timezone
of the scheduled time). No-op for a send-immediate message.
Parameters:
plUseDeviceTimeZone LOGICAL
Returns OpenEdge.Mobile.PushNotificationMessageBuilder
PushNotificationMessageBuilder The current builder


Constructor Detail
Top

PushNotificationMessageBuilder ()

Purpose: Constructor.


Property Detail
Top

CHARACTER OperandValue

/* List of operands that the message need. A property to keep it read-only.
The index of this array matches the Value of the
PushNotificationFilterOperandEnum property in question.
Returns CHARACTER
Top

PROTECTED Progress.Json.ObjectModel.JsonObject Payload

Purpose: Returns the newly-constructed payload.
Returns Progress.Json.ObjectModel.JsonObject
Top

PROTECTED LOGICAL SendImmediate

/* Some operations ignored if this is a send-immediate
Returns LOGICAL


10.27.2015 12:36:32