Package 

Class TriggerAdapter


  • 
    public final class TriggerAdapter
    
                        

    Class responsible for adapting trigger conditions from a JSON object.

    • Constructor Detail

      • TriggerAdapter

        TriggerAdapter(JSONObject triggerJSON)
        Parameters:
        triggerJSON - The JSON object containing trigger conditions.
    • Method Detail

      • getEventName

         final String getEventName()

        The name of the event associated with the trigger conditions.

      • getItems

         final JSONArray getItems()

        The JSONArray containing item property trigger conditions.Used for Charged event.

      • getGeoRadiusArray

         final JSONArray getGeoRadiusArray()

        The JSONArray containing Geographic radius trigger conditions. Used for location-based trigger conditions within a specified geographical radius.

      • getProfileAttrName

         final String getProfileAttrName()

        The string associated with the attribute name for changes in the user-profile Used for user attribute changes trigger conditions

      • triggerConditionFromJSON

         final TriggerCondition triggerConditionFromJSON(JSONObject property)

        Internal function to create a TriggerCondition from a JSON property object.

        Parameters:
        property - The JSON object representing a trigger condition property.
      • propertyAtIndex

         final TriggerCondition propertyAtIndex(Integer index)

        Retrieve a TriggerCondition at the specified index from event properties.

        Parameters:
        index - The index of the TriggerCondition to retrieve.
      • itemAtIndex

         final TriggerCondition itemAtIndex(Integer index)

        Retrieve a TriggerCondition at the specified index from item properties.

        Parameters:
        index - The index of the TriggerCondition to retrieve.
      • geoRadiusAtIndex

         final TriggerGeoRadius geoRadiusAtIndex(Integer index)

        Retrieves a TriggerGeoRadius instance at the specified index from the geoRadiusArray.

        The function checks if the provided index is valid and, if so, extracts the latitude, longitude, and radius information from the corresponding JSON object within the geoRadiusArray. It then creates and returns a TriggerGeoRadius instance based on the extracted data.

        Parameters:
        index - The index indicating the position of the desired TriggerGeoRadius in the geoRadiusArray.