[
https://issues.apache.org/jira/browse/MIME4J-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051254#comment-13051254
]
Stefano Bagnara commented on MIME4J-193:
----------------------------------------
@oleg: I don't agree with you, but it is good to have different ideas. You
didn't answer if removing the "implements MessageFormatter" from MimeWriter and
writing a new empty class "class MessageFormterImpl extends MimeWriter
implements MessageFormatter" works for you or not.
I can't understand the need for FormatterImpl to be proxy to another class,
considering it is already an hidden implementation returned by a
factory+service locator. As you point it, maybe the same is true for
MimeBuilder vs MessageBuilder but I didn't investigate it, so I will try to
look at it.
If you have an alternative solution that still allow jDKIM to not import
anything from the .message. package I'm happy to evaluate it.
> Being able to write a message using dom api with no dependencies on the
> message package
> ---------------------------------------------------------------------------------------
>
> Key: MIME4J-193
> URL: https://issues.apache.org/jira/browse/MIME4J-193
> Project: JAMES Mime4j
> Issue Type: Wish
> Components: dom
> Affects Versions: 0.7
> Reporter: Stefano Bagnara
> Fix For: 0.8
>
>
> While refactoring jDKIM against the latest mime4j trunk I found that the code
> now depends on "message" package because of MimeWriter.DEFAULT.writeTo calls.
> At the same time I see we now have MessageServiceFactory.newMessageFormatter
> and MessageFormatter interface that expose a writeTo(Message, OutputStream)
> method: why don't we expose all of the other writeTo methods from MimeWriter,
> too? (and maybe MimeWriter should implement MessageFormatter so we don't need
> the MessageFormatterImpl class at all)
> WDYT?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira