/** * Gets the date that the message was accepted by the * server on. */ public Calendar getMessageDate() throws ChunkNotFoundException { if(mainChunks.submissionChunk != null) { return mainChunks.submissionChunk.getAcceptedAtTime(); } if(returnNullOnMissingChunk) return null; throw new ChunkNotFoundException(); }
chunk = new MessageSubmissionChunk(namePrefix, chunkId, type);
chunk = new MessageSubmissionChunk(namePrefix, chunkId, type);
/** * Gets the date that the message was accepted by the * server on. */ public Calendar getMessageDate() throws ChunkNotFoundException { if (mainChunks.getSubmissionChunk() != null) { return mainChunks.getSubmissionChunk().getAcceptedAtTime(); } else { // Try a few likely suspects... for (MAPIProperty prop : new MAPIProperty[] { MAPIProperty.CLIENT_SUBMIT_TIME, MAPIProperty.LAST_MODIFICATION_TIME, MAPIProperty.CREATION_TIME }) { List<PropertyValue> val = mainChunks.getProperties().get(prop); if (val != null && val.size() > 0) { return ((TimePropertyValue)val.get(0)).getValue(); } } } if(returnNullOnMissingChunk) return null; throw new ChunkNotFoundException(); }