Class InsertionFactory

java.lang.Object
ai.promoted.delivery.client.InsertionFactory

public class InsertionFactory extends Object
Helper method to create Insertions.
  • Constructor Details

    • InsertionFactory

      public InsertionFactory()
  • Method Details

    • createInsertionWithProperties

      public static Insertion createInsertionWithProperties(String contentId, Map<String,Object> properties)
      Create an insertion with a content id and properties.
      Parameters:
      contentId - the content id
      properties - the properties as a map
      Returns:
      a populated Insertion
    • prepareResponseInsertion

      public static void prepareResponseInsertion(Insertion ins, int position)
      Gets a response insertion ready to return, ensuring position and id are set.
      Parameters:
      ins - the insertion
      position - the position to set