}
}
// Get the attachments for each discovered items, if the list allows
// attachments
if (listState.canContainAttachments() && (listItems != null)) {
final List<SPDocument> attachmentItems = new ArrayList<SPDocument>();
for (int j = 0; j < listItems.size(); j++) {
final SPDocument doc = listItems.get(j);
if (ActionType.ADD.equals(doc.getAction())) {
final List<SPDocument> attachments = listsHelper.getAttachments(listState, doc);