Interface DataMappingToElementLocal


public 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 Details

  • Method Details

    • bucketsToElements

      List<Element> bucketsToElements(List<Bucket> inputList, String sessionId, String entityModelName, Context context) throws CometException

      Maps Buckets to Elements.

      Parameters:
      inputList - a Bucket list e.g. from EntityManager.getRootEntityBuckets
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 Cords to Elements.

      Parameters:
      inputList - a Cord list
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 KeyValues to Elements.

      Parameters:
      inputList - A KeyValue list
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 MediaAssets to Elements.

      Parameters:
      inputList - a MediaAsset list
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 Prices to Elements.

      Parameters:
      inputList - a Price list
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 Texts to Elements.

      Parameters:
      inputList - a Text list
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 TableData to Elements.

      Parameters:
      inputList - a TableData list
      sessionId - ID of the current session, if called from a PubServer Plug-In usually PluginControlDefault.getSessionId()
      entityModelName - name of the entity model
      context - 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 Bucket
      model - name of the entity model
      parent - parent bucket, if applicable
      Returns:
      an Element
      Throws:
      CometException - the comet exception
    • createElementFromCord

      Element createElementFromCord(Cord cord, EntityModel model, Bucket parent) throws CometException

      Creates an Element from a single Cord.

      Parameters:
      cord - a Cord
      model - name of the entity model
      parent - 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 KeyValue
      model - name of the entity model
      parent - 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 asset
      model - name of the entity model
      parent - parent bucket, if applicable
      Returns:
      an Element
      Throws:
      CometException - the comet exception
    • createElementFromPrice

      Element createElementFromPrice(Price price, EntityModel model, Bucket parent) throws CometException

      Creates an Element from a single Price.

      Parameters:
      price - a Price
      model - name of the entity model
      parent - parent bucket, if applicable
      Returns:
      an Element
      Throws:
      CometException - the comet exception
    • createElementFromText

      Element createElementFromText(Text text, EntityModel model, Bucket parent) throws CometException

      Creates an Element from a single Text.

      Parameters:
      text - a Text
      model - name of the entity model
      parent - 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 data
      model - name of the entity model
      parent - 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 Buckets to Elements.

      Parameters:
      inputList - a Bucket list e.g. from EntityManager.getRootEntityBuckets
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - 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 Buckets to Elements.

      Parameters:
      inputList - a Bucket list e.g. from EntityManager.getRootEntityBuckets
      entityModelName - name of the entity model
      context - 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 Cords to Elements.

      Parameters:
      inputList - a Cord list
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - 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 KeyValuess to Elements.

      Parameters:
      inputList - a KeyValue list
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - 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 MediaAssets to Elements.

      Parameters:
      inputList - a MediaAsset list
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - 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 Prices to Elements.

      Parameters:
      inputList - a Price list
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - 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 Texts to Elements.

      Parameters:
      inputList - a Text list
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - 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 TableData to Elements.

      Parameters:
      inputList - a TableData list
      parent - parent Bucket, if applicable
      entityModelName - name of the entity model
      context - request context (assortment, country, language etc.)
      Returns:
      list of Elements
      Throws:
      CometException - the comet exception
    • planningsToElements

      List<Element> planningsToElements(List<Planning> inputList, Context context) throws CometException

      Maps Plannings to Elements.

      Parameters:
      inputList - a Planning list
      context - request context (assortment, country, language etc.)
      Returns:
      list of Elements
      Throws:
      CometException - the comet exception
    • createElementFromPlanning

      Element createElementFromPlanning(Planning planning, Context context) throws CometException

      Creates an Element from a single Planning.

      Parameters:
      planning - a Planning record
      context - 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 Plannings to Elements.

      Parameters:
      inputList - a Planning list
      context - request context (assortment, country, language etc.)
      idProperty - name of planning property to map to the Id property
      id2Property - name of planning property to map to the Id2 property
      id3Property - name of planning property to map to the Id3 property
      stringIdProperty - name of planning property to map to the stringId property
      templateIdProperty - name of planning property to map to the templateId property
      classIdProperty - name of planning property to map to the classId property
      formatStringProperty - name of planning property to map to the formatString property
      Returns:
      list of Elements
      Throws:
      CometException - the comet exception