from zope.interface import Interface from zope.configuration.fields import GlobalObject, PythonIdentifier from zope.schema import Id, TextLine from zope.app.i18n import ZopeMessageIDFactory as _ class IPipelineDirective(Interface): package = GlobalObject( title=_("Package where the Pipeline will live in"), description=_("Python name of the package to which the pipeline" "will be added. This must identify a module using the" " full dotted name."), required=True, ) name = PythonIdentifier( title=_("The name of the pipeline."), description=_("The name pipeline within the package."), required=True, ) class IFilterSubdirective(Interface): id = TextLine( title=_("ID"), required=False, ) component = GlobalObject( title=_("Component to use"), description=_("Python name of the implementation object. This" " must identify an object in a module using the" " full dotted name. If specified, the" " ``factory`` field must be left blank."), required=False, ) factory = GlobalObject( title=_("Factory"), description=_("Python name of a factory which can create the" " implementation object. This must identify an" " object in a module using the full dotted name." " If specified, the ``component`` field must" " be left blank."), required=False, )