Subversion Repositories SmartDukaan

Rev

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

Rev 23152 Rev 23296
Line 8... Line 8...
8
import java.util.ArrayList;
8
import java.util.ArrayList;
9
import java.util.Collections;
9
import java.util.Collections;
10
import java.util.HashMap;
10
import java.util.HashMap;
11
import java.util.List;
11
import java.util.List;
12
import java.util.Map;
12
import java.util.Map;
-
 
13
import java.util.Set;
-
 
14
import java.util.TreeSet;
13
 
15
 
14
import org.apache.commons.io.FileUtils;
16
import org.apache.commons.io.FileUtils;
15
import org.apache.commons.io.IOUtils;
17
import org.apache.commons.io.IOUtils;
16
import org.apache.http.client.utils.URIBuilder;
18
import org.apache.http.client.utils.URIBuilder;
17
import org.apache.thrift.TException;
19
import org.apache.thrift.TException;
Line 380... Line 382...
380
			e.printStackTrace();
382
			e.printStackTrace();
381
			throw e;
383
			throw e;
382
		}
384
		}
383
	}
385
	}
384
	
386
	
-
 
387
	public static List<String> getAllStateNames(){
-
 
388
		List<String> sortedStateNames = new ArrayList<>();
-
 
389
		try{
-
 
390
			InventoryClient client = new InventoryClient();
-
 
391
			InventoryService.Client inventoryClient = client.getClient();
-
 
392
			Map<Long, StateInfo> map = inventoryClient.getStateMaster();
-
 
393
			List<StateInfo> stateInfos = new ArrayList<>(map.values());
-
 
394
			Set<String> stateNames = new TreeSet<>();
-
 
395
 
-
 
396
			for(StateInfo stateInfo : stateInfos){
-
 
397
				stateNames.add(stateInfo.getStateName());
-
 
398
			}
-
 
399
			sortedStateNames = new ArrayList<>(stateNames);
-
 
400
			return sortedStateNames;
-
 
401
		}catch (Exception e) {
-
 
402
			e.printStackTrace();
-
 
403
			return sortedStateNames;
-
 
404
		}
-
 
405
	}
-
 
406
	
385
	public static User createSaholicUser(String emailId) throws ProfitMandiBusinessException{
407
	public static User createSaholicUser(String emailId) throws ProfitMandiBusinessException{
386
		in.shop2020.model.v1.user.User user = new in.shop2020.model.v1.user.User();
408
		in.shop2020.model.v1.user.User user = new in.shop2020.model.v1.user.User();
387
		user.setEmail(emailId);
409
		user.setEmail(emailId);
388
		user.setPassword("");
410
		user.setPassword("");
389
		user.setCommunicationEmail(emailId);
411
		user.setCommunicationEmail(emailId);