Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 import zope.deferredimport
00004 import zope.deprecation
00005 
00006 zope.deferredimport.deprecated(
00007     "It has been moved to plone.app.layout.navigation.interfaces. " 
00008     "This alias will be removed in Plone 4.0",
00009     INavigationRoot = 'plone.app.layout.navigation.interfaces:INavigationRoot',
00010     )
00011 
00012 zope.deferredimport.deprecated(
00013     "It has been moved to plone.app.layout.navigation.interfaces. " 
00014     "This alias will be removed in Plone 4.0",
00015     IDefaultPage = 'plone.app.layout.navigation.interfaces:IDefaultPage',
00016     )
00017 
00018 zope.deferredimport.deprecated(
00019     "It has been moved to plone.app.layout.navigation.interfaces. " 
00020     "This alias will be removed in Plone 4.0",
00021     INavigationQueryBuilder = 'plone.app.layout.navigation.interfaces:INavigationQueryBuilder',
00022     )
00023 
00024 zope.deferredimport.deprecated(
00025     "It has been moved to plone.app.layout.navigation.interfaces. " 
00026     "This alias will be removed in Plone 4.0",
00027     INavtreeStrategy = 'plone.app.layout.navigation.interfaces:INavtreeStrategy',
00028     )
00029 
00030 
00031 class INavigationBreadcrumbs(Interface):
00032 
00033     def breadcrumbs():
00034         """Breadcrumbs for Navigation.
00035         """
00036 
00037 class INavigationTabs(Interface):
00038 
00039     def topLevelTabs(actions=None, category='portal_tabs'):
00040         """Top level tabs
00041         """
00042 
00043 class INavigationTree(Interface):
00044 
00045     def navigationTreeRootPath():
00046         """Get the path to the root of the navigation tree
00047         """
00048 
00049     def navigationTree():
00050         """Navigation tree
00051         """
00052 
00053 class ISiteMap(Interface):
00054 
00055     def siteMap():
00056         """Site map
00057         """
00058 
00059 class INavigationPortlet(Interface):
00060     """Interface for portlet to display navigation tree"""
00061 
00062     def title():
00063         """The title of the navigation portlet (may be '' to fall back on default)"""
00064 
00065     def display():
00066         """Whether or not the navtree should be displayed"""
00067 
00068     def includeTop():
00069         """Whether or not to include the root element in the tree"""
00070 
00071     def navigationRoot():
00072         """Get the root object"""
00073 
00074     def rootTypeName():
00075         """Get a normalized content type name for the root object"""
00076 
00077     def createNavTree():
00078         """Build the actual tree"""
00079 
00080     def isPortalOrDefaultChild():
00081         """Determine if the context is the portal or a default-document"""
00082 
00083 
00084 class INewsPortlet(Interface):
00085     """Interface for portlet to display recent news items"""
00086 
00087     def published_news_items():
00088         """Returns 5 most recently published News Items in reverse
00089            chronological order
00090         """
00091 
00092     def all_news_link():
00093         """Returns URL, relative to the portal, of a page that display all
00094            published News Items
00095         """
00096 
00097 
00098 class IEventsPortlet(Interface):
00099     """Interface for portlet to display recent news items"""
00100 
00101     def published_events():
00102         """Returns 5 most recently published News Items in reverse
00103            chronological order
00104         """
00105 
00106     def all_events_link():
00107         """Returns URL, relative to the portal, of a page that display all
00108            published News Items
00109         """
00110 
00111     def prev_events_link():
00112         """Returns URL, relative to the portal, of a page that display all
00113            past events.
00114         """
00115 
00116 
00117 class IRecentPortlet(Interface):
00118     """Interface for portlet to display recently modified items"""
00119 
00120     def results():
00121         """Get the list of recently modified items"""
00122 
00123 
00124 class ICalendarPortlet(Interface):
00125 
00126     def DateTime():
00127         """ """
00128 
00129     def current():
00130         """ """
00131 
00132     def current_day():
00133         """ """
00134 
00135     def nextYearMax():
00136         """ """
00137 
00138     def prevYearMin():
00139         """ """
00140 
00141     def year():
00142         """ """
00143 
00144     def month():
00145         """ """
00146 
00147     def prevMonthTime():
00148         """ """
00149 
00150     def nextMonthTime():
00151         """ """
00152 
00153     def weeks():
00154         """ """
00155 
00156     def showStates():
00157         """ """
00158 
00159     def showPrevMonth():
00160         """ """
00161 
00162     def showNextMonth():
00163         """ """
00164 
00165     def getYearAndMonthToDisplay():
00166         """ """
00167 
00168     def getPreviousMonth(month, year):
00169         """ """
00170 
00171     def getNextMonth(month, year):
00172         """ """
00173 
00174     def getWeekdays(self):
00175         """Returns a list of Messages for the weekday names."""
00176 
00177     def getEnglishMonthName(self, month):
00178         """Returns the English month name."""
00179 
00180     def getMonthName(self, month):
00181         """Returns the month name as a Message."""
00182 
00183     def isToday(self, day):
00184         """Returns True if the given day and the current month and year equals
00185            today, otherwise False.
00186         """
00187 
00188 
00189 class ISitemapView(Interface):
00190     """Interface to the view that creates a site map"""
00191 
00192     def createSiteMap():
00193         """Create the site map data structure"""
00194 
00195 
00196 class IPlone(Interface):
00197     """ """
00198 
00199     def globalize():
00200         """ A method which puts all of the following view attributes into the
00201             globals of the current tal expression context (plus the
00202             toLocalizedTime method):
00203 
00204     atool = Attribute("The portal_actions tool")
00205 
00206     utool = Attribute("The portal_url tool")
00207 
00208     portal = Attribute("The portal object itself")
00209 
00210     portal_url = Attribute("The portal url")
00211 
00212     mtool = Attribute("The portal_membership tool")
00213 
00214     putils = Attribute("The plone_utils tool (PloneTool)")
00215 
00216     wtool = Attribute("The portal_workflow tool")
00217 
00218     ifacetool = Attribute("The portal_interface tool")
00219 
00220     syntool = Attribute("The portal_syndication tool")
00221 
00222     portal_title = Attribute("The title of the portal")
00223 
00224     object_title = Attribute("The title of the current object (context)")
00225 
00226     member = Attribute("The member object for the authenticated user in "
00227                        "context")
00228 
00229     checkPermission = Attribute("The checkPermission method of the membership"
00230                                 " tool")
00231 
00232     membersfolder = Attribute("The portal's Members folder")
00233 
00234     isAnon = Attribute("Boolean indicating whether the current user is "
00235                        "anonymous")
00236 
00237     actions = Attribute("The result of listFilteredActionsFor(context) in the "
00238                         "portal_actions tool")
00239 
00240     keyed_actions = Attribute("A mapping of action categories to action ids "
00241                               "to action information: "
00242                               "mapping[cat][id] == actioninfo")
00243 
00244     user_actions = Attribute("Actions in the user category")
00245 
00246     workflow_actions = Attribute("Actions in the workflow category")
00247 
00248     folder_actions = Attribute("Actions in the folder category")
00249 
00250     global_actions = Attribute("Actions in the global category")
00251 
00252     portal_tabs = Attribute("The actions for the portal tabs")
00253 
00254     wf_state = Attribute("The review_state of the current object")
00255 
00256     portal_properties = Attribute("The portal_properties tool")
00257 
00258     site_properties = Attribute("The site_properties tool")
00259 
00260     ztu = Attribute("The ZTUtils module")
00261 
00262     isFolderish = Attribute("A boolean indicating whether the object is "
00263                             "folderish")
00264 
00265     here_url = Attribute("The url of the current object")
00266 
00267     sl = Attribute("True if the left slot should be shown")
00268 
00269     sr = Attribute("True if the right slot should be shown")
00270 
00271     hidecolumns = Attribute("The css class to use for the column container"
00272                             "which determines which columns to show")
00273 
00274     default_language = Attribute("The default language of the portal")
00275 
00276     language = Attribute("The language of the current request or context.")
00277 
00278     is_editable = Attribute("A boolean indicating if the current user has "
00279                             " edit permissions in this context")
00280 
00281     isLocked = Attribute("A boolean indicating that the object is webdav "
00282                          "locked")
00283 
00284     isRTL = Attribute("A boolean indicating that the current language is a "
00285                       "right-to-left language.")
00286 
00287     visible_ids = Attribute("A boolean indicating whether to show object ids "
00288                             "to the current user")
00289 
00290     current_page_url = Attribute("The full url with query string")
00291 
00292     isContextDefaultPage = Attribute("Boolean indicating that the context is "
00293                                      "the default page of its parent folder.")
00294 
00295     isStructuralFolder = Attribute("Boolean indicating that the context is a "
00296                                    "'Structural Folder'.")
00297 
00298     Iterator = Attribute("A factory for generating sinple integer Iterators.")
00299 
00300     tabindex = Attribute("An iterator for use in creating tabindexes.")
00301 
00302     uniqueItemIndex = Attribute("An iterator for help inc reading unique "
00303                                 "html ids.")
00304     """
00305 
00306     def getCurrentUrl():
00307         """ Returns the actual url plus the query string. """
00308 
00309     def keyFilteredActions(actions=None):
00310         """ Returns a mapping of action categories to action ids to action
00311             information: mapping[cat][id] == actioninfo
00312 
00313             Optionally takes an action list, if ommitted it will be calculated
00314         """
00315 
00316     def visibleIdsEnabled():
00317         """Determines whether to show object ids based on portal and user
00318            settings.
00319         """
00320 
00321     def isRightToLeft(domain='plone'):
00322         """Is the currently selected language a right to left language"""
00323 
00324     def toLocalizedTime(time, long_format=None):
00325         """ The time parameter must be either a string that is suitable for
00326             initializing a DateTime or a DateTime object. Returns a localized
00327             string.
00328         """
00329 
00330     def isDefaultPageInFolder():
00331         """ Returns a boolean indicating whether the current context is the
00332             default page of its parent folder.
00333         """
00334 
00335     def isStructuralFolder():
00336         """Checks if a given object is a "structural folder".
00337 
00338         That is, a folderish item which does not explicitly implement
00339         INonStructuralFolder to declare that it doesn't wish to be treated
00340         as a folder by the navtree, the tab generation etc.
00341         """
00342 
00343     def hide_columns(self, column_left, column_right):
00344         """ Returns the CSS class used by the page layout hide empty
00345             portlet columns.
00346         """
00347 
00348     def navigationRootPath():
00349         """Get the current navigation root path
00350         """
00351 
00352     def navigationRootUrl():
00353         """Get the url to the current navigation root
00354         """
00355 
00356     def getParentObject():
00357         """Returns the parent of the current object, equivalent to
00358            aq_inner(aq_parent(context)), or context.aq_inner.getParentNode()
00359         """
00360 
00361     def getCurrentFolder():
00362         """If the context is the default page of a folder or is not itself a
00363            folder, the parent is returned, otherwise the object itself is
00364            returned.  This is useful for providing a context for methods
00365            which wish to act on what is considered the current folder in the
00366            ui.
00367         """
00368 
00369     def getCurrentFolderUrl():
00370         """Returns the URL of the current folder as determined by
00371            self.getCurrentFolder(), used heavily in actions.
00372         """
00373 
00374     def getCurrentObjectUrl():
00375         """Returns the URL of the current object unless that object is a
00376            folder default page, in which case it returns the parent.
00377         """
00378 
00379     def isFolderOrFolderDefaultPage():
00380         """Returns true only if the current object is either a folder (as
00381            determined by isStructuralFolder) or the default page in context.
00382         """
00383 
00384     def isPortalOrPortalDefaultPage():
00385         """Returns true only if the current object is either the portal object
00386            or the default page of the portal.
00387         """
00388 
00389     def getViewTemplateId():
00390         """Returns the template Id corresponding to the default view method of
00391            the context object.
00392         """
00393         
00394     def showEditableBorder():
00395         """Returns true if the editable border should be shown
00396         """
00397 
00398     def displayContentsTab():
00399         """Returns true if the contents tab should be displayed in the current
00400            context.  Evaluates whether the object is a folder or the default
00401            page of a folder, and checks if the user has relevant permissions.
00402         """
00403 
00404     def getIcon(item):
00405         """Returns an object which implements the IContentIcon interface and
00406            provides the informations necessary to render an icon.
00407            The item parameter needs to be adaptable to IContentIcon.
00408            Icons can be disabled globally or just for anonymous users with
00409            the icon_visibility property in site_properties."""
00410 
00411     def cropText(text, length, ellipsis):
00412         """ Crop text on a word boundary """
00413 
00414     def have_portlets(manager_name, view=None):
00415         """Determine whether a column should be shown."""