James jSieve
  1. James jSieve
  2. JSIEVE-56

Provide a way to determine if a keep action is implicit or explicit

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.4
    • Component/s: JSieve (Main)
    • Labels:
      None

      Description

      There's no way to distinguish an implicit keep from an explicit keep in jSieve 0.3. The Zimbra code needs this distinction because implicit keeps are affected by spam filtering and explicit keeps are not. This was possible in jSieve 0.2 with CommandStateManager.getInstance().isImplicitKeep(), but no longer possible in 0.3 after the changes for JSIEVE-26.

        Activity

        Boris Burtin created issue -
        Show
        Robert Burrell Donkin added a comment - See http://markmail.org/thread/lfieoeutduebbrkr
        Hide
        Robert Burrell Donkin added a comment -

        Making available the Context seems like the right way to approach this.

        A couple of alternatives:

        • Pass the context into every method
        • Add a setter together with an API contract

        Using a setter is only practical if MailAdapter is not concurrently reused. This needs to be looked into a little deeper.

        Show
        Robert Burrell Donkin added a comment - Making available the Context seems like the right way to approach this. A couple of alternatives: Pass the context into every method Add a setter together with an API contract Using a setter is only practical if MailAdapter is not concurrently reused. This needs to be looked into a little deeper.
        Hide
        Robert Burrell Donkin added a comment -

        There is no concurrent usage in JSieve. A caller might reasonably elect to reuse the same MailAdapter, for example by sharing the same adapter across multiple script for different users. This is unlikely to be a common use case, and the implementor could reasonably just use a ThreadLocal to store the context.

        Give that it isn't clear which methods in the API a context may be required for, it seems better to opt for the setter.

        Unless anyone jumps in with an objection, I'll implement something along these lines.

        Show
        Robert Burrell Donkin added a comment - There is no concurrent usage in JSieve. A caller might reasonably elect to reuse the same MailAdapter, for example by sharing the same adapter across multiple script for different users. This is unlikely to be a common use case, and the implementor could reasonably just use a ThreadLocal to store the context. Give that it isn't clear which methods in the API a context may be required for, it seems better to opt for the setter. Unless anyone jumps in with an objection, I'll implement something along these lines.
        Robert Burrell Donkin made changes -
        Field Original Value New Value
        Assignee Robert Burrell Donkin [ robertburrelldonkin ]
        Fix Version/s 0.4 [ 12313855 ]
        Hide
        Robert Burrell Donkin added a comment -

        Added setter for context

        Show
        Robert Burrell Donkin added a comment - Added setter for context
        Robert Burrell Donkin made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Robert Burrell Donkin
            Reporter:
            Boris Burtin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development