Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/publish ProxyModule.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/publish ProxyModule.java

Author stack
Full name Michael Stack
Date 2000-10-27 16:42:05 PDT
Message User: stack
  Date: 00/10/27 16:42:05

  Modified: java/org/joist/publish ProxyModule.java
  Log:
  Can't scp from home. Using cvs to copy to sc-dev1
  
  Revision Changes Path
  1.4 +55 -1 joist/java/org/joist​/publish/ProxyModule​.java
  
  Index: ProxyModule.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/publish/ProxyM​odule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProxyModule.java 2000/10/26 19:20:34 1.3
  +++ ProxyModule.java 2000/10/27 23:42:05 1.4
  @@ -83,6 +83,7 @@
       private static final String PAGE_VAR = "page";
       public static final String POST = "POST";
       public static final String GET = "GET";
  +
   
       static private Log log = new Log("Noodle", "Noodle");
   
  @@ -122,6 +123,22 @@
           URL url = new URL(SCHEME, SERVER_NAME, SERVER_PORT, page);
           return url;
       }
  +
  +
  + /** Try to get a query from other than req.getQueryString( ).
  + *
  + * There is no possibility of getting a query from anywhere
  + * but req.getQueryString( ) in this base class so throw
  + * an exception. Subclasses may have other means (The
  + * HelmProxyModule subclass gets it out of WebMacro context).
  + *
  + * @exception NullPointerException Thrown when query is null
  + */
  + public static final String getQuery( )
  + {
  + throw new NullPointerException( "query [req.getQueryString( )] is null" );
  + }
  +
   
       /**
           This is the meat of everything. It does the proxy of the request including
  @@ -130,6 +147,25 @@
       public static final void proxyRequest(NoodleData noodleData)
           throws Exception
       {
  + proxyRequest( noodleData, null );
  + }
  +
  + /**
  + * This is the meat of everything. It does the proxy of the request including
  + * applying the pre/post filters when necessary.
  + *
  + * @param noodleData Noodle Data
  + * @param inSavedOffQuery req.getQueryString can return a null
  + * query string in circumstance where not logged in to Helm.
  + * If the caller has squirreled away the original query, pass it
  + * here. May be null.
  + *
  + * @exception Exception
  + */
  + public static final void proxyRequest(NoodleData noodleData,
  + String inSavedOffQuery)
  + throws Exception
  + {
           // setup some shortcuts
           HttpServletRequest req = noodleData.getRequest();
           HttpServletResponse res = noodleData.getResponse();
  @@ -137,9 +173,27 @@
           boolean methodGet = req.getMethod().equa​lsIgnoreCase(GET);
           boolean methodPost = req.getMethod().equa​lsIgnoreCase(POST);
   
  - // deal with QUERYSTRING data
  + // deal with QUERYSTRING data.
  + //
  + // Note, req.getQueryString( ) can return
  + // null in case where we've been bounced
  + // off to TLogin because we weren't logged in...
  + // and then TLogin comes back to Noodle. Put
  + // in check for null and alternate query
  + // string source, if one. St.Ack 10/27/2000
  + //
           String page = null;
           String query = req.getQueryString();
  + if( query == null )
  + {
  + query = inSavedOffQuery;
  + if( query == null )
  + {
  + throw new NullPointerException(
  + "query [req.getQueryString( )] is null" );
  + }
  + }
  +
           try
           {
               page = req.getParameter(PAGE_VAR);

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/publish ProxyModule.java stack Michael Stack 2000-10-27 16:42:05 PDT
Messages per page: