Namespace: OpenEdge.Mobile
Class
ApperyPushNotificationMessageBuilder
Parent classes:
Inherits: OpenEdge.Mobile.PushNotificationMessageBuilder

Copyright (c) 2014, 2015 by Progress Software Corporation. All rights reserved.
File:ApperyPushNotificationMessageBuilder
Purpose:Helper class to build a notification message easily
Author(s):pjudge
Created:Fri Jun 13 13:11:41 EDT 2014
Notes:* Per spec/doc the message is as follows
{
"payload": {
"message": <message>,
"badge": <badge>
},
"status":"sent",
"schedule": {
"scheduledTime": <scheduled_time>,
"timeZone": <time_zone>,
"useDeviceTimeZone": <use_time_zone>
},
"filter": {
"deviceID": <deviceIDcriteria>,
"<param1>": <criteria>,
}
}
Mobile db ABL
String Character
Boolean Logical
Number Decimal
Date Datetime-tz
Array JsonArray/JsonObject
Object JsonArray/JsonObject
Pointer JsonObject
Geo JsonObject
/* platform names per Appery




Method Summary
Options Name Purpose
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
Progress.Json.ObjectModel.JsonObject NewPayload () /** Returns a useable Payload based on the config. @return JsonObject A useable push notification message payload */
LOGICAL ValidateOperand (JsonObject, character, PushNotificationFilterOperandEnum) /** Validates the incoming operand with any existing operand. The operand cannot be changed once set. @param JsonObject The object representing the 'filter' property. @param character The name of the type of filter (type/deviceID/etc) @param PushNotificationFilterOperandEnum The operand (eq/ne/etc) @return logical True if a filter already exists */

Property Summary
Options Name Purpose
Progress.Json.ObjectModel.JsonObject Payload


Method Detail
Top

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

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

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

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

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

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

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

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

Progress.Json.ObjectModel.JsonObject NewPayload ()

Purpose: Returns a useable Payload based on the config.
Returns Progress.Json.ObjectModel.JsonObject
JsonObject A useable push notification message payload
Top

LOGICAL ValidateOperand (JsonObject, character, PushNotificationFilterOperandEnum)

Purpose: Validates the incoming operand with any existing operand. The operand
cannot be changed once set.
Parameters:
poFilterParent Progress.Json.ObjectModel.JsonObject
pcFilterName CHARACTER
poOperand OpenEdge.Mobile.PushNotificationFilterOperandEnum
Returns LOGICAL
logical True if a filter already exists


Property Detail
Top

Progress.Json.ObjectModel.JsonObject Payload

Returns Progress.Json.ObjectModel.JsonObject


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15