cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject RE: DatabaseAuthenticatorAction and other Database*Actions
Date Fri, 27 Jul 2001 19:58:41 GMT
> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> Sent: Friday, July 27, 2001 3:03 PM
> To: cocoon-dev@xml.apache.org
> Subject: Re: DatabaseAuthenticatorAction and other Database*Actions
> 
> 
> Vadim Gritsenko wrote:
> > 
> > Two questions about database actions:
> > 
> > 1) I have got a suggestion to use PreparedStatement in DatabaseAuthenticatorAction,
> > and it makes sence because all other database actions already using it.
> > Is there any problems with this change?
> 
> No problem at all.  The DatabaseAuthenticatorAction also is the least tested of all
> the Database*Actions.

Cool.


> 
> > 2) Database actions take column values from request parameters or request attributes.
> > There is a suggestion to obtain values from request methods, like getServerName
or
> > getRemoteHost, etc.
> 
> How do you propose to specify them in the configuration file?

Right now auth action uses different descriptor format then other db actions...
Thinking about common syntax for all actions, I can suggest something like this:

<employee>
  <connection>personnel</connection>
  <table name="employee_table">
...
      <!-- authenticate against username column using request.getParam("username") -->
      <value auth-request-param="username" dbcol="name" type="string"/>
      <!-- ...and server_name column using request.getServerName() -->
      <value auth-request-method="getServerName" dbcol="server_name" type="string"/>
...
  </table>
</employee>

Other suggestions on syntax are welcome - I'm not sure how it should look like.

Another though about descriptor: 
Right now auth action's descriptor have "to-session" attribute to propagate values into session.
Select action and Auth action can make use of this attribute:

      <!-- get skin to session -->
      <value session-param="skin" dbcol="skin" type="string"/>

Then, param attribute:
      <value param="department" dbcol="department_id" type="int"/>
Might be renamed as request-param:
      <value request-param="department" dbcol="department_id" type="int"/>

What do you think?


Vadim


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message