Package XSLForms :: Package Resources :: Module Login :: Class LoginResource
[show private | hide private]
[frames | no frames]

Class LoginResource

CommonResource --+    
                 |    
  XSLFormsResource --+
                     |
                    LoginResource


A login screen resource which should be modified or subclassed to define the
following attributes:

  * resource_dir
  * template_resources - including a "login" entry for the login screen
  * document_resources - including a "translations" entry

The latter attribute is optional.

The login template must define a "login" action, and provide a document
structure where the login credentials can be found through this class's
'path_to_login_element' attribute (which can be overridden or modified).
Such a structure would be as follows for the default configuration:

<login username="..." password="..."/>

Method Summary
  __init__(self, authenticator)
Initialise the resource with an 'authenticator'.
  respond_to_form(self, trans, form)
Respond to a request having the given transaction 'trans' and the given 'form' information.
    Inherited from XSLFormsResource
  clean_parameters(self, parameters)
Workaround stray zero value characters from Konqueror in XMLHttpRequest communications.
  get_in_page_resource(self, trans)
Return the in-page resource being referred to in the given transaction 'trans'.
  get_result(self, stylesheet_filenames, document, stylesheet_parameters, stylesheet_expressions, references)
Get the result of applying a transformation using stylesheets with the given 'stylesheet_filenames', the 'document' upon which the result will be based, the optional parameters as defined in the 'stylesheet_parameters' dictionary, the optional parameters as defined in the 'stylesheet_parameters' dictionary and the optional 'references' to external documents.
  prepare_fragment(self, fragment_identifier)
Prepare the output stylesheets for the given 'fragment_identifier', indicating which templates and stylesheets are to be employed in the production of output from the resource.
  prepare_initialiser(self, input_identifier, init_enumerations)
Prepare an initialiser/input transformation using the given 'input_identifier'.
  prepare_output(self, output_identifier)
Prepare the output stylesheets using the given 'output_identifier' to indicate which templates and stylesheets are to be employed in the production of output from the resource.
  prepare_parameters(self, parameters)
Prepare the stylesheet parameters from the given request 'parameters'.
  prepare_transform(self, transform_identifier)
Prepare a transformation using the given 'transform_identifier'.
  respond(self, trans)
Respond to the request described by the given transaction 'trans'.
  send_output(self, trans, stylesheet_filenames, document, stylesheet_parameters, stylesheet_expressions, references)
Send the output from the resource to the user employing the transaction 'trans', stylesheets having the given 'stylesheet_filenames', the 'document' upon which the output will be based, the optional parameters as defined in the 'stylesheet_parameters' dictionary, the optional expressions are defined in the 'stylesheet_expressions' dictionary, and the optional 'references' to external documents.
    Inherited from CommonResource
  prepare_document(self, document_identifier)
Prepare a document using the given 'document_identifier'.

Class Variable Summary
str path_to_login_element = '/login'
    Inherited from XSLFormsResource
dict in_page_resources = {}
dict init_resources = {}
dict template_resources = {}
dict transform_resources = {}
    Inherited from CommonResource
dict document_resources = {}
NoneType resource_dir = None                                                                  

Method Details

__init__(self, authenticator)
(Constructor)

Initialise the resource with an 'authenticator'.

To get the root of the application, this resource needs an attribute on
the transaction called "root".

respond_to_form(self, trans, form)

Respond to a request having the given transaction 'trans' and the given
'form' information.
Overrides:
XSLForms.Resources.WebResources.XSLFormsResource.respond_to_form

Class Variable Details

path_to_login_element

Type:
str
Value:
'/login'                                                               

Generated by Epydoc 2.1 on Wed Jun 6 01:27:25 2007 http://epydoc.sf.net