Class MultipartBuilder
- java.lang.Object
-
- com.atlassian.confluence.mail.template.MultipartBuilder
-
public class MultipartBuilder extends Object
Helper class used for building multiparts to be attached to support request emails.
-
-
Field Summary
Fields Modifier and Type Field Description static MultipartBuilder
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.mail.Multipart
buildMartipart(String location)
Builds a Multipart by zipping the two most recent log files in the specified location.List<org.springframework.core.io.Resource>
getResourcesFromPath(String location)
javax.mail.internet.MimeMultipart
makeMultipart(ByteArrayInputStream bytezIn)
Creates a multipart from the provided byte input streamjavax.mail.internet.MimeMultipart
makeMultipart(File file)
Creates a multipart from the provided filejavax.mail.Multipart
makeMultipart(Collection<javax.activation.DataSource> dataSources)
-
-
-
Field Detail
-
INSTANCE
public static final MultipartBuilder INSTANCE
-
-
Method Detail
-
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.MessagingException
IOException
-
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.MessagingException
IOException
-
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:
IOException
javax.mail.MessagingException
-
getResourcesFromPath
public List<org.springframework.core.io.Resource> getResourcesFromPath(String location)
-
makeMultipart
public javax.mail.Multipart makeMultipart(Collection<javax.activation.DataSource> dataSources)
-
-