Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
458 rajveer 1
/**
2
 * 
3
 */
4
package in.shop2020.serving.controllers;
5
 
6
import in.shop2020.thrift.clients.UserContextServiceClient;
7
 
8
import java.io.IOException;
9
import java.io.UnsupportedEncodingException;
10
import java.util.Date;
11
 
12
import javax.servlet.http.Cookie;
13
 
14
import org.apache.juli.logging.Log;
15
import org.apache.juli.logging.LogFactory;
16
import org.apache.struts2.convention.annotation.Result;
17
import org.apache.struts2.convention.annotation.Results;
18
import org.apache.struts2.interceptor.ParameterAware;
19
import org.apache.struts2.interceptor.ServletRequestAware;
20
import org.apache.struts2.rest.DefaultHttpHeaders;
21
import org.apache.struts2.rest.HttpHeaders;
22
import org.apache.thrift.TException;
23
 
24
import com.opensymphony.xwork2.ModelDriven;
25
 
26
/**
27
 * @author rajveer
28
 *
29
 */
30
public class EstimateController extends BaseController {
31
 
32
	/**
33
	 * 
34
	 */
35
	private static Log log = LogFactory.getLog(EstimateController.class);
36
 
37
	private String id;
38
 
39
	public EstimateController() {
40
		super();
41
	}
42
 
43
    // GET /logout
44
    public HttpHeaders show() throws Exception {
45
 
46
    	return new DefaultHttpHeaders("index");
47
    }
48
 
49
    /**
50
     * 
51
     * @param id
52
     */
53
    public void setId(String id) {
54
        this.id = id;
55
    }
56
 
57
    public long getEstimatedTime() {
58
    	if(Long.parseLong(id) == 560001){
59
    		return 48;
60
    	}else{
61
    		return 48+24;
62
    	}
63
    }
64
}