On Thu, Jul 2, 2009 at 1:00 AM, Boris Burtin<[email protected]> wrote:
> I'm upgrading from jSieve 0.2 to 0.3 and hit a compile problem with 
> CommandStateManager. My implementation of MailAdapter needs to know whether 
> the keep is implicit or explicit. I used to do this with 0.2:
>
> public void executeActions() throws SieveException {
> ...
> // Handle explicit and implicit delivery actions
> for (Action action : deliveryActions) {
> if (action instanceof ActionKeep) {
> CommandStateManager state = CommandStateManager.getInstance();
> if (state.isImplicitKeep()) {
> // implicit keep: this means that none of the user's rules have been matched
> // we need to check system spam filter to see if the mail is spam
> doDefaultFiling();
> } else {
> explicitKeep();
> }
>
> CommandStateManager.getInstance() was removed in 0.3. I can't figure out how 
> to get an instance of CommandStateManager or SieveContext from my MailAdapter 
> code. Can someone point me in the right direction?

the singletons have been replaced by an IoC structure

i think the right solution would be change
MailAdapter.executeActions() so that it takes a SieveContext

opinions?

i've had a bit of dig around but haven't come up with a good workaround

unless there are any objections, i think it'd be best just to alter
executeActions()

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to