Subversion Repositories SmartDukaan

Rev

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

Rev 3519 Rev 3711
Line 173... Line 173...
173
        }
173
        }
174
 
174
 
175
        return index();
175
        return index();
176
    }
176
    }
177
 
177
 
-
 
178
    public String getUnreadActivities() {
-
 
179
        try {
-
 
180
            SearchFilter searchFilter = new SearchFilter();
-
 
181
            searchFilter.setIsActivityRead(false);
-
 
182
            searchFilter.setActivityCreatorIds(Collections.singletonList(CRMConstants.ADMIN_AGENT_ID));
-
 
183
 
-
 
184
            searchFilter.setTicketAssigneeIds(Collections
-
 
185
                    .singletonList(CRMAuthorizingRealm.getAgent(
-
 
186
                            currentAgentEmailId).getId()));
-
 
187
 
-
 
188
            crmServiceClient = new CRMClient().getClient();
-
 
189
            activities = crmServiceClient.getActivities(searchFilter);
-
 
190
        } catch (TException e) {
-
 
191
            log.error("Could not get agentId for: " + currentAgentEmailId, e);
-
 
192
        }
-
 
193
 
-
 
194
        return INDEX;
-
 
195
    }
-
 
196
 
178
    public ActivityType[] getActivityTypes() {
197
    public ActivityType[] getActivityTypes() {
179
        return ActivityType.values();
198
        return ActivityType.values();
180
    }
199
    }
181
 
200
 
182
    public Agent getAgent(long agentId) throws TException {
201
    public Agent getAgent(long agentId) throws TException {