Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 class IInterfaceInformation(Interface):
00004     """A view that gives information about interfaces provided by its context
00005     """
00006     
00007     def provides(dotted_name):
00008         """Given an interface dotted name, determine if the context provides
00009         this interface.
00010         """
00011 
00012     def class_provides(dotted_name):
00013         """Given an interface dotted name, determine if the context's class 
00014         provides this interface.
00015         """
00016 
00017 # Note: We'd like these to be properties, but acquisition gets in our face
00018 # and wraps them in unexplainable ways :-(
00019 
00020 class ITools(Interface):
00021     """A view that gives access to common tools
00022     """
00023     
00024     def actions():
00025         """The portal_actions tool
00026         """
00027         
00028     def catalog():
00029         """The portal_catalog tool
00030         """
00031         
00032     def membership():
00033         """The portal_membership tool
00034         """
00035         
00036     def properties():
00037         """The portal_properties tool
00038         """
00039         
00040     def syndication():
00041         """The portal_syndication tool
00042         """
00043         
00044     def types():
00045         """The portal_types tool
00046         """
00047         
00048     def url():
00049         """The portal_url tool"""
00050 
00051     def workflow():
00052         """The portal_workflow tool"""
00053 
00054     
00055 class IPortalState(Interface):
00056     """A view that gives access to the current state of the portal
00057     """
00058     
00059     def portal():
00060         """The portal object
00061         """
00062         
00063     def portal_title():
00064         """The title of the portal object
00065         """
00066         
00067     def portal_url():
00068         """The URL of the portal object
00069         """
00070                        
00071     def navigation_root_path():
00072         """ path of the navigation root
00073         """
00074         
00075     def navigation_root_url():
00076         """The URL of the navigation root
00077         """
00078 
00079     def default_language():
00080         """The default language in the portal
00081         """
00082         
00083     def language():
00084         """The current language
00085         """
00086         
00087     def locale():
00088         """Get the current locale
00089         """
00090         
00091     def is_rtl():
00092         """Whether or not the portal is being viewed in an RTL language
00093         """
00094         
00095     def member():
00096         """The current authenticated member
00097         """
00098         
00099     def anonymous():
00100         """Whether or not the current member is Anonymous
00101         """
00102         
00103     def friendly_types():
00104         """Get a list of portal types considered "end user" types
00105         """
00106         
00107 class IContextState(Interface):
00108     """A view that gives access to the state of the current context
00109     """
00110     
00111     def current_page_url():
00112         """The URL to the current page, including template and query string.
00113         """
00114         
00115     def current_base_url():
00116         """The current "actual" URL from the request, excluding the query
00117         string.
00118         """
00119         
00120     def canonical_object():
00121         """The current "canonical" object.
00122         
00123         That is, the current object unless this object is the default page
00124         in its folder, in which case the folder is returned.
00125         """
00126         
00127     def canonical_object_url():
00128         """The URL to the current "canonical" object.
00129         
00130         That is, the current object unless this object is the default page
00131         in its folder, in which case the folder is returned.
00132         """
00133         
00134     def view_url():
00135         """URL to use for viewing
00136 
00137         Files and Images get downloaded when they are directly
00138         called, instead of with /view appended.  We want to avoid that.
00139         """
00140 
00141     def view_template_id():
00142         """The id of the view template of the context
00143         """
00144         
00145     def is_view_template():
00146         """Return True if the currentl URL (in the request) refers to the
00147         standard "view" of the context (i.e. the "view" tab).
00148         """
00149                             
00150     def object_url():
00151         """The URL of the current object
00152         """
00153         
00154     def object_title():
00155         """The prettified title of the current object
00156         """
00157         
00158     def workflow_state():
00159         """The workflow state of the current object
00160         """
00161     
00162     def parent():
00163         """The direct parent of the current object
00164         """
00165         
00166     def folder():
00167         """The current canonical folder
00168         """
00169                             
00170     def is_folderish():
00171         """True if this is a folderish object, structural or not
00172         """
00173     
00174     def is_structural_folder():
00175         """True if this is a structural folder
00176         """
00177     
00178     def is_default_page():
00179         """True if this is the default page of its folder
00180         """
00181         
00182     def is_portal_root():
00183         """True if this is the portal or the default page in the portal
00184         """
00185     
00186     def is_editable():
00187         """Whether or not the current object is editable
00188         """
00189     
00190     def is_locked():
00191         """Whether or not the current object is locked
00192         """
00193                             
00194     def actions():
00195         """The filtered actions in the context
00196         """
00197     
00198     def keyed_actions():
00199         """A mapping of action categories to action ids to
00200         action information: mapping[cat][id] == actioninfo
00201         """
00202         
00203     def portlet_assignable():
00204         """Whether or not the context is capable of having locally assigned
00205         portlets.
00206         """
00207         
00208 class IViewView(Interface):
00209     """Marker interface which specifies that the current view is, in fact,
00210     a canonical "view" of the object, e.g. what may go on the "view" tab.
00211     """