Subversion Repositories SmartDukaan

Rev

Rev 2095 | Rev 3480 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2095 Rev 3127
Line 1... Line 1...
1
package in.shop2020.creation.controllers;
1
package in.shop2020.creation.controllers;
2
 
2
 
3
import java.util.ArrayList;
3
import java.util.ArrayList;
4
import java.util.Calendar;
4
import java.util.Calendar;
5
import java.util.Date;
-
 
6
import java.util.List;
5
import java.util.List;
7
 
6
 
8
import in.shop2020.content.security.UserManager;
7
import in.shop2020.content.security.UserManager;
9
import in.shop2020.creation.util.ContentValidator;
8
import in.shop2020.creation.util.ContentValidator;
10
import in.shop2020.metamodel.core.Entity;
9
import in.shop2020.metamodel.core.Entity;
11
import in.shop2020.metamodel.core.EntityState;
10
import in.shop2020.metamodel.core.EntityState;
12
import in.shop2020.metamodel.core.EntityStatus;
11
import in.shop2020.metamodel.core.EntityStatus;
13
import in.shop2020.metamodel.util.CreationUtils;
12
import in.shop2020.metamodel.util.CreationUtils;
14
import in.shop2020.thrift.clients.CatalogServiceClient;
13
import in.shop2020.thrift.clients.CatalogClient;
15
 
14
 
16
import org.apache.struts2.convention.annotation.InterceptorRef;
15
import org.apache.struts2.convention.annotation.InterceptorRef;
17
import org.apache.struts2.convention.annotation.InterceptorRefs;
16
import org.apache.struts2.convention.annotation.InterceptorRefs;
18
import org.apache.struts2.convention.annotation.Result;
17
import org.apache.struts2.convention.annotation.Result;
19
import org.apache.struts2.convention.annotation.Results;
18
import org.apache.struts2.convention.annotation.Results;
Line 100... Line 99...
100
					return "success";	
99
					return "success";	
101
				}
100
				}
102
				try {
101
				try {
103
				    EntityState state = CreationUtils.getEntityState(entityId);
102
				    EntityState state = CreationUtils.getEntityState(entityId);
104
				    
103
				    
105
					CatalogServiceClient csc = new CatalogServiceClient();
104
					CatalogClient csc = new CatalogClient();
106
					in.shop2020.model.v1.catalog.InventoryService.Client iclient = csc.getClient();
105
					in.shop2020.model.v1.catalog.InventoryService.Client iclient = csc.getClient();
107
					iclient.markItemAsContentComplete(entityId, state.getCategoryID(), state.getBrand(), state.getModelName(), state.getModelNumber());	
106
					iclient.markItemAsContentComplete(entityId, state.getCategoryID(), state.getBrand(), state.getModelName(), state.getModelNumber());	
108
					
107
					
109
                    List<Long> inconsistentEntities = CreationUtils.getInconsistentEntities();
108
                    List<Long> inconsistentEntities = CreationUtils.getInconsistentEntities();
110
                    if(inconsistentEntities != null){
109
                    if(inconsistentEntities != null){