Class ProductDataMappingUtils
- java.lang.Object
-
- com.priint.pubserver.comet.bridge.datamapping.ProductDataMappingUtils
-
public class ProductDataMappingUtils extends java.lang.ObjectThe type Product data mapping utils.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancanHaveChildren(EntityModel model, java.lang.String entityId)Can have children boolean.static BucketgetBucketById(java.lang.String entityModelName, java.lang.String parentEntityId, java.lang.String parentBucketId, Context context)Gets bucket by id.static CometBridgeLocalgetCometBridge()Gets comet bridge.static EntityManagerLocalgetEntityManager()Gets the EntityManager.static EntityModelgetEntityModel(java.lang.String entityModelName)Gets a particular EntityModel.static EntityResultFiltergetEntityResultFilter()Gets the EntityResultFilter configured for this project.static java.lang.StringgetIconUrl(Entity entity)Gets icon url.static java.lang.StringgetIconUrlForSnippet(Entity ignoredEntity)Gets icon url for snippet.static java.lang.StringgetNewIconPath(java.lang.String path)static ProductDataMappinggetProductDataMapping()Gets the product data mapping implementation configured for the actual CometProject.static CometProductPanelConfiggetProductPanelConfig()Gets the product panel configuration for the current Comet project.static booleanrefersToOldIcon(java.lang.String path)
-
-
-
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
EntityResultFilterdocumentation 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 modelentityId- 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 nameparentEntityId- the parent entity idparentBucketId- the parent bucket idcontext- the context- Returns:
- the bucket by id
- Throws:
CometException- the comet exception
-
getCometBridge
public static CometBridgeLocal getCometBridge()
Gets comet bridge.- Returns:
- the comet bridge
-
-