Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

/**
 * 
 */
package in.shop2020.serving.controllers;

import in.shop2020.thrift.clients.UserContextServiceClient;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Date;

import javax.servlet.http.Cookie;

import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.apache.struts2.interceptor.ParameterAware;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.rest.DefaultHttpHeaders;
import org.apache.struts2.rest.HttpHeaders;
import org.apache.thrift.TException;

import com.opensymphony.xwork2.ModelDriven;

/**
 * @author rajveer
 *
 */
public class EstimateController extends BaseController {
        
        /**
         * 
         */
        private static Log log = LogFactory.getLog(EstimateController.class);
        
        private String id;
        
        public EstimateController() {
                super();
        }
    
    // GET /logout
    public HttpHeaders show() throws Exception {
        
        return new DefaultHttpHeaders("index");
    }
        
    /**
     * 
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }

    public long getEstimatedTime() {
        if(Long.parseLong(id) == 560001){
                return 48;
        }else{
                return 48+24;
        }
    }
}