Joel
unread,Aug 9, 2011, 2:40:56 AM8/9/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to BrailleUtils
Hi all,
I have committed the "contract" feature that I started working on this
spring without further modifications. I did this because:
1. I don't remember what was missing, so I can't make it better right
now anyway
2. I will not be able to work on it for a very long time and perhaps
it can be useful as a starting point
It should not break anything since the method I added to the
EmbosserWriter interface has been implemented in
AbstractEmbosserWriter and all implementations except
FileToDeviceEmbosserWriter extends this class.
The purpose of this feature is to enable an EmbosserWriter
implementation to tweak the communication with the embosser based on
the contents of the EmbosserWriter communication. This has the effect
that choices which require knowledge that a user cannot be expected to
have can be automatic and hidden. The purpose is therefore also to
avoid exposing a set of choices where some choices are predictably
invalid to the user.
To make use of this feature:
1. Modify the Embosser implementation's newEmbosserWriter methods
wrapping the currently returned EmbosserWriter object in a
BufferedEmbosserWriter and return this object
2. Modify the original EmbosserWriter implementation to make use of
the information passed to it from BufferedEmbosserWriter by overriding
the open(boolean duplex, Contract contract) method.
Since I never finished this feature, I would encourage you to test it
extensively. Also, there might be other information that can be added
to the Contract, feel free to elaborate. ;)
Best,
Joel