Interface DataMappingToElementLocal
Interface for the DataMappingToElement Plug-In.
The DataMappingToElement PubServer Plug-In provides standard mapping
methods for all kind of Entity data to the Comet Element
type.
The main purpose is using these methods in a DataProvider configuration, but
calling via the DataMappingToElementLocal interface allows using these
methods in custom Java Plug-Ins as well.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionMapsBucketsto Elements.bucketsToElements(List<Bucket> inputList, String entityModelName, Context context) MapsBucketsto Elements.bucketsToElements(List<Bucket> inputList, String sessionId, String entityModelName, Context context) MapsBucketsto Elements.MapsCordsto Elements.MapsCordsto Elements.createElementFromBucket(Bucket bucket, EntityModel model, Bucket parent) Creates an Element from a singleBucket.createElementFromCord(Cord cord, EntityModel model, Bucket parent) Creates an Element from a singleCord.createElementFromKeyValue(KeyValue keyValue, EntityModel model, Bucket parent) Creates an Element from a singleKeyValue.createElementFromMediaAsset(MediaAsset asset, EntityModel model, Bucket parent) Creates an Element from a singleMediaAsset.createElementFromPlanning(Planning planning, Context context) Creates an Element from a singlePlanning.createElementFromPrice(Price price, EntityModel model, Bucket parent) Creates an Element from a singlePrice.createElementFromTableData(TableData data, EntityModel model, Bucket parent) Creates an Element from a singleTableData.createElementFromText(Text text, EntityModel model, Bucket parent) Creates an Element from a singleText.keyValuesToElements(List<KeyValue> inputList, Bucket parent, String entityModelName, Context context) MapsKeyValuessto Elements.keyValuesToElements(List<KeyValue> inputList, String sessionId, String entityModelName, Context context) MapsKeyValuesto Elements.mediaAssetsToElements(List<MediaAsset> inputList, Bucket parent, String entityModelName, Context context) MapsMediaAssetsto Elements.mediaAssetsToElements(List<MediaAsset> inputList, String sessionId, String entityModelName, Context context) MapsMediaAssetsto Elements.planningsToElements(List<Planning> inputList, Context context) MapsPlanningsto Elements.planningsToElementsGeneric(List<Planning> inputList, Context context, String idProperty, String id2Property, String id3Property, String stringIdProperty, String templateIdProperty, String classIdProperty, String formatStringProperty) MapsPlanningsto Elements.MapsPricesto Elements.MapsPricesto Elements.tableDataToElements(List<TableData> inputList, Bucket parent, String entityModelName, Context context) MapsTableDatato Elements.tableDataToElements(List<TableData> inputList, String sessionId, String entityModelName, Context context) MapsTableDatato Elements.MapsTextsto Elements.MapsTextsto Elements.
-
Field Details
-
JNDINAME
The constant JNDINAME.- See Also:
-
MAPPED_NAME
The constant MAPPED_NAME.- See Also:
-
-
Method Details
-
bucketsToElements
List<Element> bucketsToElements(List<Bucket> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
Bucketsto Elements.- Parameters:
inputList- a Bucket list e.g. from EntityManager.getRootEntityBucketssessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
cordsToElements
List<Element> cordsToElements(List<Cord> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
Cordsto Elements.- Parameters:
inputList- a Cord listsessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
keyValuesToElements
List<Element> keyValuesToElements(List<KeyValue> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
KeyValuesto Elements.- Parameters:
inputList- A KeyValue listsessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
mediaAssetsToElements
List<Element> mediaAssetsToElements(List<MediaAsset> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
MediaAssetsto Elements.- Parameters:
inputList- a MediaAsset listsessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
pricesToElements
List<Element> pricesToElements(List<Price> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
Pricesto Elements.- Parameters:
inputList- a Price listsessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
textsToElements
List<Element> textsToElements(List<Text> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
Textsto Elements.- Parameters:
inputList- a Text listsessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
tableDataToElements
List<Element> tableDataToElements(List<TableData> inputList, String sessionId, String entityModelName, Context context) throws CometException Maps
TableDatato Elements.- Parameters:
inputList- a TableData listsessionId- ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()entityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
createElementFromBucket
Element createElementFromBucket(Bucket bucket, EntityModel model, Bucket parent) throws CometException Creates an Element from a single
Bucket.- Parameters:
bucket- a Bucketmodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
createElementFromCord
Creates an Element from a single
Cord.- Parameters:
cord- a Cordmodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
createElementFromKeyValue
Element createElementFromKeyValue(KeyValue keyValue, EntityModel model, Bucket parent) throws CometException Creates an Element from a single
KeyValue.- Parameters:
keyValue- a KeyValuemodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
createElementFromMediaAsset
Element createElementFromMediaAsset(MediaAsset asset, EntityModel model, Bucket parent) throws CometException Creates an Element from a single
MediaAsset.- Parameters:
asset- the assetmodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
createElementFromPrice
Creates an Element from a single
Price.- Parameters:
price- a Pricemodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
createElementFromText
Creates an Element from a single
Text.- Parameters:
text- a Textmodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
createElementFromTableData
Element createElementFromTableData(TableData data, EntityModel model, Bucket parent) throws CometException Creates an Element from a single
TableData.- Parameters:
data- the datamodel- name of the entity modelparent- parent bucket, if applicable- Returns:
- an Element
- Throws:
CometException- the comet exception
-
bucketsToElements
List<Element> bucketsToElements(List<Bucket> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
Bucketsto Elements.- Parameters:
inputList- a Bucket list e.g. from EntityManager.getRootEntityBucketsparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
bucketsToElements
List<Element> bucketsToElements(List<Bucket> inputList, String entityModelName, Context context) throws CometException Maps
Bucketsto Elements.- Parameters:
inputList- a Bucket list e.g. from EntityManager.getRootEntityBucketsentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
cordsToElements
List<Element> cordsToElements(List<Cord> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
Cordsto Elements.- Parameters:
inputList- a Cord listparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
keyValuesToElements
List<Element> keyValuesToElements(List<KeyValue> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
KeyValuessto Elements.- Parameters:
inputList- a KeyValue listparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
mediaAssetsToElements
List<Element> mediaAssetsToElements(List<MediaAsset> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
MediaAssetsto Elements.- Parameters:
inputList- a MediaAsset listparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
pricesToElements
List<Element> pricesToElements(List<Price> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
Pricesto Elements.- Parameters:
inputList- a Price listparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
textsToElements
List<Element> textsToElements(List<Text> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
Textsto Elements.- Parameters:
inputList- a Text listparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
tableDataToElements
List<Element> tableDataToElements(List<TableData> inputList, Bucket parent, String entityModelName, Context context) throws CometException Maps
TableDatato Elements.- Parameters:
inputList- a TableData listparent- parent Bucket, if applicableentityModelName- name of the entity modelcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
planningsToElements
Maps
Planningsto Elements.- Parameters:
inputList- a Planning listcontext- request context (assortment, country, language etc.)- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-
createElementFromPlanning
Creates an Element from a single
Planning.- Parameters:
planning- a Planning recordcontext- request context (assortment, country, language etc.)- Returns:
- an Element
- Throws:
CometException- the comet exception
-
planningsToElementsGeneric
List<Element> planningsToElementsGeneric(List<Planning> inputList, Context context, String idProperty, String id2Property, String id3Property, String stringIdProperty, String templateIdProperty, String classIdProperty, String formatStringProperty) throws CometException Maps
Planningsto Elements.- Parameters:
inputList- a Planning listcontext- request context (assortment, country, language etc.)idProperty- name of planning property to map to the Id propertyid2Property- name of planning property to map to the Id2 propertyid3Property- name of planning property to map to the Id3 propertystringIdProperty- name of planning property to map to the stringId propertytemplateIdProperty- name of planning property to map to the templateId propertyclassIdProperty- name of planning property to map to the classId propertyformatStringProperty- name of planning property to map to the formatString property- Returns:
- list of Elements
- Throws:
CometException- the comet exception
-