Subversion Repositories SmartDukaan

Rev

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

Rev 20087 Rev 20152
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.util;
4
package in.shop2020.util;
5
 
5
 
-
 
6
import in.shop2020.crm.TicketCategory;
6
import in.shop2020.model.v1.order.OrderStatus;
7
import in.shop2020.model.v1.order.OrderStatus;
7
 
8
 
-
 
9
import java.util.ArrayList;
8
import java.util.Arrays;
10
import java.util.Arrays;
9
import java.util.Collections;
11
import java.util.Collections;
10
import java.util.HashMap;
12
import java.util.HashMap;
11
import java.util.List;
13
import java.util.List;
12
import java.util.Map;
14
import java.util.Map;
Line 24... Line 26...
24
    public static final String PROFIT_MANDI_EMAIL_TYPE   = "ProfitMandiInfo";
26
    public static final String PROFIT_MANDI_EMAIL_TYPE   = "ProfitMandiInfo";
25
    public static final String CRM_SUBJECT_PREFIX_FOR_TICKET_ID = "Saholic#";
27
    public static final String CRM_SUBJECT_PREFIX_FOR_TICKET_ID = "Saholic#";
26
    public static final String PROFIT_MANDI_SUBJECT_PREFIX_FOR_TICKET_ID = "ProfitMandi#";
28
    public static final String PROFIT_MANDI_SUBJECT_PREFIX_FOR_TICKET_ID = "ProfitMandi#";
27
    public static final long   ADMIN_AGENT_ID   = 1;
29
    public static final long   ADMIN_AGENT_ID   = 1;
28
    public static final int DESCRIPTION_MAX_WIDTH = 8000;
30
    public static final int DESCRIPTION_MAX_WIDTH = 8000;
-
 
31
    public static final String ADWORDS_EMAIL = "adwords@shop2020.in";
-
 
32
    public static final String ADWORDS_PASSWORD = "adwords_shop2020";
-
 
33
    
29
 
34
 
30
    public static final List<OrderStatus> failedStatusList = Arrays.asList(new OrderStatus[] {
35
    public static final List<OrderStatus> failedStatusList = Arrays.asList(new OrderStatus[] {
31
            OrderStatus.RTO_RESHIPPED,
36
            OrderStatus.RTO_RESHIPPED,
32
            OrderStatus.PAYMENT_FAILED,
37
            OrderStatus.PAYMENT_FAILED,
33
            OrderStatus.RTO_REFUNDED,
38
            OrderStatus.RTO_REFUNDED,
Line 206... Line 211...
206
        public String getDescription() {
211
        public String getDescription() {
207
            return description;
212
            return description;
208
        }
213
        }
209
 
214
 
210
    };
215
    };
-
 
216
    
-
 
217
    public enum Actionable{
-
 
218
    	NO_ACTION(0),
-
 
219
    	EMAIL_PROVIDER_REATTEMPT_DELIVERY(1);
-
 
220
    	
-
 
221
    	private int value;
-
 
222
    	Actionable(int value){
-
 
223
    		this.value = value;
-
 
224
    	}
-
 
225
    	
-
 
226
    	public int getValue(){
-
 
227
    		return value;
-
 
228
    	}
-
 
229
    };
-
 
230
    
-
 
231
    @SuppressWarnings("serial")
-
 
232
	public static final Map<TicketCategory, List<String>> CATEGORY_ACTION_MAP = Collections.unmodifiableMap(
-
 
233
    		new HashMap<TicketCategory, List<String>>(){
-
 
234
    			{
-
 
235
	    			
-
 
236
	    			for(TicketCategory category : TicketCategory.values()){
-
 
237
	    				put(category, new ArrayList<String>());
-
 
238
	    			}
-
 
239
	    			put(TicketCategory.UNDELIVERED, 
-
 
240
	    					Arrays.asList(
-
 
241
	    							new String[]{
-
 
242
	    									Actionable.NO_ACTION.toString(),
-
 
243
	    									Actionable.EMAIL_PROVIDER_REATTEMPT_DELIVERY.toString()
-
 
244
	    									}
-
 
245
	    							));
-
 
246
	    			
-
 
247
	    			
-
 
248
    		}
-
 
249
	    		
-
 
250
    		});
-
 
251
    
-
 
252
    public static enum LogisticProvider{
-
 
253
    	BLUEDART(1),
-
 
254
    	ARAMEX(2),
-
 
255
    	DELHIVERY(3),
-
 
256
    	REDEXPRESS(6),
-
 
257
    	FEDEX(7),
-
 
258
    	FEDEX_SURFACE(46);
-
 
259
    	
-
 
260
    	private long value;
-
 
261
    	
-
 
262
    	private LogisticProvider(long value){
-
 
263
    		this.value = value;
-
 
264
    	}
-
 
265
    	public long getValue(){
-
 
266
    		return value;
-
 
267
    	}
-
 
268
    	
-
 
269
    	  public static LogisticProvider findByValue(long value) { 
-
 
270
    		  int v = (int) value;
-
 
271
    		    switch (v) {
-
 
272
    		      case 1:
-
 
273
    		        return BLUEDART;
-
 
274
    		      case 2:
-
 
275
    		        return ARAMEX;
-
 
276
    		      case 3:
-
 
277
    		        return DELHIVERY;
-
 
278
    		      case 6:
-
 
279
    		        return REDEXPRESS;
-
 
280
    		      case 7:
-
 
281
    		        return FEDEX;
-
 
282
    		      case 46:
-
 
283
    		        return FEDEX_SURFACE;
-
 
284
    		      default:
-
 
285
    		        return null;
-
 
286
    		    }
-
 
287
    		  }
-
 
288
    }
-
 
289
    
-
 
290
    @SuppressWarnings("serial")
-
 
291
	public static final Map<LogisticProvider, List<String> > LOGISTIC_PROVIDER_MAP = Collections.unmodifiableMap(
-
 
292
    		new HashMap<LogisticProvider, List<String>>(){
-
 
293
    			{
-
 
294
	    			put(LogisticProvider.BLUEDART, 
-
 
295
	    					Arrays.asList(
-
 
296
	    							new String[]{"SunilB@bluedart.com,AnilKumar@bluedart.com,HarshaK@bluedart.com,AveekP@bluedart.com",
-
 
297
	    									"khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com"}));
-
 
298
	    			put(LogisticProvider.DELHIVERY, 
-
 
299
	    					Arrays.asList(
-
 
300
	    							new String[]{"client.support@delhivery.com,aakershit.gupta@delhivery.com,mamta.bhandari@delhivery.com,shinu.mathew@delhivery.com,ohm.chaudhury@delhivery.com",
-
 
301
	    									"khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com"}));
-
 
302
	    			put(LogisticProvider.FEDEX, 
-
 
303
	    					Arrays.asList(
-
 
304
	    							new String[]{"india@fedex.com,adesh.kumar@fedex.com,priyap@fedex.com",
-
 
305
	    									"khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com"}));
-
 
306
	    			put(LogisticProvider.FEDEX_SURFACE, 
-
 
307
	    					Arrays.asList(
-
 
308
	    							new String[]{"india@fedex.com,adesh.kumar@fedex.com,priyap@fedex.com",
-
 
309
	    									"khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com"}));
-
 
310
	    			
-
 
311
 
-
 
312
	    			
-
 
313
	    			
-
 
314
    		
-
 
315
    			}
-
 
316
    		});
-
 
317
 
211
 
318
 
212
}
319
}