Class PstFolderWriter

java.lang.Object
com.independentsoft.pst.PstFolderWriter

public class PstFolderWriter extends Object
Represents a folder to be created in a new PST file (write side). Build a tree of these via addFolder(String) and pass the containing PstStoreWriter to save.
  • Constructor Details

    • PstFolderWriter

      public PstFolderWriter(String displayName)
      Initializes a new instance of the PstFolderWriter class.
      Parameters:
      displayName - the folder display name.
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Gets the display name.
      Returns:
      the display name.
    • setDisplayName

      public void setDisplayName(String displayName)
      Sets the display name.
      Parameters:
      displayName - the display name.
    • getFolders

      public List<PstFolderWriter> getFolders()
      Gets the sub-folders of this folder.
      Returns:
      the sub-folders.
    • addFolder

      public PstFolderWriter addFolder(String displayName)
      Adds a sub-folder with the specified display name and returns it.
      Parameters:
      displayName - the sub-folder display name.
      Returns:
      the created PstFolderWriter.
    • getMessages

      public List<PstMessageWriter> getMessages()
      Gets the messages contained in this folder.
      Returns:
      the messages.
    • addMessage

      public PstMessageWriter addMessage(String subject, String body)
      Adds a plain-text message (IPM.Note) to this folder and returns it.
      Parameters:
      subject - the message subject.
      body - the message body (plain text).
      Returns:
      the created PstMessageWriter.