class IDescribeAction(Interface): group = DescGroupId( title=u"Group name", description=u"Identifier of the group this action belongs to.") name = DescActionId( title=u"Name", description=u"Unique identifier of the action within the group.") order = schema.Int( title=u"Order", description=u"Order in which this action should be displayed.", required=False) interface = fields.GlobalObject(title=u"Interface", required=True) permission = Permission(title=u"Permission", required=True) title = fields.MessageID(title=u"Title", required=False) description = fields.MessageID(title=u"Description", required=False) klass = fields.GlobalObject(title=u"Class", description=u""" Action definition class that builds it's own title/description. This is an alternative to title/description defined in ZCML. """, required=False)
class IBehaviorDirective(Interface): """Directive which registers a new behavior type. The registration consists of: * a global named utility registered by interface identifier * a global named utility registered by lookup name * an associated global and unnamed behavior adapter """ name = TextLine(title=u'Name', description=u'Convenience lookup name for this behavior', required=False) title = configuration_fields.MessageID( title=u'Title', description=u'A user friendly title for this behavior', required=True) description = configuration_fields.MessageID( title=u'Description', description=u'A longer description for this behavior', required=False) provides = configuration_fields.GlobalInterface( title=u'An interface to which the behavior can be adapted', description=u'This is what the conditional adapter factory will ' u'be registered as providing', required=True) marker = configuration_fields.GlobalInterface( title=u'A marker interface to be applied by the behavior', description=u'If factory is not given, then this is optional', required=False) factory = configuration_fields.GlobalObject( title=u'The factory for this behavior', description=u'If this is not given, the behavior is assumed to ' u'provide a marker interface', required=False) for_ = configuration_fields.GlobalObject( title=u'The type of object to register the conditional adapter ' u'factory for', description=u'This is optional - the default is to register the ' u'factory for zope.interface.Interface', required=False) name_only = configuration_fields.Bool( title=u'Do not register the behavior under the dotted path, but ' u'only under the given name', description=u'Use this option to register a behavior for the same ' u'provides under a different name.', required=False)
class IPortletDirective(Interface): """Directive which registers a new portlet type. The portlet should also be installed into a site using a GenericSetup portlets.xml file, for example. """ name = schema.TextLine( title=_(u"Name"), description=_(u"A unique name for the portlet. Also used for its add view."), required=True) interface = configuration_fields.GlobalInterface( title=_(u"Assignment type interface"), description=_(u"Should correspond to the public interface of the assignment"), required=True) assignment = configuration_fields.GlobalObject( title=_(u"Assignment class"), description=_(u"A persistent class storing the portlet assignment"), required=True) view_permission = schema.TextLine( title=_(u"View permission"), description=_(u"Permission used for viewing the portlet."), required=False, default=u"zope2.View" ) edit_permission = schema.TextLine( title=_(u"Edit permission"), description=_(u"Permission used for editing the portlet assignment."), required=False, default=u"plone.app.portlets.ManageOwnPortlets" ) renderer = configuration_fields.GlobalObject( title=_(u"Renderer"), description=_(u"A class which renders the portlet data provider"), required=True ) addview = configuration_fields.GlobalObject( title=_(u"Add view"), description=_(u"View used to add the assignment object"), required=True ) editview = configuration_fields.GlobalObject( title=_(u"Edit view"), description=_(u"View used to edit the assignment object (if appropriate)"), required=False )
class IWidgetDirective(IPageDirective): """ Progress bar widget directive """ for_ = fields.GlobalObject( title=u"The interface or class this view is for.", required=False ) view = fields.GlobalObject( title=_(u"View"), description=_(u"A class that provides attributes used by the view."), required=True, ) edit = fields.GlobalObject( title=_(u"Edit"), description=_(u"A class that provides attributes used by the edit."), required=True, ) name = schema.TextLine( title=u"The name of the field from ctype Schema", description=_(u"" u"E.g. prgressbar.widget.title or progressbar.widget.relatedItems"), required=False ) layer = fields.GlobalInterface( title=_(u"The layer the view is in."), description=_(u""" A skin is composed of layers. It is common to put skin specific views in a layer named after the skin. If the 'layer' attribute is not supplied, it defaults to 'default'."""), required=False, ) edit_permission = zcml.Permission( title=_(u"Edit Permission"), description=_(u"The permission needed to edit this widget."), required=False, ) view_permission = zcml.Permission( title=_(u"View Permission"), description=_(u"The permission needed to view this widget."), required=False, ) permission = zcml.Permission( title=_(u"Permission"), description=_(u"The permission needed to use the view or edit"), required=False )
class IGPGKeyringDirective(Interface): '""Schema for GPGService directive.""' factory = fields.Tokens( title="Dotted Path to component factory/factories", required=True, value_type=fields.GlobalObject(), ) name = schema.TextLine(title="GPG Name", default="", required=False) gnupghome = schema.TextLine(title="GnuPG Home Directory", default="~/.gnupg", required=False) verbose = schema.Bool(title="Verbose", default=False, required=False) useagent = schema.Bool(title="Use GPG Agent", default=True, required=False) keyring = schema.TextLine(title="Keyring filename", default=None, required=False) keyserver = schema.TextLine(title="Keyserver", required=False, default="pool.sks-keyservers.net") gpgbinary = schema.TextLine(title="GPG Binary", default="gpg2", required=False) encoding = schema.TextLine(title="Default encoding", default="utf-8", required=False)
class IContentTypeDirective(Interface): portal_type = configuration_fields.MessageID(title=_('Portal type'), description='', required=True) class_ = configuration_fields.GlobalObject(title=_('Class'), description='', required=False) schema = configuration_fields.GlobalInterface(title='', description='', required=True) behaviors = configuration_fields.Tokens( title='', description='', value_type=configuration_fields.GlobalInterface(), required=False) allowed_types = configuration_fields.Tokens( title='', description='', value_type=configuration_fields.MessageID(), required=False) add_permission = configuration_fields.MessageID( title=_('Add permission'), default=DEFAULT_ADD_PERMISSION)
class IExchangeDirective(Interface): """Schema for Custom exchange XML subdirective.""" component = fields.GlobalObject( title="Path to handler component class", required=True) backend = fields.GlobalObject( title="Backend name", required=True) base = schema.TextLine( title="Base currency for conversions", default='USD') name = schema.TextLine( title="Exchange name", default='', required=False)
class IBehaviorDirective(Interface): """Directive which registers a new behavior type. The registration consists of: * a global named utility registered by interface identifier * a global named utility registered by lookup name * an associated global and unnamed behavior adapter """ name = TextLine(title=u"Name", description=u"Convenience lookup name for this behavior", required=False) title = configuration_fields.MessageID( title=u"Title", description=u"A user friendly title for this behavior", required=True) description = configuration_fields.MessageID( title=u"Description", description=u"A longer description for this behavior", required=False) provides = configuration_fields.GlobalInterface( title=u"An interface to which the behavior can be adapted", description=u"This is what the conditional adapter factory will " u"be registered as providing", required=True) marker = configuration_fields.GlobalInterface( title=u"A marker interface to be applied by the behavior", description=u"If factory is not given, then this is optional", required=False) factory = configuration_fields.GlobalObject( title=u"The factory for this behavior", description=u"If this is not given, the behavior is assumed to " u"provide a marker interface", required=False) for_ = configuration_fields.GlobalObject( title=u"The type of object to register the conditional adapter " u"factory for", description=u"This is optional - the default is to register the " u"factory for zope.interface.Interface", required=False)
class IDescribeCrowd(Interface): group = DescGroupId(title=u"Group", description=u""" Optional identifier of the group. When specified, this description applies to the group only. """, required=False) action = DescActionId(title=u"Action", description=u""" Optional identifier of the action of the group. If specified, this description applies to the action only. """, required=False) crowd = CrowdId(title=u"Crowd", description=u"Identifier of the crowd.", required=False) crowd_factory = fields.GlobalObject( title=u"Crowd factory", description=u"Alternative way to specify the crowd.", required=False) factory = fields.GlobalObject( title=u"Description class", description=u"Optional class that to build the title/description.", required=False) title = fields.MessageID(title=u"Title", description=u""" A quick way to specify the title from ZCML. It will be assigned to the "factory" instance dict. """, required=False) description = fields.MessageID(title=u"Description", description=u""" A quick way to specify the description from ZCML. It will be assigned to the "factory" instance dict. """, required=False)
class IAllowDirective(Interface): interface = fields.GlobalObject(title=u"Interface", required=False, description=u"An interface of the object") crowds = fields.Tokens(title=u"Crowds", value_type=CrowdId(title=u"Crowd"), required=True) permission = Permission(title=u"Permission", required=True)
class IAddOn(Interface): name = configuration_fields.PythonIdentifier(title=_('Name of the addon'), description='', required=True) title = configuration_fields.MessageID(title=_('Name of the addon'), description='', required=True) handler = configuration_fields.GlobalObject( title=_('Handler for the addon'), description='', required=True)
class IBehaviorDirective(Interface): """Directive which registers a new behavior type (a global, named utility) and associated behavior adapter factory (a global, unnamed adapter) """ title = configuration_fields.MessageID( title=u"Title", description=u"A user friendly title for this behavior", required=True) description = configuration_fields.MessageID( title=u"Description", description=u"A longer description for this behavior", required=False) provides = configuration_fields.GlobalInterface( title=u"An interface to which the behavior can be adapted", description=u"This is what the conditional adapter factory will " u"be registered as providing", required=True) marker = configuration_fields.GlobalInterface( title=u"A marker interface to be applied by the behavior", description=u"If provides is given and factory is not given, then " u"this is optional", required=False) factory = configuration_fields.GlobalObject( title=u"The factory for this behavior", description=u"If this is not given, the behavior is assumed to " u"provide a marker interface", required=False) for_ = configuration_fields.GlobalObject( title=u"The type of object to register the conditional adapter " u"factory for", description=u"This is optional - the default is to register the " u"factory for zope.interface.Interface", required=False)
class ISwitchDescription(Interface): """Directive to use a replacement crowd when looking up descriptions of a crowd. May be used to use the replacement for a specific group or action. """ group = DescGroupId(title=u"Group", description=u""" Optional identifier of the group. When specified, the description will be switched within this group only. """, required=False) action = DescActionId(title=u"Action", description=u""" Optional identifier of the action of the group. When specified, the description will be switched for this action of the group only. """, required=False) crowd = CrowdId(title=u"Crowd to replace", description=u"Identifier of the crowd to replace.", required=False) crowd_factory = fields.GlobalObject( title=u"Crowd to replace factory", description=u"Alternative way to specify the crowd to replace.", required=False) use_crowd = CrowdId( title=u"Crowd", description=u"Identifier of the crowd to use for description.", required=False) use_crowd_factory = fields.GlobalObject( title=u"Crowd factory", description=u"Alternative way to specify the description crowd", required=False)
class IRuleElementDirective(Interface): """Directive which registers a new rule element. The actual directives will use IRuleActionDirective or IRuleConditionDirective """ name = schema.TextLine(title=u"Name", description=u"A unique name for the element", required=True) title = schema.TextLine( title=u"Title", description=u"A user-friendly title for the element", required=True) description = schema.Text( title=u"Description", description=u"A helpful description of the element", required=False) for_ = configuration_fields.GlobalInterface( title=u"Available for", description=u"The interface this element is available for", required=False) event = configuration_fields.GlobalInterface( title=u"Event", description=u"The event this element is available for", required=False) addview = schema.TextLine(title=u"Add view", description=u"Name of the add view", required=True) editview = schema.TextLine(title=u"Edit view", description=u"Name of the edit view", required=False) schema = configuration_fields.GlobalInterface( title=u"Schema", description=u"The schema interface for configuring the element", required=False) factory = configuration_fields.GlobalObject( title=u"Factory", description=u"A callable which can create the element", required=False)
class IPortletRendererDirective(Interface): """Register a portlet renderer, i.e. a different view of a portlet """ # The portlet data provider type must be given portlet = configuration_fields.GlobalObject( title=_("Portlet data provider type for which this renderer is used"), description=_("An interface or class"), required=True) # Use either class or template to specify the custom renderer class_ = configuration_fields.GlobalObject( title=_("Class"), description=_("A class acting as the renderer."), required=False, ) template = configuration_fields.Path( title=_(u"The name of a template that implements the renderer."), description= _(u"If given, the default renderer for this portlet will be used, but with this template" ), required=False) # Use these to discriminate the renderer. for_ = configuration_fields.GlobalObject( title=_("Context object type for which this renderer is used"), description=_("""An interface or class"""), required=False, default=Interface, ) layer = configuration_fields.GlobalObject( title=_("Browser layer for which this renderer is used"), description=_("""An interface or class"""), required=False, default=IDefaultBrowserLayer, ) view = configuration_fields.GlobalObject( title=_("Browser view type for this this renderer is used"), description=_("An interface or class"), required=False, default=IBrowserView) manager = configuration_fields.GlobalObject( title=_("Portlet manager type for which this renderer is used"), description=_("An interface or class"), required=False, default=IPortletManager)
class IExchangeDirective(Interface): """Group security declarations about a module""" factory = fields.GlobalObject( title=u"Exchange class", required=False, default=kombu.Exchange) name = schema.ASCIILine( title=u"Name of the AMQP exchange", required=True, ) type = schema.Choice( title=u"Type of distribution", required=True, default=u'direct', values=('direct', 'topic', 'fanout', 'headers'), )
class IDescribeGroup(Interface): name = DescGroupId(title=u"Name", description=u"Unique identifier of the group.") title = fields.MessageID(title=u"Title", description=u"Group title displayed to the user.", required=False) description = fields.MessageID( title=u"Description", description=u"Group description displayed to the user.", required=False) klass = fields.GlobalObject(title=u"Class", description=u""" Group definition class that builds it's own title/description. This is an alternative to title/description defined in ZCML. """, required=False)
class ICrowdDirective(Interface): name = CrowdId(title=u"Name", description=u"Identifier of the crowd") factory = fields.GlobalObject(title=u"Factory", description=u"The factory for the crowd")