Class EmailHeaderUtil
- java.lang.Object
-
- com.javahollic.jira.emh.api.extension.preproctask.EmailHeaderUtil
-
public class EmailHeaderUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EmailHeaderUtil.EmailHeaders
static class
EmailHeaderUtil.HeaderData
-
Constructor Summary
Constructors Constructor Description EmailHeaderUtil(InputStream emailStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeaderBefore(EmailHeaderUtil.HeaderData addedHeaderData, Set<String> headersHandled)
Adds new header (if it doesn't exist).byte[]
getBytes()
EmailHeaderUtil.HeaderData
getHeader(String header)
InputStream
getInputStream()
void
setUpdatedBody(String body)
void
updateHeader(EmailHeaderUtil.HeaderData updatedHeaderData)
Merge in the updated value (if it is changed).
-
-
-
Constructor Detail
-
EmailHeaderUtil
public EmailHeaderUtil(InputStream emailStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
-
getBytes
public byte[] getBytes()
-
getHeader
public EmailHeaderUtil.HeaderData getHeader(String header)
-
updateHeader
public void updateHeader(EmailHeaderUtil.HeaderData updatedHeaderData)
Merge in the updated value (if it is changed). If updated value is empty, remove the header- Parameters:
updatedHeaderData
- to to the model of the emails current headers
-
addHeaderBefore
public void addHeaderBefore(EmailHeaderUtil.HeaderData addedHeaderData, Set<String> headersHandled)
Adds new header (if it doesn't exist). Used in PreProcTaskRunner/ScriptPreProcTask to insert new headers added via Script- Parameters:
addedHeaderData
- to to the model of the emails current headersheadersHandled
- contains all handled Headers. new Header will be added before the first Header in handledHeaders
-
setUpdatedBody
public void setUpdatedBody(String body)
-
-