Package gavo :: Package web :: Module grend :: Class ResourceBasedPage
[frames] | no frames]

Class ResourceBasedPage

source code

                   object --+                
                            |                
       nevow.rend.DataFactory --+            
                                |            
                   object --+   |            
                            |   |            
     nevow.rend.RenderFactory --+            
                                |            
                   object --+   |            
                            |   |            
      nevow.rend.MacroFactory --+            
                                |            
                   object --+   |            
                            |   |            
 nevow.rend.ConfigurableMixin --+            
                                |            
              nevow.rend.Fragment --+        
                                    |        
   nevow.rend.ConfigurableFactory --+        
                                    |        
nevow.rend.FreeformChildMixin --+   |        
                                |   |        
      nevow.rend.ChildLookupMixin --+        
                                    |        
                      nevow.rend.Page --+    
                                        |    
                       object --+       |    
                                |       |    
           common.CommonRenderers --+   |    
                                    |   |    
                      GavoRenderMixin --+    
                                        |    
                                 GavoPage --+
                                            |
                                           ResourceBasedPage
Known Subclasses:

A base for renderers based on RDs.

It is constructed with the resource descriptor and leaves it in the rd attribute.

The preferredMethod attribute is used for generation of registry records and currently should be either GET or POST. urlUse should be one of full, base, post, or dir, in accord with VOResource.

Renderers with fixed result types should fill out resultType.

The makeAccessURL class method is called by service.getURL; it receives the service's base URL and must return a mogrified string that corresponds to an endpoint this renderer will operate on (this could be used to make a Form renderer into a ParamHTTP interface by attaching ?__nevow_form__=genForm&, and the soap renderer does nontrivial things there).

Within DaCHS, this class is mainly used as a base for ServiceBasedRenderer, since almost always only services talk to the world. However, we try to fudge render and data functions such that the sidebar works.

Instance Methods
 
__init__(self, ctx, rd)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
data_rdId(self, ctx, data) source code
 
data_serviceURL(self, type) source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from nevow.rend.Page: child_, flattenFactory, onPostFailure, onPostSuccess, rememberStuff, renderHTTP, renderString, renderSynchronously, webFormPost

Inherited from nevow.rend.Fragment: get, remember, rend

Inherited from nevow.rend.DataFactory: __providedBy__, child

Inherited from nevow.rend.RenderFactory: render_data, render_mapping, render_sequence, render_string, render_xml, renderer

Inherited from nevow.rend.MacroFactory: macro

Inherited from nevow.rend.ConfigurableMixin: getBinding, getBindingNames, getDefault, postForm

Inherited from GavoRenderMixin: data_meta, data_rd, render_authinfo, render_datameta, render_explodableMeta, render_ifadmin, render_ifdata, render_ifmeta, render_ifnodata, render_ifnoslot, render_ifownmeta, render_ifslot, render_intro, render_meta, render_metahtml, render_prependsite, render_withsidebar

Inherited from common.CommonRenderers: render_commonhead, render_getconfig, render_rootlink, render_unicode, render_urlescape

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from nevow.rend.ConfigurableFactory: configurable_, configurable_original, locateConfigurable

Inherited from nevow.rend.ChildLookupMixin: childFactory, locateChild, putChild

Inherited from nevow.rend.FreeformChildMixin: child_freeform_hand

Class Methods
 
isBrowseable(self, service)
returns True if this renderer applied to service is usable using a plain web browser.
source code
 
isCacheable(self, segments, request)
should return true if the content rendered will only change when the associated RD changes.
source code
 
makeAccessURL(cls, baseURL)
returns an accessURL for a service with baseURL to this renderer.
source code
Class Variables
  preferredMethod = 'GET'
  urlUse = 'full'
  resultType = None
hash(x)
  parameterStyle = 'clear'
  name = None
hash(x)
  __implemented__ = <implementedBy gavo.web.grend.ResourceBasedP...

Inherited from nevow.rend.Page: addSlash, afterRender, beforeRender, buffered

Inherited from nevow.rend.Fragment: docFactory, original

Inherited from GavoRenderMixin: macroPackage

Inherited from nevow.rend.ChildLookupMixin: children

Properties

Inherited from object: __class__

Method Details

__init__(self, ctx, rd)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

isCacheable(self, segments, request)
Class Method

source code 

should return true if the content rendered will only change when the associated RD changes.

request is a nevow request object. web.root.ArchiveService already makes sure that you only see GET request without arguments and without a user, so you do not need to check this.

__provides__(...)

 

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

Overrides: nevow.rend.FreeformChildMixin.__provides__

Class Variable Details

__implemented__

Value:
<implementedBy gavo.web.grend.ResourceBasedPage>