/** * Initializes a new instance of the class. * * @param items the item */ public CalendarActionResults(Iterable<Item> items) { this.appointment = EwsUtilities.findFirstItemOfType(Appointment.class, items); this.meetingRequest = EwsUtilities.findFirstItemOfType( MeetingRequest.class, items); this.meetingResponse = EwsUtilities.findFirstItemOfType( MeetingResponse.class, items); this.meetingCancellation = EwsUtilities.findFirstItemOfType( MeetingCancellation.class, items); }
/** * Create a PostItem response. * * @param parentFolderId the parent folder id * @param messageDisposition the message disposition * @return Created PostItem. * @throws Exception the exception */ protected PostItem internalCreate(FolderId parentFolderId, MessageDisposition messageDisposition) throws Exception { ((ItemId) this .getObjectFromPropertyDefinition( ResponseObjectSchema.ReferenceItemId)) .assign(this.referenceItem.getId()); List<Item> items = this.getService().internalCreateResponseObject(this, parentFolderId, messageDisposition); PostItem postItem = EwsUtilities.findFirstItemOfType(PostItem.class, items); // This should never happen. If it does, we have a bug. EwsUtilities .ewsAssert(postItem != null, "PostReply.InternalCreate", "postItem is null. The CreateItem call did" + " not return the expected PostItem."); return postItem; }
/** * Initializes a new instance of the class. * * @param items the item */ public CalendarActionResults(Iterable<Item> items) { this.appointment = EwsUtilities.findFirstItemOfType(Appointment.class, items); this.meetingRequest = EwsUtilities.findFirstItemOfType( MeetingRequest.class, items); this.meetingResponse = EwsUtilities.findFirstItemOfType( MeetingResponse.class, items); this.meetingCancellation = EwsUtilities.findFirstItemOfType( MeetingCancellation.class, items); }
/** * Create a PostItem response. * * @param parentFolderId the parent folder id * @param messageDisposition the message disposition * @return Created PostItem. * @throws Exception the exception */ protected PostItem internalCreate(FolderId parentFolderId, MessageDisposition messageDisposition) throws Exception { ((ItemId) this .getObjectFromPropertyDefinition( ResponseObjectSchema.ReferenceItemId)) .assign(this.referenceItem.getId()); List<Item> items = this.getService().internalCreateResponseObject(this, parentFolderId, messageDisposition); PostItem postItem = EwsUtilities.findFirstItemOfType(PostItem.class, items); // This should never happen. If it does, we have a bug. EwsUtilities .ewsAssert(postItem != null, "PostReply.InternalCreate", "postItem is null. The CreateItem call did" + " not return the expected PostItem."); return postItem; }