Skip to content

Commit

Permalink
#7 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
deep.patel committed Apr 10, 2019
1 parent fb7b55b commit ff466d1
Showing 1 changed file with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ public List<Notification> getAllNotification(String userId) {
return result;
}

@Override
public List<Notification> getNotificationById(String userId, String notificationId) {
// TODO Auto-generated method stub
return null;
}

@Override
public Map<String, Integer> getUnseenCounts(String userId) {
Map<String, Integer> result = new HashMap<>();
Expand All @@ -51,12 +45,11 @@ public Map<String, Integer> getUnseenCounts(String userId) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return result;
}

@Override
public Map<String, Integer> deleteNotifications(List<String> uuids) {
public Map<String, Integer> markToSeen(List<String> uuids) {
/*
* NOTE - Conversion should be kept in the services-- this should be the list of
* String/UUIDs. and the services should convert to any supported or desired
Expand All @@ -70,17 +63,17 @@ public Map<String, Integer> deleteNotifications(List<String> uuids) {
UUID temp = UUID.fromString(uuid);
uuidList.addUuidsItem(temp);
}
result = apiInstance.deleteNotification(uuidList);
} catch (ApiException e) {
// TODO Auto-generated catch block
result = apiInstance.markSeen(uuidList);
} catch (

ApiException e) {
e.printStackTrace();
}
return result;

}

@Override
public Map<String, Integer> markToSeen(List<String> uuids) {
public Map<String, Integer> deleteNotifications(List<String> uuids) {
/*
* NOTE - Conversion should be kept in the services-- this should be the list of
* String/UUIDs. and the services should convert to any supported or desired
Expand All @@ -94,12 +87,18 @@ public Map<String, Integer> markToSeen(List<String> uuids) {
UUID temp = UUID.fromString(uuid);
uuidList.addUuidsItem(temp);
}
result = apiInstance.markSeen(uuidList);
} catch (

ApiException e) {
result = apiInstance.deleteNotification(uuidList);
} catch (ApiException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}

@Override
public List<Notification> getNotificationById(String userId, String notificationId) {
// TODO Auto-generated method stub
// To be used if needed
return null;
}
}

0 comments on commit ff466d1

Please sign in to comment.