Back to index

plone3  3.1.7
directives.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 from zope.schema import TextLine, Choice
00003 from zope.configuration.fields import Path, Tokens, PythonIdentifier, \
00004         GlobalInterface, GlobalObject
00005 
00006 class IRegisterEventTypeDirective(Interface):
00007     'Register a KSS event type'
00008     
00009     name = TextLine(
00010          title=u"Name",
00011          description=u"The name of the event type plugin.",
00012          required=True,
00013          )
00014     
00015     jsfile = Path(
00016          title=u"Javascript file",
00017          description=u"The path of the javascript file that defines the plugin",
00018          required=False,
00019          )
00020     
00021 class IRegisterActionDirective(Interface):
00022     'Register a KSS action'
00023     
00024     name = TextLine(
00025          title=u"Name",
00026          description=u"The name of the action plugin.",
00027          required=True,
00028          )
00029     
00030     jsfile = Path(
00031          title=u"Javascript file",
00032          description=u"The path of the javascript file that defines the plugin",
00033          required=False,
00034          )
00035 
00036     command_factory = Choice(
00037         title=u"Command factory type",
00038         description=u"Command factory type, by default 'none'.",
00039         values=(u'none', u'global', u'selector'),
00040         required=False,
00041         )
00042 
00043     params_mandatory = Tokens(
00044         title=u"Mandatory parameters",
00045         description=u"Space separated list of mandatory parameter names",
00046         value_type=PythonIdentifier(),
00047         required=False,
00048         )
00049 
00050     params_optional = Tokens(
00051         title=u"Optional parameters",
00052         description=u"Comma separated list of optional parameter names",
00053         value_type=PythonIdentifier(),
00054         required=False,
00055         )
00056 
00057     deprecated = TextLine(
00058          title=u"Deprecated",
00059          description=u"The hint that we should give as warning about deprecation",
00060          required=False,
00061          )
00062  
00063 class IRegisterSelectorTypeDirective(Interface):
00064     'Register a KSS selector type'
00065     
00066     name = TextLine(
00067          title=u"Name",
00068          description=u"The name of the selector type plugin.",
00069          required=True,
00070          )
00071     
00072     jsfile = Path(
00073          title=u"Javascript file",
00074          description=u"The path of the javascript file that defines the plugin",
00075          required=False,
00076          )
00077 
00078 class IRegisterCommandSetDirective(Interface):
00079     'Register a KSS command set'
00080     
00081     for_ = GlobalInterface(
00082          title=u"For",
00083          description=u"The interface of view that can be adapted to this commandset",
00084          required=True,
00085          )
00086     
00087     class_ = GlobalObject(
00088          title=u"Class",
00089          description=u"The class that implements the commandset",
00090          required=True,
00091          )
00092 
00093     name = TextLine(
00094          title=u"Name",
00095          description=u"The name of the command set component.",
00096          required=True,
00097          )
00098 
00099     provides = GlobalInterface(
00100          title=u"Provides",
00101          description=u"The interface that does the adaptation on the view for this set",
00102          required=True,
00103          )
00104  
00105 class IRegisterParamProviderDirective(Interface):
00106     'Register a KSS parameter provider'
00107     
00108     name = TextLine(
00109          title=u"Name",
00110          description=u"The name of the parameter provider plugin.",
00111          required=True,
00112          )
00113     
00114     jsfile = Path(
00115          title=u"Javascript file",
00116          description=u"The path of the javascript file that defines the plugin",
00117          required=False,
00118          )