Class ProductDataMappingUtils

java.lang.Object
com.priint.pubserver.comet.bridge.datamapping.ProductDataMappingUtils

public class ProductDataMappingUtils extends Object
The type Product data mapping utils.
  • Method Details

    • 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(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, String entityId)
      Can have children boolean.
      Parameters:
      model - the model
      entityId - the entity id
      Returns:
      the boolean
    • refersToOldIcon

      public static final boolean refersToOldIcon(String path)
    • getNewIconPath

      public static final String getNewIconPath(String path)
    • getIconUrl

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

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

      public static Bucket getBucketById(String entityModelName, String parentEntityId, 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