com.atlassian.confluence.mail.template
Class MultipartBuilder

java.lang.Object
  extended by com.atlassian.confluence.mail.template.MultipartBuilder

public class MultipartBuilder
extends java.lang.Object

Helper class used for building multiparts to be attached to support request emails.


Field Summary
static MultipartBuilder INSTANCE
           
 
Method Summary
 javax.mail.Multipart buildMartipart(java.lang.String location)
          Builds a Multipart by zipping the two most recent log files in the specified location.
 java.util.List getResourcesFromPath(java.lang.String location)
           
 javax.mail.internet.MimeMultipart makeMultipart(java.io.ByteArrayInputStream bytezIn)
          Creates a multipart from the provided byte input stream
 javax.mail.Multipart makeMultipart(java.util.Collection<javax.activation.DataSource> dataSources)
           
 javax.mail.internet.MimeMultipart makeMultipart(java.io.File file)
          Creates a multipart from the provided file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final MultipartBuilder INSTANCE
Method Detail

makeMultipart

public javax.mail.internet.MimeMultipart makeMultipart(java.io.File file)
                                                throws javax.mail.MessagingException,
                                                       java.io.IOException
Creates a multipart from the provided file

Parameters:
file - the file to include
Returns:
the multipart
Throws:
javax.mail.MessagingException
java.io.IOException

makeMultipart

public javax.mail.internet.MimeMultipart makeMultipart(java.io.ByteArrayInputStream bytezIn)
                                                throws javax.mail.MessagingException,
                                                       java.io.IOException
Creates a multipart from the provided byte input stream

Parameters:
bytezIn - the byte stream to include
Returns:
the multipart
Throws:
javax.mail.MessagingException
java.io.IOException

buildMartipart

public javax.mail.Multipart buildMartipart(java.lang.String location)
                                    throws java.io.IOException,
                                           javax.mail.MessagingException
Builds a Multipart by zipping the two most recent log files in the specified location.

Parameters:
location - - the location of the log files
Returns:
the multipart
Throws:
java.io.IOException
javax.mail.MessagingException

getResourcesFromPath

public java.util.List getResourcesFromPath(java.lang.String location)

makeMultipart

public javax.mail.Multipart makeMultipart(java.util.Collection<javax.activation.DataSource> dataSources)


Copyright © 2003-2014 Atlassian. All Rights Reserved.