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?