Subversion Repositories SmartDukaan

Rev

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

Rev 6201 Rev 6204
Line 13... Line 13...
13
public class RechargeController extends BaseController {
13
public class RechargeController extends BaseController {
14
    
14
    
15
    /**
15
    /**
16
     * 
16
     * 
17
     */
17
     */
18
    private String serviceType = "1"; //Default is Mobile , 2 is for DTH
18
    private String serviceType = null; //Default is Mobile , 2 is for DTH
19
    private String deviceNumber = "";
19
    private String deviceNumber = "";
20
    private String form = "";
20
    private String form = "";
21
    private Map<Long, String> providers;
21
    private Map<Long, String> providers;
22
    private String error = "";
22
    private String error = "";
23
    
23
    private String uri;
-
 
24
    private String operatorId;
-
 
25
    private String operatorName;
-
 
26
    private String serviceName;
24
    private static final long serialVersionUID = 2079308723099307749L;
27
    private static final long serialVersionUID = 2079308723099307749L;
25
 
28
 
26
    private static Logger log = Logger.getLogger(Class.class);
29
    private static Logger log = Logger.getLogger(Class.class);
27
    
30
    
28
 
31
    
29
    public String index() {
32
    public String index() {
-
 
33
    	uri = request.getRequestURI();
-
 
34
		uri = uri.replace("/", "");
-
 
35
	    log.info("Uri: " + uri);
-
 
36
	    Map<String, String> valueMap = Utils.getOperatorByUri(uri);
-
 
37
	    operatorId  = valueMap.get("Id");
-
 
38
        operatorName = valueMap.get("Name"); 
-
 
39
        serviceName  = valueMap.get("ServiceName");
-
 
40
	    if(serviceType == null){
-
 
41
	        serviceType  = valueMap.get("ServiceType");
-
 
42
	    }
30
    	if(error.equals("ServiceDown")){
43
        if(error.equals("ServiceDown")){
31
    		error = "Oops! There seems to be a problem. Please try after some time";
44
    		error = "Oops! There seems to be a problem. Please try after some time";
32
    	}else{
45
    	}else{
33
    		error = "";
46
    		error = "";
34
    	}
47
    	}
35
        return "index";
48
        return "index";
Line 96... Line 109...
96
 
109
 
97
	public void setError(String error) {
110
	public void setError(String error) {
98
		this.error = error;
111
		this.error = error;
99
	}
112
	}
100
    
113
    
-
 
114
	public String getPageName() {
-
 
115
    	return operatorName  + " online recharge";
-
 
116
    }
-
 
117
	
-
 
118
	public String getPageTitle() {
-
 
119
		return operatorName  + " online recharge";
-
 
120
    }
-
 
121
	
-
 
122
    public String getPageMetaDesc() {
-
 
123
    	return "Recharge your " + this.operatorName +  " " + this.serviceName +  " online for all cities using Credit/Debit card & net banking. Fast, Secure and Hassle Free Recharge";
-
 
124
    }
-
 
125
    
-
 
126
    public String getPageMetaKeywords() {
-
 
127
    	return "mobile, recharge";
-
 
128
    }
-
 
129
    
-
 
130
    public long getOperatorId(){
-
 
131
    	return Long.parseLong(this.operatorId);
-
 
132
    }
101
}
133
}
102
134