james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] Commented: (MIME4J-175) Introduce a MessageBuilderFactory/MessageBuilder along the lines of DocumentBuilderFactory
Date Sat, 24 Apr 2010 21:49:51 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860594#action_12860594

Stefano Bagnara commented on MIME4J-175:

Added MimeEntityConfig and MutableBodyDescriptorFactory attributes to the factory so that
the behaviour of the parser can be changed without dealing with mime4j implementation (.message.
package) classes.

Maybe we should expose (at least some of) the MimeEntityConfig properties as Factory/Builder
properties, instead of relying on MimeEntityConfig attribute.

I mean 
MessageBuilderFactory factory = MessageBuilderFactory.newInstance();
factory.setFeature("strictParsing", true);
factory.setFeature("countLineNumbers", true);
factory.setFeature("malformedHeaderStartsBody", true);
factory.setProperty("maxHeaderLen", 1000);
factory.setProperty("headlessParsing", "multipart/form-data");

as a second step we could expose them as direct properties:

This issue goal is to start a new layer of API with controlled compatibility, so I think I
would start with setFeature/setProperty and before 1.0 we will define what features define
direct methods instead of generic "feature/attribute/property" support.

> Introduce a MessageBuilderFactory/MessageBuilder along the lines of DocumentBuilderFactory
> ------------------------------------------------------------------------------------------
>                 Key: MIME4J-175
>                 URL: https://issues.apache.org/jira/browse/MIME4J-175
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>          Components: dom
>    Affects Versions: 0.6
>            Reporter: Stefano Bagnara
>            Assignee: Stefano Bagnara
>             Fix For: 0.7
> This factory will support using the dom interfaces without knowledge of the "message"
> Implementing a simple java SPI for the factory will let us to decouple "dom" from "message"
and leave more future extensibility.
> Then we'll have to add body/fields creation methods to Message.
> Message should be traversable and alterable directly from the api.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message