Subversion Repositories SmartDukaan

Rev

Rev 16570 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16570 Rev 16640
Line 47... Line 47...
47
	public static final long MOBILE_ACCESSORIES_CATEGORY = 10011;
47
	public static final long MOBILE_ACCESSORIES_CATEGORY = 10011;
48
	public static final long TABLETS_CATEGORY = 10010;
48
	public static final long TABLETS_CATEGORY = 10010;
49
    public static final long LAPTOPS_CATEGORY = 10050;
49
    public static final long LAPTOPS_CATEGORY = 10050;
50
    public static final long CAMERAS_CATEGORY = 11001;
50
    public static final long CAMERAS_CATEGORY = 11001;
51
    private static final String DTR_ENTITY_URL = "http://dtr:8057/ordered-offers/4/%d";
51
    private static final String DTR_ENTITY_URL = "http://dtr:8057/ordered-offers/4/%d";
52
    
52
    private static String DB_HOSTNAME = null;
53
    @SuppressWarnings("serial")
53
    @SuppressWarnings("serial")
54
	public static final Map<String, String> NET_BANKING_CODES_MAP = Collections.unmodifiableMap(
54
	public static final Map<String, String> NET_BANKING_CODES_MAP = Collections.unmodifiableMap(
55
    		new HashMap<String, String>(){
55
    		new HashMap<String, String>(){
56
	    		{
56
	    		{
57
	    			put("1004","AXIB");
57
	    			put("1004","AXIB");
Line 228... Line 228...
228
			exportPath = "/var/lib/tomcat6/webapps/export/html/entities/";
228
			exportPath = "/var/lib/tomcat6/webapps/export/html/entities/";
229
		}
229
		}
230
		return exportPath;
230
		return exportPath;
231
	}
231
	}
232
	
232
	
-
 
233
	
-
 
234
	public static String getMysqlHost(){
-
 
235
		if (DB_HOSTNAME != null)
-
 
236
			return DB_HOSTNAME;
-
 
237
		ConfigClient client = ConfigClient.getClient();
-
 
238
		try{
-
 
239
			DB_HOSTNAME = client.get("user_service_db_hostname");
-
 
240
		}catch(Exception ce){
-
 
241
			logger.error("Unable to read export path from the config client: ", ce);
-
 
242
			logger.warn("Setting the default export path");
-
 
243
			DB_HOSTNAME = "localhost";
-
 
244
		}
-
 
245
		return DB_HOSTNAME;
-
 
246
	}
-
 
247
	
233
	public static boolean validatePin(String pincode) {
248
	public static boolean validatePin(String pincode) {
234
		int pin;
249
		int pin;
235
		try {
250
		try {
236
			pin = Integer.parseInt(pincode);
251
			pin = Integer.parseInt(pincode);
237
		}
252
		}