/
interfaces.py
42 lines (36 loc) · 1.18 KB
/
interfaces.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
""" Content-Rules interfaces
"""
from zope import schema
from zope.interface import Interface
from eea.relations.async import IAsyncService
from eea.relations.config import EEAMessageFactory as _
from plone.stringinterp.interfaces import IContextWrapper
class IRelatedItemsAction(Interface):
""" Related Items Action
"""
transition = schema.Choice(
title=_(u"Transition"),
description=_(u"Select the workflow transition to attempt"),
required=True,
vocabulary=u"plone.app.vocabularies.WorkflowTransitions"
)
related_items = schema.Bool(
title=_(u"Related items"),
required=False,
description=_(u"Attempt workflow transition on related items")
)
backward_related_items = schema.Bool(
title=_(u"Backward references"),
required=False,
description=_(u"Attempt workflow transition on backward references")
)
if 'queueJob' in IAsyncService:
asynchronous = schema.Bool(
title=_(u"Asynchronous"),
required=False,
description=_(u"Perform action asynchronous")
)
__all__ = [
IRelatedItemsAction.__name__,
IContextWrapper.__name__,
]