avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/stdhandlers PingHandler.java
Date Mon, 19 Nov 2001 09:03:02 GMT
hammant     01/11/19 01:03:02

  Modified:    apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql
                        BasicLXSQLCreateIndexHandler.java
                        BasicLXSQLCreateTableHandler.java
                        BasicLXSQLCreateViewHandler.java
                        BasicLXSQLDeleteRowsHandler.java
                        BasicLXSQLDropIndexHandler.java
                        BasicLXSQLDropTableHandler.java
                        BasicLXSQLDropViewHandler.java
                        BasicLXSQLInsertRowsHandler.java
                        BasicLXSQLSelectSimpleHandler.java
                        BasicLXSQLUpdateRowsHandler.java
               apps/db/src/java/org/apache/avalon/db/server
                        AbstractDatabaseManager.java
                        AbstractRequestHandler.java
               apps/db/src/java/org/apache/avalon/db/server/stdhandlers
                        PingHandler.java
  Added:       apps/db/src/java/org/apache/avalon/db/server
                        DBRequestContext.java User.java
  Log:
  Start of context passing (user, current catalog)
  
  Revision  Changes    Path
  1.5       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLCreateIndexHandler.java
  
  Index: BasicLXSQLCreateIndexHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLCreateIndexHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BasicLXSQLCreateIndexHandler.java	2001/11/18 14:18:02	1.4
  +++ BasicLXSQLCreateIndexHandler.java	2001/11/19 09:03:02	1.5
  @@ -19,6 +19,7 @@
   import org.apache.avalon.db.transport.UpdateReply;
   import org.apache.avalon.db.actions.ActionException;
   import org.apache.avalon.db.actions.CreateIndex;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -29,7 +30,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public class BasicLXSQLCreateIndexHandler extends BasicLXSQLHandler {
   
  @@ -57,7 +58,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           CreateIndexRequest cir = (CreateIndexRequest) request;
           Document doc = mParser.parseLXSQLString(cir.getSql());
  
  
  
  1.4       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLCreateTableHandler.java
  
  Index: BasicLXSQLCreateTableHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLCreateTableHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicLXSQLCreateTableHandler.java	2001/11/18 14:18:02	1.3
  +++ BasicLXSQLCreateTableHandler.java	2001/11/19 09:03:02	1.4
  @@ -20,6 +20,7 @@
   import org.apache.avalon.db.actions.ActionException;
   import org.apache.avalon.db.actions.CreateTable;
   import org.apache.avalon.db.data.Column;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -31,7 +32,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class BasicLXSQLCreateTableHandler extends BasicLXSQLQueryableHandler {
   
  @@ -59,7 +60,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           CreateTableRequest ctr = (CreateTableRequest) request;
           Document doc = mParser.parseLXSQLString(ctr.getSql());
  
  
  
  1.4       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLCreateViewHandler.java
  
  Index: BasicLXSQLCreateViewHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLCreateViewHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicLXSQLCreateViewHandler.java	2001/11/18 14:18:02	1.3
  +++ BasicLXSQLCreateViewHandler.java	2001/11/19 09:03:02	1.4
  @@ -22,6 +22,7 @@
   import org.apache.avalon.db.actions.ActionException;
   import org.apache.avalon.db.actions.CreateView;
   import org.apache.avalon.db.data.Column;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -33,7 +34,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class BasicLXSQLCreateViewHandler extends BasicLXSQLQueryableHandler {
   
  @@ -61,7 +62,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           CreateViewRequest cvr = (CreateViewRequest) request;
           Document doc = mParser.parseLXSQLString(cvr.getSql());
  
  
  
  1.4       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDeleteRowsHandler.java
  
  Index: BasicLXSQLDeleteRowsHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDeleteRowsHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicLXSQLDeleteRowsHandler.java	2001/11/17 17:04:26	1.3
  +++ BasicLXSQLDeleteRowsHandler.java	2001/11/19 09:03:02	1.4
  @@ -22,6 +22,7 @@
   import org.apache.avalon.db.actions.DeleteRows;
   import org.apache.avalon.db.data.Queryable;
   import org.apache.avalon.db.data.impl.AbstractQueryable;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -32,7 +33,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class BasicLXSQLDeleteRowsHandler extends BasicLXSQLHandler {
   
  @@ -60,7 +61,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           DeleteRowsRequest cvr = (DeleteRowsRequest) request;
           Document doc = mParser.parseLXSQLString(cvr.getSql());
  
  
  
  1.2       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDropIndexHandler.java
  
  Index: BasicLXSQLDropIndexHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDropIndexHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicLXSQLDropIndexHandler.java	2001/11/19 08:39:17	1.1
  +++ BasicLXSQLDropIndexHandler.java	2001/11/19 09:03:02	1.2
  @@ -17,6 +17,7 @@
   import org.apache.avalon.db.transport.Reply;
   import org.apache.avalon.db.transport.UpdateReply;
   import org.apache.avalon.db.transport.DropIndexRequest;
  +import org.apache.avalon.db.server.DBRequestContext;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   
  @@ -25,7 +26,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class BasicLXSQLDropIndexHandler extends BasicLXSQLQueryableHandler {
   
  @@ -53,7 +54,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           DropIndexRequest dtr = (DropIndexRequest) request;
           Document doc = mParser.parseLXSQLString(dtr.getSql());
  
  
  
  1.2       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDropTableHandler.java
  
  Index: BasicLXSQLDropTableHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDropTableHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicLXSQLDropTableHandler.java	2001/11/19 08:39:17	1.1
  +++ BasicLXSQLDropTableHandler.java	2001/11/19 09:03:02	1.2
  @@ -17,6 +17,7 @@
   import org.apache.avalon.db.transport.Reply;
   import org.apache.avalon.db.transport.DropTableRequest;
   import org.apache.avalon.db.transport.UpdateReply;
  +import org.apache.avalon.db.server.DBRequestContext;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   
  @@ -25,7 +26,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class BasicLXSQLDropTableHandler extends BasicLXSQLQueryableHandler {
   
  @@ -53,7 +54,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           DropTableRequest dtr = (DropTableRequest) request;
           Document doc = mParser.parseLXSQLString(dtr.getSql());
  
  
  
  1.2       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDropViewHandler.java
  
  Index: BasicLXSQLDropViewHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLDropViewHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicLXSQLDropViewHandler.java	2001/11/19 08:39:17	1.1
  +++ BasicLXSQLDropViewHandler.java	2001/11/19 09:03:02	1.2
  @@ -17,6 +17,7 @@
   import org.apache.avalon.db.transport.Reply;
   import org.apache.avalon.db.transport.UpdateReply;
   import org.apache.avalon.db.transport.DropViewRequest;
  +import org.apache.avalon.db.server.DBRequestContext;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   
  @@ -25,7 +26,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class BasicLXSQLDropViewHandler extends BasicLXSQLQueryableHandler {
   
  @@ -53,7 +54,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           DropViewRequest dtr = (DropViewRequest) request;
           Document doc = mParser.parseLXSQLString(dtr.getSql());
  
  
  
  1.4       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLInsertRowsHandler.java
  
  Index: BasicLXSQLInsertRowsHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLInsertRowsHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicLXSQLInsertRowsHandler.java	2001/11/18 14:18:02	1.3
  +++ BasicLXSQLInsertRowsHandler.java	2001/11/19 09:03:02	1.4
  @@ -25,6 +25,7 @@
   import org.apache.avalon.db.data.ValidationException;
   import org.apache.avalon.db.data.Column;
   import org.apache.avalon.db.data.WritableColumn;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -39,7 +40,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class BasicLXSQLInsertRowsHandler extends BasicLXSQLHandler {
   
  @@ -67,7 +68,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           InsertRowsRequest cvr = (InsertRowsRequest) request;
           Document doc = mParser.parseLXSQLString(cvr.getSql());
  
  
  
  1.3       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLSelectSimpleHandler.java
  
  Index: BasicLXSQLSelectSimpleHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLSelectSimpleHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicLXSQLSelectSimpleHandler.java	2001/11/16 06:14:59	1.2
  +++ BasicLXSQLSelectSimpleHandler.java	2001/11/19 09:03:02	1.3
  @@ -19,6 +19,7 @@
   import org.apache.avalon.db.transport.ResultSetReply;
   import org.apache.avalon.db.actions.ActionException;
   import org.apache.avalon.db.actions.Select;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -29,7 +30,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class BasicLXSQLSelectSimpleHandler extends BasicLXSQLHandler {
   
  @@ -57,7 +58,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           SelectRequest cvr = (SelectRequest) request;
           Document doc = mParser.parseLXSQLString(cvr.getSql());
  
  
  
  1.3       +3 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLUpdateRowsHandler.java
  
  Index: BasicLXSQLUpdateRowsHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/handlers/lxsql/BasicLXSQLUpdateRowsHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BasicLXSQLUpdateRowsHandler.java	2001/11/17 17:04:27	1.2
  +++ BasicLXSQLUpdateRowsHandler.java	2001/11/19 09:03:02	1.3
  @@ -22,6 +22,7 @@
   import org.apache.avalon.db.actions.UpdateRows;
   import org.apache.avalon.db.data.Queryable;
   import org.apache.avalon.db.data.impl.AbstractQueryable;
  +import org.apache.avalon.db.server.DBRequestContext;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -32,7 +33,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class BasicLXSQLUpdateRowsHandler extends BasicLXSQLHandler {
   
  @@ -60,7 +61,7 @@
        * @throws ActionException
        *
        */
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
   
           UpdateRowsRequest urr = (UpdateRowsRequest) request;
           Document doc = mParser.parseLXSQLString(urr.getSql());
  
  
  
  1.22      +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/AbstractDatabaseManager.java
  
  Index: AbstractDatabaseManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/AbstractDatabaseManager.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- AbstractDatabaseManager.java	2001/11/15 14:29:57	1.21
  +++ AbstractDatabaseManager.java	2001/11/19 09:03:02	1.22
  @@ -46,7 +46,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.21 $
  + * @version $Revision: 1.22 $
    */
   public abstract class AbstractDatabaseManager extends AbstractLogEnabled
           implements Composable, Initializable {
  @@ -92,7 +92,7 @@
               if (arh == null ) {
                   return new UnknownRequestReply();
               } else {
  -                return arh.handleRequest(request);
  +                return arh.handleRequest(null, request);
               }
           } catch (ActionException ae) {
               getLogger().error("processRequest(): ActionException",ae);
  
  
  
  1.3       +1 -1      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/AbstractRequestHandler.java
  
  Index: AbstractRequestHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/AbstractRequestHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractRequestHandler.java	2001/11/17 17:04:27	1.2
  +++ AbstractRequestHandler.java	2001/11/19 09:03:02	1.3
  @@ -16,6 +16,6 @@
   
   public abstract class AbstractRequestHandler extends AbstractLogEnabled  {
   
  -    public abstract Reply handleRequest(Request request) throws ActionException;
  +    public abstract Reply handleRequest(DBRequestContext context, Request request) throws
ActionException;
   
   }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/DBRequestContext.java
  
  Index: DBRequestContext.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.server;
  
  public interface DBRequestContext  {
  
      User getUser();
      String getCurrentCatalog();
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/User.java
  
  Index: User.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.server;
  
  public interface User  {
  
      String getName();
      String getID();
  
  }
  
  
  
  1.2       +2 -1      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/stdhandlers/PingHandler.java
  
  Index: PingHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/server/stdhandlers/PingHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PingHandler.java	2001/11/15 14:29:57	1.1
  +++ PingHandler.java	2001/11/19 09:03:02	1.2
  @@ -10,6 +10,7 @@
   package org.apache.avalon.db.server.stdhandlers;
   
   import org.apache.avalon.db.server.AbstractRequestHandler;
  +import org.apache.avalon.db.server.DBRequestContext;
   import org.apache.avalon.db.transport.Reply;
   import org.apache.avalon.db.transport.Request;
   import org.apache.avalon.db.transport.PingReply;
  @@ -17,7 +18,7 @@
   
   public class PingHandler extends AbstractRequestHandler {
   
  -    public Reply handleRequest(Request request) throws ActionException {
  +    public Reply handleRequest(DBRequestContext context, Request request) throws ActionException
{
           return new PingReply();
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message