Subversion Repositories SmartDukaan

Rev

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

Rev 9686 Rev 9697
Line 62... Line 62...
62
    
62
    
63
    
63
    
64
    private long cartId;
64
    private long cartId;
65
    private String cartPojoJson;
65
    private String cartPojoJson;
66
    private long quantity;
66
    private long quantity;
-
 
67
    private int insuranceType;
67
    
68
    
68
    public CartController(){
69
    public CartController(){
69
        super();
70
        super();
70
    }
71
    }
71
    
72
    
Line 159... Line 160...
159
        }
160
        }
160
        return false;
161
        return false;
161
    }
162
    }
162
           
163
           
163
    public String insureItem() {
164
    public String insureItem() {
164
//        //TODO : Call a method in userservice that insures the item.
-
 
165
//        insuranceResult = "";
165
        insuranceResult = "";
166
//        try {
166
        try {
167
//            UserContextService.Client usc = new UserClient().getClient();
167
            UserContextService.Client usc = new UserClient().getClient();
168
//            if(usc.insureItem(productId, userinfo.getCartId(), toInsure)) {
168
            if(usc.insureItem(itemId, cartId, toInsure, insuranceType)) {
169
//                setInsuranceResult("SUCCESS");
169
                setInsuranceResult("SUCCESS");
170
//            } else {
170
            } else {
171
//                setInsuranceResult("FAILURE");
171
                setInsuranceResult("FAILURE");
172
//            }
172
            }
173
//        } catch (Exception e) {
173
        } catch (Exception e) {
174
//            log.error("Unable to insure item : " + productId + " for cart : " + userinfo.getCartId(), e);
174
            log.error("Unable to insure item : " + itemId + " for cart : " + cartId, e);
175
//            setInsuranceResult("FAILURE");
175
            setInsuranceResult("FAILURE");
176
//        }
176
        }
177
        return "insurance-result";
177
        return "insurance-result";
178
    }
178
    }
179
 
179
 
180
    public long getItemId(){
180
    public long getItemId(){
181
        return this.itemId;
181
        return this.itemId;
Line 327... Line 327...
327
    }
327
    }
328
 
328
 
329
    public long getQuantity() {
329
    public long getQuantity() {
330
        return quantity;
330
        return quantity;
331
    }
331
    }
-
 
332
 
-
 
333
    public int getInsuranceType() {
-
 
334
        return insuranceType;
-
 
335
    }
-
 
336
 
-
 
337
    public void setInsuranceType(int insuranceType) {
-
 
338
        this.insuranceType = insuranceType;
-
 
339
    }
332
}
340
}