/** * Initializes a new instance of the class. * * @param referenceItem the reference item * @throws Exception the exception */ public PostReply(Item referenceItem) throws Exception { super(referenceItem.getService()); referenceItem.throwIfThisIsNew(); this.referenceItem = referenceItem; }
public Object createServiceObjectWithAttachmentParam( ItemAttachment itemAttachment, boolean isNew) throws Exception { return new MeetingMessage(itemAttachment); } });
public MimeMessage parseMessage(EmailMessage item, List<String> hdrIncludeList, List<String> hdrExcludeList) throws Exception { EmailMessage ewsMessage = item; final String bodyText = ewsMessage.getBody().toString(); if(ewsMessage.getBody().getBodyType() == BodyType.HTML){ mm = new HtmlEmail(); if(!StringUtils.isEmpty(bodyText)){ mm.setFrom(ewsMessage.getFrom().getAddress()); ewsMessage.getToRecipients().forEach(x->{ try { mm.addTo(x.getAddress()); ewsMessage.getCcRecipients().forEach(x->{ try { mm.addCc(x.getAddress()); mm.setSubject(ewsMessage.getSubject()); mm.setSentDate(ewsMessage.getDateTimeSent()); ewsMessage.getInternetMessageHeaders().getItems().stream() .filter(x -> (hdrIncludeList == null || hdrIncludeList.isEmpty() || hdrIncludeList.contains(x.getName())) && (hdrExcludeList == null || hdrExcludeList.isEmpty() || !hdrExcludeList.contains(x.getName()))) if(ewsMessage.getHasAttachments()){ ewsMessage.getAttachments().forEach(x->{ try { FileAttachment file = (FileAttachment)x;
public Object createServiceObjectWithAttachmentParam( ItemAttachment itemAttachment, boolean isNew) throws Exception { return new MeetingResponse(itemAttachment); } });
public Object createServiceObjectWithAttachmentParam( ItemAttachment itemAttachment, boolean isNew) throws Exception { return new Item(itemAttachment); } });
/** * Accepts the meeting. Calling this method results in a call to EWS. * * @param sendResponse the send response * @return A CalendarActionResults object containing the various item that * were created or modified as a results of this operation. * @throws Exception the exception */ public CalendarActionResults accept(boolean sendResponse) throws Exception { return this.internalAccept(false, sendResponse); }
/** * Saves this item in the default folder based on the item's type (for * example, an e-mail message is saved to the Drafts folder). Calling this * method results in at least one call to EWS. Mutliple calls to EWS might * be made if attachments have been added. * * @throws Exception the exception */ public void save() throws Exception { this.internalCreate(null, MessageDisposition.SaveOnly, null); }
/** * Gets a value indicating whether this is an associated message. * * @return the checks if is associated * @throws ServiceLocalException the service local exception */ public boolean getIsAssociated() throws ServiceLocalException { return super.getIsAssociated(); }
/** * Accepts the meeting. Calling this method results in a call to EWS. * * @param sendResponse Indicates whether to send a response to the organizer. * @return A CalendarActionResults object containing the various item that * were created or modified as a results of this operation. * @throws Exception throws Exception */ public CalendarActionResults accept(boolean sendResponse) throws Exception { return this.internalAccept(false, sendResponse); }
public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new EmailMessage(srv); } }, new ICreateServiceObjectWithAttachmentParam() {
/** * Saves this appointment in the Calendar folder. Calling this method * results in at least one call to EWS. Mutliple calls to EWS might be made * if attachments have been added. * * @param sendInvitationsMode the send invitations mode * @throws Exception the exception */ public void save(SendInvitationsMode sendInvitationsMode) throws Exception { this.internalCreate(null, null, sendInvitationsMode); }
/** * Deletes this appointment. Calling this method results in a call to EWS. * * @param deleteMode the delete mode * @param sendCancellationsMode the send cancellations mode * @throws Exception the exception */ public void delete(DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode) throws Exception { this.internalDelete(deleteMode, sendCancellationsMode, null); }
/** * Gets the display name of the contact group. * * @return the display name * @throws Exception the exception */ public String getDisplayName() throws Exception { return (String) this .getObjectFromPropertyDefinition(ContactSchema.DisplayName); }
public Object createServiceObjectWithAttachmentParam( ItemAttachment itemAttachment, boolean isNew) throws Exception { return new MeetingCancellation(itemAttachment); } });
public Object createServiceObjectWithAttachmentParam( ItemAttachment itemAttachment, boolean isNew) throws Exception { return new Task(itemAttachment); } });
/** * Initializes a new instance of the class. * * @param referenceItem the reference item * @throws Exception the exception */ public SuppressReadReceipt(Item referenceItem) throws Exception { super(referenceItem.getService()); referenceItem.throwIfThisIsNew(); this.referenceItem = referenceItem; }
public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new MeetingMessage(srv); } }, new ICreateServiceObjectWithAttachmentParam() {
public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new MeetingResponse(srv); } }, new ICreateServiceObjectWithAttachmentParam() {