Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/security UnsecureServlet.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/security UnsecureServlet.java

Author dlr
Full name Daniel Rall
Date 2001-04-17 16:25:51 PDT
Message User: dlr
  Date: 01/04/17 16:25:51

  Modified: java/org/joist/security UnsecureServlet.java
  Log:
  Formatting changes only. No functional change.
  
  Revision Changes Path
  1.126 +67 -64 joist/java/org/joist​/security/UnsecureSe​rvlet.java
  
  Index: UnsecureServlet.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/security/Unsec​ureServlet.java,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- UnsecureServlet.java 2001/04/17 23:09:18 1.125
  +++ UnsecureServlet.java 2001/04/17 23:25:51 1.126
  @@ -82,7 +82,7 @@
    *
    * @author <a href="mailto:davidp@​dataweb-systems.com"​>David C. Pellegrini</a>
    * @author <a href="mailto:dlr@col​lab.net">Daniel Rall</a>
  - * @version $Revision: 1.125 $
  + * @version $Revision: 1.126 $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999-2001 CollabNet, Inc.
  @@ -516,11 +516,11 @@
        * <p>
        * Subclasses should both override and invoke this method.
        *
  - * @param context the WebContext partially populated by WMServlet
  - * @param connection a JDBC database connection
  - * @return the name of the Template for formatting the WebContext data
  - * @exception HandlerException
  - * @exception RedirectException
  + * @param context the WebContext partially populated by WMServlet
  + * @param connection a JDBC database connection
  + * @return the name of the Template for formatting the WebContext data
  + * @exception HandlerException
  + * @exception RedirectException
        */
       protected String processRequest (Connection connection, WebContext context)
           throws HandlerException, RedirectException
  @@ -549,9 +549,12 @@
   
           //Adding the TIGRIS_VERSIOn, TIGRIS_BUILD_NUMBER and the instance
           //into the context
  - context.put("tigrisVersion", myProperties.getProp​erty("TIGRIS_VERSION​"));
  - context.put("tigrisB​uildNumber", myProperties.getProp​erty("TIGRIS_BUILD_N​UMBER"));
  - context.put("tigrisB​uildInstance",myProp​erties.getProperty("​tigrisBuildInstance"​));
  + context.put("tigrisVersion",
  + myProperties.getProp​erty("TIGRIS_VERSION​"));
  + context.put("tigrisB​uildNumber",
  + myProperties.getProp​erty("TIGRIS_BUILD_N​UMBER"));
  + context.put("tigrisB​uildInstance",
  + myProperties.getProp​erty("tigrisBuildIns​tance"));
           context.put("hostnam​e",myProperties.getP​roperty("hostname"))​;
           
           // Check whether we need to redirect based on protocol (scheme).
  @@ -651,7 +654,9 @@
               myProperties.getProp​erty("BRAND_TEMPLATE​_ROOT");
           context.put("BRAND_T​EMPLATE_ROOT", brandTemplateRoot);
   
  - String templateDirectory = myProperties.getProp​erty("servletDirecto​ry");
  + String templateDirectory =
  + myProperties.getProp​erty("servletDirecto​ry");
  +
           context.put("servletDirectory", templateDirectory);
   
           String documentRoot = myProperties.getProp​erty("documentRoot")​;
  @@ -697,8 +702,8 @@
           String schemeAndDomain = URL.schemeAndDomain(​context).toString();​
           context.put(SCHEME_A​ND_DOMAIN_KEY, schemeAndDomain);
   
  - // Put following into context specifically for a webmacro test whether to
  - // show search or not but they maybe of general utility.
  + // Put following into context specifically for a webmacro test whether
  + // to show search or not but they maybe of general utility.
           if ( haveValue( request.getPathInfo() ) )
               context.put( "PATH_INFO", request.getPathInfo( ) );
           if ( haveValue( request.getServletPath() ) )
  @@ -785,17 +790,16 @@
           {
               throw new HandlerException(e.g​etMessage());
           }
  -
       }
   
       /**
        * Redirect to use a different scheme, such as http or https.
        *
  - * @param context A WebContext partially populated by WMServlet
  - * @param newScheme the scheme to use
  - * @param servletName The name of the servlet to redirect to
  - * @exception HandlerException
  - * @exception RedirectURLException
  + * @param context A WebContext partially populated by WMServlet
  + * @param newScheme the scheme to use
  + * @param servletName The name of the servlet to redirect to
  + * @exception HandlerException
  + * @exception RedirectURLException
        */
       protected void redirectForScheme (WebContext context, String newScheme,
                                         String servletName)
  @@ -841,10 +845,9 @@
   
   
       /**
  - * Redirect to the site home page.
  - *
  - * Construct the home page URL from properties specified in zone.properties.
  - * If the port number is not port 80, include it in the URL.
  + * Redirect to the site home page. Construct the home page URL from
  + * properties specified in <code>zone.pro​perties</code>​. If the port
  + * number is not port 80, include it in the URL.
        *
        * @param context The WebContext partially populated by WMServlet.
        *
  @@ -1033,9 +1036,9 @@
       /**
        * Redirect to the detoured page.
        *
  - * @param context the WebContext partially populated by WMServlet
  - * @exception HandlerException
  - * @exception RedirectException
  + * @param context the WebContext partially populated by WMServlet
  + * @exception HandlerException
  + * @exception RedirectException
        */
       protected void redirectToDetour (WebContext context)
           throws HandlerException, RedirectException
  @@ -1065,7 +1068,7 @@
       /**
        * Sets the target page of a detour to the specified page.
        *
  - * @param context the WebContext partially populated by WMServlet
  + * @param context the WebContext partially populated by WMServlet
        */
       protected void setAsDetour (WebContext context)
       {
  @@ -1079,7 +1082,7 @@
        * If the page is not on the stack, do nothing; otherwise pop the stack
        * until it is removed.
        *
  - * @param context the WebContext partially populated by WMServlet
  + * @param context the WebContext partially populated by WMServlet
        */
       protected void removeAsCancel (WebContext context)
       {
  @@ -1110,10 +1113,10 @@
        * object ID is found in the context, the value is stored in the session
        * as the most recent ID of that type.
        *
  - * @param context the WebContext partially populated by WMServlet
  - * @param objectType the name of the type of object
  - * @return a String representation of the object ID
  - * @exception HandlerException
  + * @param context the WebContext partially populated by WMServlet
  + * @param objectType the name of the type of object
  + * @return a String representation of the object ID
  + * @exception HandlerException
        */
       protected String getObjectID (WebContext context, String objectType)
           throws HandlerException
  @@ -1142,10 +1145,10 @@
        * If the object's name is found in the context, the value is stored in
        * the session as the most recent name of that type.
        *
  - * @param context the WebContext partially populated by WMServlet
  - * @param objectType the name of the type of object
  - * @return a String with the name or title
  - * @exception HandlerException
  + * @param context the WebContext partially populated by WMServlet
  + * @param objectType the name of the type of object
  + * @return a String with the name or title
  + * @exception HandlerException
        */
       protected String getObjectName (WebContext context, String objectType)
           throws HandlerException
  @@ -1172,9 +1175,9 @@
        * Determines whether the user has the required access permission.
        * For unsecured servlets, access is always permitted.
        *
  - * @param permissionName the name of the required permission
  - * @param userPermissions the set of permissions for the user
  - * @return always returns true
  + * @param permissionName the name of the required permission
  + * @param userPermissions the set of permissions for the user
  + * @return always returns true
        */
       protected boolean accessAllowed (String permissionName,
                                        PermissionSet userPermissions)
  @@ -1203,7 +1206,7 @@
           }
   
           //FIX: [davidp] is it really necessary or desireable to add sMgr to the
  - // context? We just want to get the instance of SessionManager, no more.
  + //context? We just want to get the instance of SessionManager, no more.
           context.put("SessionManager", sMgr);
           return sMgr;
       }
  @@ -1213,9 +1216,9 @@
        * Returns the data layer manager object for this session.
        *
        * @param context The WebContext partially populated by WMServlet.
  - * @return The data layer manager for this session.
  + * @return The data layer manager for this session.
        */
  - protected final DataManager getDataManager (WebContext context)
  + protected final DataManager getDataManager (WebContext context)
       {
           return getSessionManager(co​ntext).getDataManage​r();
       }
  @@ -1282,36 +1285,36 @@
       public void start()
           throws ServletException
       {
  - // Set up myProperties to supply values with the precedence:
  - // 1. servlet properties
  - // 2. application properties (future)
  - // 3. site properties
  - // 4. zone properties
  - // 5. System properties
  + // Set up myProperties to supply values with the precedence:
  + // 1. servlet properties
  + // 2. application properties (future)
  + // 3. site properties
  + // 4. zone properties
  + // 5. System properties
   
  - // Start by reading the initialization parameters into a Properties
  - // object. Make the System properties supply defaults.
  + // Start by reading the initialization parameters into a Properties
  + // object. Make the System properties supply defaults.
   
  - Properties initParameters = new Properties(System.ge​tProperties());
  - ServletConfig config = getServletConfig();
  + Properties initParameters = new Properties(System.ge​tProperties());
  + ServletConfig config = getServletConfig();
           if (config == null)
           {
               throw new ServletException("ServletConfig is null");
           }
  +
  + Enumeration parameterNames = config.getInitParameterNames();
  + String paramName;
  + while (parameterNames.hasM​oreElements())
  + {
  + paramName = (String)parameterNam​es.nextElement();
  + initParameters.put(paramName, config.getInitParame​ter(paramName));
  + }
   
  - Enumeration parameterNames = config.getInitParameterNames();
  - String paramName;
  - while (parameterNames.hasM​oreElements())
  - {
  - paramName = (String)parameterNam​es.nextElement();
  - initParameters.put(paramName, config.getInitParame​ter(paramName));
  - }
  -
  - // Get the name of the site properties file from the zone properties,
  - // then open the file and load the properties. Make the zone
  - // properties supply defaults.
  - Properties siteProperties = new Properties(initParameters);
  - String sitePropertiesFile =
  + // Get the name of the site properties file from the zone properties,
  + // then open the file and load the properties. Make the zone
  + // properties supply defaults.
  + Properties siteProperties = new Properties(initParameters);
  + String sitePropertiesFile =
               initParameters.getPr​operty("siteProperti​es");
   
           if (sitePropertiesFile != null)

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

Messages

Show all messages in topic

CVS update: joist/java/org/joist/security UnsecureServlet.java dlr Daniel Rall 2001-04-17 16:25:51 PDT
Messages per page: