Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 from zope import schema
00003 
00004 class INameFromTitle(Interface):
00005     """An object that supports gettings it name from its title.
00006     """
00007     
00008     title = schema.TextLine(title=u"Title",
00009                             description=u"A title, which will be converted to a name",
00010                             required=True)
00011 
00012 class IReindexOnModify(Interface):
00013     """Marker interface which makes sure an object gets reindexed when
00014     it's modified.
00015     """
00016 
00017 class IBatch(Interface):
00018     """A batch splits up a large number of items over multiple pages"""
00019 
00020     size = schema.Int(title=u"The amount of items in the batch")
00021 
00022     firstpage = schema.Int(title=u"The number of the first page (always 1)")
00023 
00024     lastpage = schema.Int(title=u"The number of the last page")
00025 
00026     items_not_on_page = schema.List(
00027         title=u"All items that are in the batch but not on the current page")
00028 
00029     multiple_pages = schema.Bool(
00030         title=u"Boolean indicating wheter there are multiple pages or not")
00031 
00032     has_next = schema.Bool(
00033         title=u"Indicator for wheter there is a page after the current one")
00034 
00035     has_previous = schema.Bool(
00036         title=u"Indicator for wheter there is a page after the current one")
00037 
00038     previouspage = schema.Int(title=u"The number of the previous page")
00039 
00040     nextpage = schema.Int(title=u"The number of the nextpage page")
00041 
00042     next_item_count = schema.Int(title=u"The number of items on the next page")
00043 
00044     navlist = schema.List(
00045         title=u"List of page numbers to be used as a navigation list")
00046 
00047     show_link_to_first = schema.Bool(
00048         title=u"First page not in the navigation list")
00049 
00050     show_link_to_last = schema.Bool(
00051         title=u"Last page not in the navigation list")
00052 
00053     second_page_not_in_navlist = schema.Bool(
00054         title=u"Second page not in the navigation list")
00055 
00056     before_last_page_not_in_navlist = schema.Bool(
00057         title=u"Before last page not in the navigation list")
00058 
00059     islastpage = schema.Bool(
00060         title=u"Boolean indicating wheter the current page is the last page")
00061 
00062     previous_pages = schema.List(
00063         title=u"All previous pages that are in the navlist")
00064 
00065     next_pages = schema.List(
00066         title=u"All previous pages that are in the navlist")
00067 
00068 class IIndexableObjectWrapper(Interface):
00069     """An adapter of a (object, portal) where object is to be indexed in 
00070     portal_catalog.
00071     
00072     This should implement __getattr__(), which in turn should react
00073     when the catalog tries to get attributes to index.
00074     
00075     The update() method must be called before the catalog is given the
00076     wrapper.
00077     """
00078     
00079     def update(vars, **kwargs):
00080         """Update the wrapper with variables from e.g. the workflow
00081         tool.
00082         """