if(isRedirectEnabled()) {
try {
setLink(Utilities.followRedirect(getLink()));
} catch (IOException e) {
throw new StoryReaderException(Constants.EXCEPTION_COMM_ERROR + ": "+getLink());
}
}
storyDoc.replaceItemValue("NLink", getLink());
someDate=session.createDateTime(getCreationDate());
storyDoc.replaceItemValue("NCreationDate", someDate);
someDate.recycle();
someDate=session.createDateTime(getDate());
storyDoc.replaceItemValue("NPublicationDate", someDate);
someDate.recycle();
storyDoc.replaceItemValue("NTitle", getTitle());
storyDoc.replaceItemValue("NAbstract", getAbstractContent());
storyDoc.replaceItemValue("NContent", getFullContent());
// Not checked, but in case additional field has Date or Calendar value, this is going to throw NotesException...
for (Map.Entry<String, Object> entry : additionalFields.entrySet()) {
storyDoc.replaceItemValue(entry.getKey(), entry.getValue());
}
storyDoc.save();
storyDoc.recycle();
return true;
} catch (NotesException e) {
throw new StoryReaderException(Constants.EXCEPTION_SAVE_STORY + ": "+ e.getMessage());
}
}