Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
3090 mandeep.dh 1
/**
2
 * 
3
 */
4
package in.shop2020.serving.controllers;
5
 
6
import in.shop2020.crm.Activity;
7
import in.shop2020.crm.Agent;
8
import in.shop2020.crm.Ticket;
9
 
10
import org.apache.thrift.TException;
11
 
12
/**
13
 * Action class to display activity details.
14
 * @author mandeep
15
 */
16
public class UserActivityInfoController extends BaseController {
17
    /**
18
     * 
19
     */
20
    private static final long serialVersionUID = 1L;
21
    private long activityId;
22
    private Ticket ticket;
23
    private Activity lastActivity;
24
    private Activity activity;
25
 
26
    public String index() throws TException
27
    {
28
        createServiceClients();
29
        activity = crmServiceClient.getActivity(activityId);
30
        lastActivity = activity;
31
 
3339 mandeep.dh 32
        if (activity != null && activity.isSetTicketId()) {
3090 mandeep.dh 33
            lastActivity = crmServiceClient.getLastActivity(activity.getTicketId());
34
            ticket = crmServiceClient.getTicket(activity.getTicketId());
35
        }
36
 
37
        return INDEX;
38
    }
39
 
40
    public Ticket getTicket() {
41
        return ticket;
42
    }
43
 
44
    public Activity getLastActivity() {
45
        return lastActivity;
46
    }
47
 
48
    public Activity getActivity() {
49
        return activity;
50
    }
51
 
52
    public void setActivityId(long activityId) {
53
        this.activityId = activityId;
54
    }
55
 
56
    public Agent getAgent(long agentId) throws TException {
57
        return crmServiceClient.getAgent(agentId);
58
    }
59
}