Package ai.promoted.delivery.client
Class InsertionFactory
java.lang.Object
ai.promoted.delivery.client.InsertionFactory
Helper method to create Insertions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InsertioncreateInsertionWithProperties(String contentId, Map<String, Object> properties) Create an insertion with a content id and properties.static voidprepareResponseInsertion(Insertion ins, int position) Gets a response insertion ready to return, ensuring position and id are set.
-
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 idproperties- the properties as a map- Returns:
- a populated Insertion
-
prepareResponseInsertion
Gets a response insertion ready to return, ensuring position and id are set.- Parameters:
ins- the insertionposition- the position to set
-