Package ai.promoted.delivery.client
Class InsertionFactory
- java.lang.Object
-
- ai.promoted.delivery.client.InsertionFactory
-
public class InsertionFactory extends Object
Helper method to create Insertions.
-
-
Constructor Summary
Constructors Constructor Description InsertionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Insertion.BuildercreateInsertionBuilderWithProperties(String contentId, Map<String,Object> properties)Create an insertion builder with a content id and properties.static voidprepareResponseInsertionBuilder(Insertion.Builder insBuilder, int position)Gets a response insertion builder ready to return, ensuring position and id are set.
-
-
-
Method Detail
-
createInsertionBuilderWithProperties
public static Insertion.Builder createInsertionBuilderWithProperties(String contentId, Map<String,Object> properties)
Create an insertion builder with a content id and properties.- Parameters:
contentId- the content idproperties- the properties as a map- Returns:
- a populated Insertion
-
prepareResponseInsertionBuilder
public static void prepareResponseInsertionBuilder(Insertion.Builder insBuilder, int position)
Gets a response insertion builder ready to return, ensuring position and id are set.- Parameters:
ins- the insertionposition- the position to set
-
-