use of com.alexstyl.specialdates.date.DateParseException in project Memento-Calendar by alexstyl.
the class FacebookContactFactory method createContactFrom.
ContactEvent createContactFrom(Map<String, String> map) throws InvalidFacebookContactException {
try {
Date date = dateFrom(map);
DisplayName name = nameFrom(map);
long uid = idOf(map);
URI imagePath = FacebookImagePath.INSTANCE.forUid(uid);
return new ContactEvent(Optional.Companion.<Long>absent(), StandardEventType.BIRTHDAY, date, new Contact(uid, name, imagePath, SOURCE_FACEBOOK));
} catch (DateParseException | IndexOutOfBoundsException ex) {
throw new InvalidFacebookContactException(ex);
}
}
Aggregations