Class ProductDataMappingDefault
java.lang.Object
com.priint.pubserver.plugin.PluginControlDefault
com.priint.pubserver.comet.bridge.datamapping.ProductDataMappingDefault
- All Implemented Interfaces:
ProductDataMapping,PluginControl
public abstract class ProductDataMappingDefault
extends PluginControlDefault
implements ProductDataMapping
The type Product data mapping default.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe type Page item hash.static classThe type Page template hash. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProductFromBucket(Bucket bucket, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a Bucket entitycreateProductFromCord(Cord cord, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a Cord entitycreateProductFromCord(Cord cord, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder, CometProductPanelConfig.CordDisplay cordDisplayType) Create product from cord product.createProductFromKeyValue(KeyValue keyValue, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a KeyValue entitycreateProductFromMediaAsset(MediaAsset asset, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a MediaAsset entityprotected ProductcreateProductFromPlanning(Planning planning, EntityModel model, Context context, CometIdBuilder idBuilder, ProductDataMappingDefault.PageItemHash cache) Create product from planning product.protected ProductcreateProductFromPlanning(Planning planning, EntityModel model, Context context, CometIdBuilder idBuilder, ProductDataMappingDefault.PageItemHash cache, ProductDataMappingDefault.PageTemplateHash pageTemplateCache) Create product from planning product.createProductFromPlanning(Planning planning, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a Planning entitycreateProductFromPrice(Price price, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a Price entitycreateProductFromTableData(TableData data, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a TableData entitycreateProductFromText(Text text, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) Creates a Product from a Text entity<T extends EntityData>
List<Product>entitiesToProducts(List<T> entities, EntityData parent, EntityModel model, Context context, CometIdBuilder idBuilder) Creates a list of Products from a list or arbitrary EnttyData objects.Methods inherited from class com.priint.pubserver.plugin.PluginControlDefault
afterCreateConfigurations, afterDeleteConfigurations, afterUpdateConfigurations, createConfiguration, deleteConfigurations, getSession, getSessionId, initInstance, loadServerConfig, ping, readSessionAttribute, updateConfigurations, writeSessionAttributeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.priint.pubserver.plugin.interfaces.PluginControl
validateConfigurations
-
Constructor Details
-
ProductDataMappingDefault
public ProductDataMappingDefault()
-
-
Method Details
-
entitiesToProducts
public <T extends EntityData> List<Product> entitiesToProducts(List<T> entities, EntityData parent, EntityModel model, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates 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.- Specified by:
entitiesToProductsin interfaceProductDataMapping- 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
public Product createProductFromBucket(Bucket bucket, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a Bucket entity
- Specified by:
createProductFromBucketin interfaceProductDataMapping- 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
public Product createProductFromCord(Cord cord, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a Cord entity
- Specified by:
createProductFromCordin interfaceProductDataMapping- 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
-
createProductFromCord
public Product createProductFromCord(Cord cord, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder, CometProductPanelConfig.CordDisplay cordDisplayType) throws CometException Create product from cord product.- Parameters:
cord- the cordmodel- the modelparent- the parentcontext- the contextidBuilder- the id buildercordDisplayType- the cord display type- Returns:
- the product
- Throws:
CometException- the comet exception
-
createProductFromKeyValue
public Product createProductFromKeyValue(KeyValue keyValue, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a KeyValue entity
- Specified by:
createProductFromKeyValuein interfaceProductDataMapping- 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
public Product createProductFromMediaAsset(MediaAsset asset, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a MediaAsset entity
- Specified by:
createProductFromMediaAssetin interfaceProductDataMapping- 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
public Product createProductFromPrice(Price price, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a Price entity
- Specified by:
createProductFromPricein interfaceProductDataMapping- 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
public Product createProductFromText(Text text, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a Text entity
- Specified by:
createProductFromTextin interfaceProductDataMapping- 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
public Product createProductFromTableData(TableData data, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a TableData entity
- Specified by:
createProductFromTableDatain interfaceProductDataMapping- 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
public Product createProductFromPlanning(Planning planning, EntityModel model, EntityData parent, Context context, CometIdBuilder idBuilder) throws CometException Description copied from interface:ProductDataMappingCreates a Product from a Planning entity
- Specified by:
createProductFromPlanningin interfaceProductDataMapping- 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
-
createProductFromPlanning
protected Product createProductFromPlanning(Planning planning, EntityModel model, Context context, CometIdBuilder idBuilder, ProductDataMappingDefault.PageItemHash cache) throws CometException Create product from planning product.- Parameters:
planning- the planningmodel- the modelcontext- the contextidBuilder- the id buildercache- the cache- Returns:
- the product
- Throws:
CometException- the comet exception
-
createProductFromPlanning
protected Product createProductFromPlanning(Planning planning, EntityModel model, Context context, CometIdBuilder idBuilder, ProductDataMappingDefault.PageItemHash cache, ProductDataMappingDefault.PageTemplateHash pageTemplateCache) throws CometException Create product from planning product.- Parameters:
planning- the planningmodel- the modelcontext- the contextidBuilder- the id buildercache- the cachepageTemplateCache- the page template cache- Returns:
- the product
- Throws:
CometException- the comet exception
-