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 Detail

      • JNDINAME

        static final java.lang.String JNDINAME
        The constant JNDINAME.
        See Also:
        Constant Field Values
      • MAPPED_NAME

        static final java.lang.String MAPPED_NAME
        The constant MAPPED_NAME.
        See Also:
        Constant Field Values
    • Method Detail

      • bucketsToElements

        java.util.List<Element> bucketsToElements​(java.util.List<Bucket> inputList,
                                                  java.lang.String sessionId,
                                                  java.lang.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

        java.util.List<Element> cordsToElements​(java.util.List<Cord> inputList,
                                                java.lang.String sessionId,
                                                java.lang.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

        java.util.List<Element> keyValuesToElements​(java.util.List<KeyValue> inputList,
                                                    java.lang.String sessionId,
                                                    java.lang.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

        java.util.List<Element> mediaAssetsToElements​(java.util.List<MediaAsset> inputList,
                                                      java.lang.String sessionId,
                                                      java.lang.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

        java.util.List<Element> pricesToElements​(java.util.List<Price> inputList,
                                                 java.lang.String sessionId,
                                                 java.lang.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

        java.util.List<Element> textsToElements​(java.util.List<Text> inputList,
                                                java.lang.String sessionId,
                                                java.lang.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

        java.util.List<Element> tableDataToElements​(java.util.List<TableData> inputList,
                                                    java.lang.String sessionId,
                                                    java.lang.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
      • 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

        java.util.List<Element> bucketsToElements​(java.util.List<Bucket> inputList,
                                                  Bucket parent,
                                                  java.lang.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

        java.util.List<Element> bucketsToElements​(java.util.List<Bucket> inputList,
                                                  java.lang.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

        java.util.List<Element> cordsToElements​(java.util.List<Cord> inputList,
                                                Bucket parent,
                                                java.lang.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

        java.util.List<Element> keyValuesToElements​(java.util.List<KeyValue> inputList,
                                                    Bucket parent,
                                                    java.lang.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

        java.util.List<Element> mediaAssetsToElements​(java.util.List<MediaAsset> inputList,
                                                      Bucket parent,
                                                      java.lang.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

        java.util.List<Element> pricesToElements​(java.util.List<Price> inputList,
                                                 Bucket parent,
                                                 java.lang.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

        java.util.List<Element> textsToElements​(java.util.List<Text> inputList,
                                                Bucket parent,
                                                java.lang.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

        java.util.List<Element> tableDataToElements​(java.util.List<TableData> inputList,
                                                    Bucket parent,
                                                    java.lang.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

        java.util.List<Element> planningsToElements​(java.util.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

        java.util.List<Element> planningsToElementsGeneric​(java.util.List<Planning> inputList,
                                                           Context context,
                                                           java.lang.String idProperty,
                                                           java.lang.String id2Property,
                                                           java.lang.String id3Property,
                                                           java.lang.String stringIdProperty,
                                                           java.lang.String templateIdProperty,
                                                           java.lang.String classIdProperty,
                                                           java.lang.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