| Line 27... |
Line 27... |
| 27 |
import in.shop2020.metamodel.util.ExpandedEntity;
|
27 |
import in.shop2020.metamodel.util.ExpandedEntity;
|
| 28 |
import in.shop2020.metamodel.util.ExpandedFeature;
|
28 |
import in.shop2020.metamodel.util.ExpandedFeature;
|
| 29 |
import in.shop2020.metamodel.util.ExpandedFeatureDefinition;
|
29 |
import in.shop2020.metamodel.util.ExpandedFeatureDefinition;
|
| 30 |
import in.shop2020.metamodel.util.ExpandedSlide;
|
30 |
import in.shop2020.metamodel.util.ExpandedSlide;
|
| 31 |
import in.shop2020.metamodel.util.ExpandedSlideDefinition;
|
31 |
import in.shop2020.metamodel.util.ExpandedSlideDefinition;
|
| - |
|
32 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
| 32 |
import in.shop2020.model.v1.catalog.InventoryServiceException;
|
33 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
| 33 |
import in.shop2020.model.v1.catalog.Item;
|
34 |
import in.shop2020.model.v1.catalog.Item;
|
| 34 |
import in.shop2020.model.v1.catalog.status;
|
35 |
import in.shop2020.model.v1.catalog.status;
|
| 35 |
import in.shop2020.thrift.clients.CatalogClient;
|
36 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 36 |
import in.shop2020.util.Utils;
|
37 |
import in.shop2020.util.Utils;
|
| 37 |
|
38 |
|
| Line 1117... |
Line 1118... |
| 1117 |
* @return A List of entities fetched from the catalog.
|
1118 |
* @return A List of entities fetched from the catalog.
|
| 1118 |
*/
|
1119 |
*/
|
| 1119 |
private void createEntitiesForItemsInProcess(){
|
1120 |
private void createEntitiesForItemsInProcess(){
|
| 1120 |
try {
|
1121 |
try {
|
| 1121 |
CatalogClient csc = new CatalogClient();
|
1122 |
CatalogClient csc = new CatalogClient();
|
| 1122 |
in.shop2020.model.v1.catalog.InventoryService.Client iclient = csc.getClient();
|
1123 |
in.shop2020.model.v1.catalog.CatalogService.Client iclient = csc.getClient();
|
| 1123 |
List<Item> items = iclient.getAllItemsByStatus(status.IN_PROCESS);
|
1124 |
List<Item> items = iclient.getAllItemsByStatus(status.IN_PROCESS);
|
| 1124 |
for(Item item: items){
|
1125 |
for(Item item: items){
|
| 1125 |
long entityID = item.getCatalogItemId();
|
1126 |
long entityID = item.getCatalogItemId();
|
| 1126 |
if(!this.entitiesState.containsKey(entityID)){
|
1127 |
if(!this.entitiesState.containsKey(entityID)){
|
| 1127 |
log.info("#### Going to add the entity with id: ####" + entityID);
|
1128 |
log.info("#### Going to add the entity with id: ####" + entityID);
|
| Line 1531... |
Line 1532... |
| 1531 |
|
1532 |
|
| 1532 |
public String getCatalogDetails() {
|
1533 |
public String getCatalogDetails() {
|
| 1533 |
try {
|
1534 |
try {
|
| 1534 |
CatalogClient catalogServiceClient = new CatalogClient();
|
1535 |
CatalogClient catalogServiceClient = new CatalogClient();
|
| 1535 |
items = catalogServiceClient.getClient().getItemsByCatalogId(entityId);
|
1536 |
items = catalogServiceClient.getClient().getItemsByCatalogId(entityId);
|
| 1536 |
} catch (InventoryServiceException e) {
|
1537 |
} catch (CatalogServiceException e) {
|
| 1537 |
log.error("Could not fetch item for entity id: " + entityId, e);
|
1538 |
log.error("Could not fetch item for entity id: " + entityId, e);
|
| 1538 |
} catch (TException e) {
|
1539 |
} catch (TException e) {
|
| 1539 |
log.error("Could not fetch item for enitty id: " + entityId, e);
|
1540 |
log.error("Could not fetch item for enitty id: " + entityId, e);
|
| 1540 |
}
|
1541 |
}
|
| 1541 |
|
1542 |
|