Class MultipartBuilder
java.lang.Object
com.atlassian.confluence.mail.template.MultipartBuilder
Helper class used for building multiparts to be attached to support request emails.
- 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptionjavax.mail.MultipartbuildMartipart(String location) Builds a Multipart by zipping the two most recent log files in the specified location.static javax.mail.util.ByteArrayDataSourcecreateDataSource(byte[] data, String type) static javax.mail.util.ByteArrayDataSourcecreateDataSource(InputStream data, String type) List<org.springframework.core.io.Resource>getResourcesFromPath(String location) javax.mail.internet.MimeBodyPartjavax.mail.internet.MimeMultipartmakeMultipart(ByteArrayInputStream bytezIn) Creates a multipart from the provided byte input streamjavax.mail.internet.MimeMultipartmakeMultipart(File file) Creates a multipart from the provided filejavax.mail.internet.MimeMultipartmakeMultipart(String subtype) javax.mail.MultipartmakeMultipart(Collection<javax.activation.DataSource> dataSources)  
- 
Field Details
- 
INSTANCE
 
 - 
 - 
Method Details
- 
makeMultipart
public javax.mail.internet.MimeMultipart makeMultipart(File file) throws javax.mail.MessagingException, IOException Creates a multipart from the provided file- Parameters:
 file- the file to include- Returns:
 - the multipart
 - Throws:
 javax.mail.MessagingExceptionIOException
 - 
makeMultipart
public javax.mail.internet.MimeMultipart makeMultipart(ByteArrayInputStream bytezIn) throws javax.mail.MessagingException, IOException Creates a multipart from the provided byte input stream- Parameters:
 bytezIn- the byte stream to include- Returns:
 - the multipart
 - Throws:
 javax.mail.MessagingExceptionIOException
 - 
buildMartipart
public javax.mail.Multipart buildMartipart(String location) throws 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:
 IOExceptionjavax.mail.MessagingException
 - 
getResourcesFromPath
 - 
createDataSource
public static javax.mail.util.ByteArrayDataSource createDataSource(InputStream data, String type) throws IOException - Throws:
 IOException- Since:
 - 9.4
 
 - 
createDataSource
- Since:
 - 9.4
 
 - 
makeMimeBodyPart
public javax.mail.internet.MimeBodyPart makeMimeBodyPart()- Since:
 - 9.4
 
 - 
makeMultipart
- Since:
 - 9.4
 
 - 
makeMultipart
 
 -