Subversion Repositories SmartDukaan

Rev

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

Rev 3090 Rev 3106
Line 35... Line 35...
35
    protected static final String INPUT = "input";
35
    protected static final String INPUT = "input";
36
    protected static final String INDEX = "index";
36
    protected static final String INDEX = "index";
37
    protected static final String EDIT_NEW = "editNew";
37
    protected static final String EDIT_NEW = "editNew";
38
    protected static final String EDIT = "edit";
38
    protected static final String EDIT = "edit";
39
    protected static final String SHOW = "show";
39
    protected static final String SHOW = "show";
-
 
40
    protected static final String EXCEPTION = "exception";
40
 
41
 
41
    protected final SimpleDateFormat SDF = new SimpleDateFormat("dd MMM, yyyy hh:mm a");
42
    protected final SimpleDateFormat SDF = new SimpleDateFormat("dd MMM, yyyy hh:mm a");
42
 
43
 
43
    protected HttpServletResponse response;
44
    protected HttpServletResponse response;
44
    protected HttpServletRequest request;
45
    protected HttpServletRequest request;
Line 78... Line 79...
78
    }
79
    }
79
    
80
    
80
    /**
81
    /**
81
     * Utility method to convert a date to a readable format 
82
     * Utility method to convert a date to a readable format 
82
     */
83
     */
83
    public String convertDate(long date) {
84
    public String convertDate(Long date) {
84
        if (date == 0) {
85
        if (date == null || date == 0) {
85
            return "N/A";
86
            return "N/A";
86
        }
87
        }
87
 
88
 
88
        return SDF.format(new Date(date));
89
        return SDF.format(new Date(date));
89
    }
90
    }
-
 
91
 
-
 
92
    public String getCurrentAgentEmailId() {
-
 
93
        return currentAgentEmailId;
90
    
94
    }
-
 
95
 
91
    public String getAgentName() throws TException
96
    public String getAgentName() throws TException
92
    {
97
    {
93
        createServiceClients();
98
        createServiceClients();
94
        return crmServiceClient.getAgentByEmailId(currentAgentEmailId).getName();
99
        return crmServiceClient.getAgentByEmailId(currentAgentEmailId).getName();
95
    }
100
    }
96
 
101
 
97
    public String getCurrentAgentEmailId() {
102
    public String editNew() {
98
        return currentAgentEmailId;
103
        return EDIT_NEW;
99
    }
104
    }
100
 
105
 
101
    public String getLoggerRole() throws TException {
106
    public String edit() {
102
        createServiceClients();
107
        return EDIT;
103
        return crmServiceClient.getRoleNamesForAgent(currentAgentEmailId).get(0);
-
 
104
    }
108
    }
105
}
109
}