Subversion Repositories SmartDukaan

Rev

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

Rev 5168 Rev 5286
Line 66... Line 66...
66
 
66
 
67
	public String changePassword(){
67
	public String changePassword(){
68
		try {
68
		try {
69
			crmServiceClient = new CRMClient().getClient();
69
			crmServiceClient = new CRMClient().getClient();
70
			crmServiceClient.updatePasswordForAgent(emailId, new Sha256Hash(newPassword).toHex());
70
			crmServiceClient.updatePasswordForAgent(emailId, new Sha256Hash(newPassword).toHex());
-
 
71
			
-
 
72
			// Dummy call to reload agents
-
 
73
	        CRMAuthorizingRealm.getAgent(-1);
71
		} catch (TException e) {
74
		} catch (TException e) {
72
			log.error("Error while changing password of agent", e);
75
			log.error("Error while changing password of agent", e);
73
			e.printStackTrace();
76
			e.printStackTrace();
74
			return EXCEPTION;
77
			return EXCEPTION;
75
		}
78
		}
Line 101... Line 104...
101
		return index();
104
		return index();
102
	}
105
	}
103
	
106
	
104
	public String getOpenTicketCount(long id) {
107
	public String getOpenTicketCount(long id) {
105
		try {
108
		try {
106
			log.info("Agent id : " + id);
-
 
107
			crmServiceClient = new CRMClient().getClient();
109
			crmServiceClient = new CRMClient().getClient();
108
			return (new Integer(crmServiceClient.getOpenTicketCountForAgent(id))).toString();
110
			return (new Integer(crmServiceClient.getOpenTicketCountForAgent(id))).toString();
109
		} catch (TTransportException e) {
111
		} catch (TTransportException e) {
110
			e.printStackTrace();
112
			e.printStackTrace();
111
		} catch (TException e) {
113
		} catch (TException e) {
Line 184... Line 186...
184
	}
186
	}
185
 
187
 
186
	public void setId(int id) {
188
	public void setId(int id) {
187
		this.id = id;
189
		this.id = id;
188
	}
190
	}
-
 
191
	
-
 
192
	public static void main(String args[]) throws TException {
-
 
193
		SearchFilter searchFilter = new SearchFilter();
-
 
194
		searchFilter.setAgentId(10);
-
 
195
		in.shop2020.crm.CRMService.Client crmServiceClient = new CRMClient().getClient();
-
 
196
    	List<Agent> agents = crmServiceClient.getAgents(searchFilter);
-
 
197
    	System.out.println(agents);
-
 
198
	}
189
}
199
}