You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Stefano Bagnara (JIRA)" <mi...@james.apache.org> on 2010/04/24 23:49:51 UTC

[jira] Commented: (MIME4J-175) Introduce a MessageBuilderFactory/MessageBuilder along the lines of DocumentBuilderFactory

    [ 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:
factory.setStrictParsing(true);
factory.setMaxHeaderLen(1000);
factory.setHeadlessParsing("multipart/form-data");

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" package.
> 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.