summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/workflow.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Simplify the implementation.Barry Warsaw2016-10-171-11/+3
| | | | | | | | | | | | | | | | | | | | | | This merges the SubscriptionManager and UnsubscriptionManager into a single SubscriptionManager implementation that handles both register() and unregister(). This allows us to use direct class-based adaptation instead of the more clunky getAdapter() API. We can also eliminate the funky _get_workflow() implementation detail. This has a couple of side-effects. .confirm() must lookup the token in the pendings database and pull out the pending type, dispatching to the proper class depending on the type, or raising a LookupError if the token is None or there is no pendable associated with the given token. This feels like an acceptable trade-off. However, this *also* means that IWorkflowStateManager must lose its 'name' argument in its methods. That's because we won't actually know the name until its too late. Honestly, the name wasn't providing much value anyway (it was always the subclass's name), so losing that seems fine too. The complication here is that the name was a primary key in the 'workflowstate' table, so we need to add its removal in the database migration.
* Clean up the interfaces directory.Barry Warsaw2016-03-251-8/+3
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Full test suite passes.Barry Warsaw2015-04-141-4/+13
| | | | | | | | | | | | | * Make sure Registrar.discard() removces any workflow state manager state associated with the token, and that this is flushed to SA. * Adjust the email commands to the new IRegistrar API. * Update the IRegistrar interface. * Add IWorkflowStateManager.discard() and make `count` an attribute/property. * Mark two tests as expected failures due to LP: #1444184.
* * Give the workflow state manager a count method.Barry Warsaw2015-04-131-0/+5
| | | | | * The workflow state manager no longer allows updates via .save(). * Restoring a workflow state evicts the record from the database.
* Handle save/restore of the subscription workflow.Barry Warsaw2015-04-131-7/+7
| | | | | | | | | | To handle the case of restoring a saved workflow, allow the subscriber to be None in the constructor, but assert that it is not None after the first workflow step. Add setters/getters for handling save/restore. In the base workflow interface, rename key to token.
* Fix some typos.Barry Warsaw2015-03-301-2/+2
|
* Refactorings and tests.Barry Warsaw2015-03-291-0/+66
* Move the basic Workflow class to a module in mailman.app. * Rename the interface and model modules. * Update the configure.zcml. * Minor style fixes. * Add a test for the workflow model.