Interface ProductDataMapping
-
- All Known Implementing Classes:
ProductDataMappingDefault
public interface ProductDataMappingInterface for ProductDataMapping Plugins.
Actually, custom product data mappings are just Plugin methods with method type
PRODUCT_DATA_MAPPING. In addition, ProductDataMappings must implement the ProductDataMapping interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProductcreateProductFromBucket(Bucket bucket, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a Bucket entityProductcreateProductFromCord(Cord cord, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a Cord entityProductcreateProductFromKeyValue(KeyValue keyValue, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a KeyValue entityProductcreateProductFromMediaAsset(MediaAsset asset, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a MediaAsset entityProductcreateProductFromPlanning(Planning planning, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a Planning entityProductcreateProductFromPrice(Price price, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a Price entityProductcreateProductFromTableData(TableData data, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a TableData entityProductcreateProductFromText(Text text, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder)Creates a Product from a Text entity<T extends EntityData>
java.util.List<Product>entitiesToProducts(java.util.List<T> entities, EntityData parent, EntityModel model, Context context, CometIdBuilder idBuilder)Creates a list of Products from a list or arbitrary EnttyData objects.
-
-
-
Method Detail
-
entitiesToProducts
<T extends EntityData> java.util.List<Product> entitiesToProducts(java.util.List<T> entities, EntityData parent, EntityModel model, Context context, CometIdBuilder idBuilder) throws CometException
Creates a list of Products from a list or arbitrary EnttyData objects.
This is the method usually called by product data providers to map entities retrieved from the EntityModelManager to Comet3 products.
Developers usually wont implement this method, but inherit from
ProductDataMappingDefaultinstead and implement the methods to map create... methods to map a single instance of a specific type to Product.- Type Parameters:
T- the type parameter- Parameters:
entities- the list of entities to mapparent- parent entity (Bucket or Planning instance) or nullmodel- entity modelcontext- request contextidBuilder- the ID builder to use- Returns:
- list of Products
- Throws:
CometException- the comet exception
-
createProductFromBucket
Product createProductFromBucket(Bucket bucket, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a Bucket entity
- Parameters:
bucket- the source Bucketmodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromCord
Product createProductFromCord(Cord cord, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a Cord entity
- Parameters:
cord- the source Cordmodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromKeyValue
Product createProductFromKeyValue(KeyValue keyValue, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a KeyValue entity
- Parameters:
keyValue- the source KeyValuemodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromMediaAsset
Product createProductFromMediaAsset(MediaAsset asset, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a MediaAsset entity
- Parameters:
asset- the source MediaAssetmodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromPrice
Product createProductFromPrice(Price price, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a Price entity
- Parameters:
price- the source Pricemodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromText
Product createProductFromText(Text text, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a Text entity
- Parameters:
text- the source Textmodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromTableData
Product createProductFromTableData(TableData data, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a TableData entity
- Parameters:
data- the source TableDatamodel- the entity modelparent- parent entity (Bucket or Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
createProductFromPlanning
Product createProductFromPlanning(Planning planning, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException
Creates a Product from a Planning entity
- Parameters:
planning- the source Planningmodel- the entity modelparent- parent entity (Planning instance) or nullcontext- request contextidBuilder- the ID builder to use- Returns:
- a Product
- Throws:
CometException- the comet exception
-
-