use of org.broadleafcommerce.common.extension.ItemStatus in project BroadleafCommerce by BroadleafCommerce.
the class SparseTranslationOverrideStrategy method initializeOverride.
@Override
public StandardCacheItem initializeOverride(Object entity) {
String key = getCacheKey((Translation) entity);
String dto = ((Translation) entity).getTranslatedValue();
StandardCacheItem cacheItem = new StandardCacheItem();
ItemStatus status = ItemStatus.NORMAL;
if (extensionManager != null) {
ExtensionResultHolder<ItemStatus> response = new ExtensionResultHolder<ItemStatus>();
ExtensionResultStatusType result = extensionManager.buildStatus(entity, response);
if (ExtensionResultStatusType.NOT_HANDLED != result && response.getResult() != null) {
status = response.getResult();
}
}
cacheItem.setItemStatus(status);
cacheItem.setKey(key);
cacheItem.setCacheItem(dto);
return cacheItem;
}
Aggregations