Class ResponseObject<TMessage extends EmailMessage>

    • Constructor Detail

      • ResponseObject

        protected ResponseObject​(Item referenceItem)
                          throws Exception
        Initializes a new instance of the class.
        Parameters:
        referenceItem - the reference item
        Throws:
        Exception - the exception
    • Method Detail

      • internalCreate

        protected List<IteminternalCreate​(FolderId destinationFolderId,
                                            MessageDisposition messageDisposition)
                                     throws Exception
        Create the response object.
        Parameters:
        destinationFolderId - the destination folder id
        messageDisposition - the message disposition
        Returns:
        The list of item returned by EWS.
        Throws:
        Exception - the exception
      • save

        public TMessage save​(FolderId destinationFolderId)
                      throws Exception
        Saves the response in the specified folder. Calling this method results in a call to EWS.
        Parameters:
        destinationFolderId - the destination folder id
        Returns:
        A TMessage that represents the response.
        Throws:
        Exception - the exception
      • save

        public TMessage save​(WellKnownFolderName destinationFolderName)
                      throws Exception
        Saves the response in the specified folder. Calling this method results in a call to EWS.
        Parameters:
        destinationFolderName - the destination folder name
        Returns:
        A TMessage that represents the response.
        Throws:
        Exception - the exception
      • save

        public TMessage save()
                      throws Exception
        Saves the response in the Drafts folder. Calling this method results in a call to EWS.
        Returns:
        A TMessage that represents the response.
        Throws:
        Exception - the exception
      • send

        public void send()
                  throws Exception
        Sends this response without saving a copy. Calling this method results in a call to EWS.
        Throws:
        Exception - the exception
      • sendAndSaveCopy

        public void sendAndSaveCopy​(FolderId destinationFolderId)
                             throws Exception
        Sends this response and saves a copy in the specified folder. Calling this method results in a call to EWS.
        Parameters:
        destinationFolderId - the destination folder id
        Throws:
        Exception - the exception
      • sendAndSaveCopy

        public void sendAndSaveCopy​(WellKnownFolderName destinationFolderName)
                             throws Exception
        Sends this response and saves a copy in the specified folder. Calling this method results in a call to EWS.
        Parameters:
        destinationFolderName - the destination folder name
        Throws:
        Exception - the exception
      • sendAndSaveCopy

        public void sendAndSaveCopy()
                             throws Exception
        Sends this response and saves a copy in the Sent Items folder. Calling this method results in a call to EWS.
        Throws:
        Exception - the exception