Class ProductDataMappingUtils


  • public class ProductDataMappingUtils
    extends java.lang.Object
    The type Product data mapping utils.
    • Method Detail

      • getProductDataMapping

        public static ProductDataMapping getProductDataMapping()
                                                        throws CometException

        Gets the product data mapping implementation configured for the actual CometProject.

        Returns:
        ProductDataMapping implementation
        Throws:
        CometException - the comet exception
      • getEntityManager

        public static EntityManagerLocal getEntityManager()

        Gets the EntityManager.

        This is a shortcut for

         PluginUtils.getPlugin(Constants.MANAGER_ENTITY, PluginControlDefault.getSessionId(), EntityManagerLocal.class);
         

        Returns:
        EntityManager bean
      • getEntityModel

        public static EntityModel getEntityModel​(java.lang.String entityModelName)
                                          throws CometException

        Gets a particular EntityModel.

        Parameters:
        entityModelName - identifier of the EntityModel
        Returns:
        EntityModel referred by the provided identifier
        Throws:
        CometException - thrown, if the EntityModel cannot be found, e.g. illegal identifier
      • getEntityResultFilter

        public static EntityResultFilter getEntityResultFilter()
                                                        throws CometException

        Gets the EntityResultFilter configured for this project.

        See the EntityResultFilter documentation for details

        Returns:
        EntityResultFilter object configured for this Comet project
        Throws:
        CometException - the comet exception
      • getProductPanelConfig

        public static CometProductPanelConfig getProductPanelConfig()
                                                             throws CometException

        Gets the product panel configuration for the current Comet project.

        Returns:
        CometProductPanelConfig object
        Throws:
        CometException - the comet exception
      • canHaveChildren

        public static boolean canHaveChildren​(EntityModel model,
                                              java.lang.String entityId)
        Can have children boolean.
        Parameters:
        model - the model
        entityId - the entity id
        Returns:
        the boolean
      • refersToOldIcon

        public static final boolean refersToOldIcon​(java.lang.String path)
      • getNewIconPath

        public static final java.lang.String getNewIconPath​(java.lang.String path)
      • getIconUrl

        public static java.lang.String getIconUrl​(Entity entity)
        Gets icon url.
        Parameters:
        entity - the entity
        Returns:
        the icon url
      • getIconUrlForSnippet

        public static java.lang.String getIconUrlForSnippet​(Entity ignoredEntity)
        Gets icon url for snippet.
        Parameters:
        ignoredEntity - the entity
        Returns:
        the icon url for snippet
      • getBucketById

        public static Bucket getBucketById​(java.lang.String entityModelName,
                                           java.lang.String parentEntityId,
                                           java.lang.String parentBucketId,
                                           Context context)
                                    throws CometException
        Gets bucket by id.
        Parameters:
        entityModelName - the entity model name
        parentEntityId - the parent entity id
        parentBucketId - the parent bucket id
        context - the context
        Returns:
        the bucket by id
        Throws:
        CometException - the comet exception
      • getCometBridge

        public static CometBridgeLocal getCometBridge()
        Gets comet bridge.
        Returns:
        the comet bridge