Subversion Repositories SmartDukaan

Rev

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

Rev 3339 Rev 3390
Line 2... Line 2...
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.crm.handler;
4
package in.shop2020.crm.handler;
5
 
5
 
6
import in.shop2020.crm.domain.Agent;
6
import in.shop2020.crm.domain.Agent;
-
 
7
import in.shop2020.crm.domain.SearchFilter;
7
import in.shop2020.crm.persistence.AgentMapper;
8
import in.shop2020.crm.persistence.AgentMapper;
8
 
9
 
9
import java.util.Date;
10
import java.util.Date;
10
import java.util.List;
11
import java.util.List;
11
 
12
 
Line 20... Line 21...
20
@Service
21
@Service
21
public class AgentHandler {
22
public class AgentHandler {
22
    @Autowired
23
    @Autowired
23
    private AgentMapper agentMapper;
24
    private AgentMapper agentMapper;
24
 
25
 
25
    public Agent getAgent(long agentId)
-
 
26
    {
-
 
27
        return agentMapper.getAgent(agentId);
-
 
28
    }
-
 
29
 
-
 
30
    public Agent getAgentByEmail(String emailId)
-
 
31
    {
-
 
32
        return agentMapper.getAgentByEmailId(emailId);
-
 
33
    }
-
 
34
 
-
 
35
    public List<String> getRoleNamesForAgent(String agentEmailId) {
26
    public List<String> getRoleNamesForAgent(String agentEmailId) {
36
        return agentMapper.getRoleNamesForAgent(agentEmailId);
27
        return agentMapper.getRoleNamesForAgent(agentEmailId);
37
    }
28
    }
38
 
29
 
39
    public List<String> getPermissionsForRoleName(String roleName) {
30
    public List<String> getPermissionsForRoleName(String roleName) {
40
        return agentMapper.getPermissionsForRoleName(roleName);
31
        return agentMapper.getPermissionsForRoleName(roleName);
41
    }
32
    }
42
 
33
 
43
    public List<Agent> getAllAgents() {
-
 
44
        return agentMapper.getAllAgents();
-
 
45
    }
-
 
46
 
-
 
47
    public void updatePasswordForAgent(String agentEmailId, String password) {
34
    public void updatePasswordForAgent(String agentEmailId, String password) {
48
        agentMapper.updatePasswordForAgent(agentEmailId, password);
35
        agentMapper.updatePasswordForAgent(agentEmailId, password);
49
    }
36
    }
50
 
37
 
51
    public List<Agent> getReportees(long agentId) {
-
 
52
        return agentMapper.getReportees(agentId);
-
 
53
    }
-
 
54
 
-
 
55
    public Date getLastEmailProcessedTimestamp() {
38
    public Date getLastEmailProcessedTimestamp() {
56
        return agentMapper.getLastEmailProcessedTimestamp();
39
        return agentMapper.getLastEmailProcessedTimestamp();
57
    }
40
    }
58
 
41
 
59
    public void updateLastEmailProcessedTimestamp(Date timestamp) {
42
    public void updateLastEmailProcessedTimestamp(Date timestamp) {
60
        agentMapper.updateLastEmailProcessedTimestamp(timestamp);
43
        agentMapper.updateLastEmailProcessedTimestamp(timestamp);
61
    }
44
    }
-
 
45
 
-
 
46
    public List<Agent> getAgents(SearchFilter searchFilter) {
-
 
47
        return agentMapper.getAgents(searchFilter);
-
 
48
    }
62
}
49
}