mpoeschl 2003/01/13 13:14:30
Modified: src/java/org/apache/turbine/om/security User.java
src/java/org/apache/turbine/services BaseInitableBroker.java
BaseServiceBroker.java ServiceBroker.java
src/java/org/apache/turbine/services/db TurbineDB.java
src/java/org/apache/turbine/services/intake
TurbineIntakeService.java
src/java/org/apache/turbine/services/intake/validator
BooleanValidator.java DefaultValidator.java
InitableByConstraintMap.java IntegerValidator.java
InvalidMaskException.java NumberKeyValidator.java
ValidationException.java
src/java/org/apache/turbine/services/jsp
TurbineJspService.java
src/java/org/apache/turbine/services/localization
Localization.java
src/java/org/apache/turbine/services/pool PoolService.java
src/java/org/apache/turbine/services/schedule
TurbineNonPersistentSchedulerService.java
TurbineSchedulerService.java
src/java/org/apache/turbine/services/security
BaseSecurityService.java
src/java/org/apache/turbine/services/security/db
DBSecurityService.java
src/java/org/apache/turbine/services/servlet
TurbineServletService.java
src/java/org/apache/turbine/services/session
TurbineSessionService.java
src/java/org/apache/turbine/services/velocity
TurbineVelocityService.java
src/java/org/apache/turbine/services/xmlrpc
TurbineXmlRpcService.java
src/java/org/apache/turbine/util HttpUtils.java
TurbineConfig.java
src/java/org/apache/turbine/util/template TemplateLink.java
Log:
remove unused imports
Revision Changes Path
1.4 +6 -8
jakarta-turbine-2/src/java/org/apache/turbine/om/security/User.java
Index: User.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/om/security/User.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- User.java 12 Jan 2003 12:33:11 -0000 1.3
+++ User.java 13 Jan 2003 21:14:28 -0000 1.4
@@ -25,13 +25,13 @@
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Turbine" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
- * "Apache Turbine", nor may "Apache" appear in their name, without
+ * "Apache Turbine", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -54,11 +54,9 @@
* <http://www.apache.org/>.
*/
-import java.util.Date;
-import java.util.Hashtable;
import java.io.Serializable;
+import java.util.Hashtable;
import javax.servlet.http.HttpSessionBindingListener;
-import org.apache.turbine.util.RunData;
/**
* This interface represents functionality that all users of the
1.4 +3 -6
jakarta-turbine-2/src/java/org/apache/turbine/services/BaseInitableBroker.java
Index: BaseInitableBroker.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseInitableBroker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BaseInitableBroker.java 20 Dec 2002 00:03:09 -0000 1.3
+++ BaseInitableBroker.java 13 Jan 2003 21:14:28 -0000 1.4
@@ -56,12 +56,9 @@
import java.util.Hashtable;
import java.util.Stack;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.turbine.util.TurbineException;
-
/**
* A generic implementation of <code>InitableBroker</code>.
* Functionality provided by the broker includes:
@@ -203,7 +200,7 @@
*
* @param className The name of the Initable requested.
* @return An instance of the requested Initable.
- * @exception InstantiationException, if there was a problem
+ * @exception InstantiationException if there was a problem
* during instantiation or initialization of the Initable.
*/
public Initable getInitable(String className)
@@ -249,7 +246,7 @@
* then returned.
*
* @param className The name of the class to be instantiated.
- * @exception InstantiationException, if the requested class can't
+ * @exception InstantiationException if the requested class can't
* be instantiated.
*/
protected Initable getInitableInstance(String className)
1.8 +7 -20
jakarta-turbine-2/src/java/org/apache/turbine/services/BaseServiceBroker.java
Index: BaseServiceBroker.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseServiceBroker.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- BaseServiceBroker.java 20 Dec 2002 00:07:21 -0000 1.7
+++ BaseServiceBroker.java 13 Jan 2003 21:14:28 -0000 1.8
@@ -54,24 +54,12 @@
* <http://www.apache.org/>.
*/
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.PrintWriter;
-
import java.util.ArrayList;
-import java.util.Date;
-import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Stack;
-
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
-
import org.apache.commons.lang.StringUtils;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -207,8 +195,8 @@
* that can be used by application specific
* services.
*
- * @param String name of service object
- * @param Object value of service object
+ * @param name name of service object
+ * @param value value of service object
*/
public void setServiceObject(String name, Object value)
{
@@ -262,8 +250,8 @@
String key = (String)keys.next();
String [] keyParts = StringUtils.split(key, ".");
- if ((keyParts.length == 3)
- && (keyParts[0] + ".").equals(SERVICE_PREFIX)
+ if ((keyParts.length == 3)
+ && (keyParts[0] + ".").equals(SERVICE_PREFIX)
&& ("." + keyParts[2]).equals(CLASSNAME_SUFFIX))
{
String serviceKey = keyParts[1];
@@ -318,7 +306,6 @@
* @param name The name of the service (generally the
* <code>SERVICE_NAME</code> constant of the service's interface
* definition).
- * @param data An object to use for initialization activities.
* @exception InitializationException Initialization of this
* service was not successful.
*/
@@ -490,7 +477,7 @@
*
* @param name The name of the Service requested.
* @return An instance of requested Service.
- * @exception InstantiationException, if the service is unknown or
+ * @exception InstantiationException if the service is unknown or
* can't be initialized.
*/
public Service getService(String name)
@@ -640,7 +627,7 @@
/**
* Set the application root.
*
- * @param String application root
+ * @param applicationRoot application root
*/
public void setApplicationRoot(String applicationRoot)
{
1.5 +3 -5
jakarta-turbine-2/src/java/org/apache/turbine/services/ServiceBroker.java
Index: ServiceBroker.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/ServiceBroker.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServiceBroker.java 20 Dec 2002 00:07:21 -0000 1.4
+++ ServiceBroker.java 13 Jan 2003 21:14:28 -0000 1.5
@@ -54,7 +54,6 @@
* <http://www.apache.org/>.
*/
-import java.util.Properties;
import org.apache.commons.configuration.Configuration;
@@ -96,8 +95,7 @@
* Performs early initialization of specified service.
*
* @param name The name of the service.
- * @param data An Object to use for initialization activities.
- * @exception InitializationException, if the service is unknown
+ * @exception InitializationException if the service is unknown
* or can't be initialized.
*/
void initService(String name)
@@ -126,7 +124,7 @@
*
* @param name The name of the Service requested.
* @return An instance of requested Service.
- * @exception InstantiationException, if the service is unknown or
+ * @exception InstantiationException if the service is unknown or
* can't be initialized.
*/
Service getService(String name)
1.7 +1 -2
jakarta-turbine-2/src/java/org/apache/turbine/services/db/TurbineDB.java
Index: TurbineDB.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/db/TurbineDB.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TurbineDB.java 15 Dec 2002 13:06:31 -0000 1.6
+++ TurbineDB.java 13 Jan 2003 21:14:28 -0000 1.7
@@ -58,7 +58,6 @@
import org.apache.torque.Torque;
import org.apache.torque.adapter.DB;
import org.apache.torque.map.DatabaseMap;
-import org.apache.turbine.services.TurbineServices;
import org.apache.turbine.util.TurbineException;
/**
1.9 +1 -2
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/TurbineIntakeService.java
Index: TurbineIntakeService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/TurbineIntakeService.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TurbineIntakeService.java 4 Jan 2003 04:24:45 -0000 1.8
+++ TurbineIntakeService.java 13 Jan 2003 21:14:28 -0000 1.9
@@ -69,7 +69,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
import java.util.Vector;
import javax.servlet.ServletConfig;
1.2 +6 -7
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/BooleanValidator.java
Index: BooleanValidator.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/BooleanValidator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BooleanValidator.java 3 Jan 2003 07:20:44 -0000 1.1
+++ BooleanValidator.java 13 Jan 2003 21:14:28 -0000 1.2
@@ -1,11 +1,5 @@
package org.apache.turbine.services.intake.validator;
-import java.util.Map;
-import java.util.Vector;
-import java.util.Iterator;
-import java.math.BigDecimal;
-import java.text.ParseException;
-
/* ====================================================================
* The Apache Software License, Version 1.1
*
@@ -59,6 +53,11 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
+
+import java.text.ParseException;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Vector;
/**
* Validator for boolean field types.<br><br>
1.4 +1 -3
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/DefaultValidator.java
Index: DefaultValidator.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/DefaultValidator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultValidator.java 3 Jan 2003 07:20:44 -0000 1.3
+++ DefaultValidator.java 13 Jan 2003 21:14:28 -0000 1.4
@@ -55,14 +55,12 @@
*/
import java.util.Map;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.Pattern;
import org.apache.oro.text.regex.Perl5Compiler;
import org.apache.oro.text.regex.Perl5Matcher;
-import org.apache.turbine.services.intake.IntakeException;
/**
* A validator that will compare a testValue against the following
1.4 +1 -3
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/InitableByConstraintMap.java
Index: InitableByConstraintMap.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/InitableByConstraintMap.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InitableByConstraintMap.java 11 Jan 2003 18:42:33 -0000 1.3
+++ InitableByConstraintMap.java 13 Jan 2003 21:14:28 -0000 1.4
@@ -56,8 +56,6 @@
import java.util.Map;
-import org.apache.turbine.services.intake.IntakeException;
-
/**
* This interface marks a bean/class that can have its properties set
* by values in a Map.
1.5 +1 -3
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/IntegerValidator.java
Index: IntegerValidator.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/IntegerValidator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- IntegerValidator.java 3 Jan 2003 07:20:44 -0000 1.4
+++ IntegerValidator.java 13 Jan 2003 21:14:28 -0000 1.5
@@ -56,8 +56,6 @@
import java.util.Map;
-import org.apache.turbine.services.intake.IntakeException;
-
/**
* Validates numbers with the following constraints in addition to those
* listed in DefaultValidator.
1.2 +55 -1
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/InvalidMaskException.java
Index: InvalidMaskException.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/InvalidMaskException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvalidMaskException.java 3 Jan 2003 07:20:44 -0000 1.1
+++ InvalidMaskException.java 13 Jan 2003 21:14:28 -0000 1.2
@@ -1,5 +1,59 @@
package org.apache.turbine.services.intake.validator;
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Turbine", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
import org.apache.turbine.services.intake.IntakeException;
/**
1.6 +1 -3
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/NumberKeyValidator.java
Index: NumberKeyValidator.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/NumberKeyValidator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NumberKeyValidator.java 3 Jan 2003 07:20:44 -0000 1.5
+++ NumberKeyValidator.java 13 Jan 2003 21:14:28 -0000 1.6
@@ -55,9 +55,7 @@
*/
import java.util.Map;
-
import org.apache.torque.om.NumberKey;
-import org.apache.turbine.services.intake.IntakeException;
/**
* Validates numbers with the following constraints in addition to those
1.3 +3 -3
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/ValidationException.java
Index: ValidationException.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/validator/ValidationException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ValidationException.java 3 Jan 2003 07:20:44 -0000 1.2
+++ ValidationException.java 13 Jan 2003 21:14:28 -0000 1.3
@@ -1,7 +1,5 @@
package org.apache.turbine.services.intake.validator;
-import org.apache.turbine.services.intake.IntakeException;
-
/* ====================================================================
* The Apache Software License, Version 1.1
*
@@ -55,6 +53,8 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
+
+import org.apache.turbine.services.intake.IntakeException;
/**
* An Exception to mark a failed validation
1.8 +2 -3
jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/TurbineJspService.java
Index: TurbineJspService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/jsp/TurbineJspService.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TurbineJspService.java 4 Jan 2003 04:24:45 -0000 1.7
+++ TurbineJspService.java 13 Jan 2003 21:14:29 -0000 1.8
@@ -60,7 +60,6 @@
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.configuration.Configuration;
-import org.apache.turbine.Turbine;
import org.apache.turbine.services.InitializationException;
import org.apache.turbine.services.jsp.util.JspLink;
import org.apache.turbine.services.servlet.TurbineServlet;
@@ -202,7 +201,7 @@
dispatcher.include(data.getRequest(), data.getResponse());
}
}
- catch(Exception e)
+ catch (Exception e)
{
// as JSP service is in Alpha stage, let's try hard to send the
// error message to the browser, to speed up debugging
@@ -212,7 +211,7 @@
+ filename);
e.printStackTrace(data.getOut());
}
- catch(IOException ignored)
+ catch (IOException ignored)
{
}
1.7 +2 -5
jakarta-turbine-2/src/java/org/apache/turbine/services/localization/Localization.java
Index: Localization.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/localization/Localization.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Localization.java 8 Mar 2002 18:00:24 -0000 1.6
+++ Localization.java 13 Jan 2003 21:14:29 -0000 1.7
@@ -54,13 +54,10 @@
* <http://www.apache.org/>.
*/
-import javax.servlet.http.HttpServletRequest;
import java.util.Locale;
import java.util.ResourceBundle;
-import org.apache.turbine.services.Service;
-import org.apache.turbine.services.ServiceBroker;
+import javax.servlet.http.HttpServletRequest;
import org.apache.turbine.services.TurbineServices;
-import org.apache.turbine.services.resources.TurbineResources;
import org.apache.turbine.util.RunData;
/**
1.3 +6 -7
jakarta-turbine-2/src/java/org/apache/turbine/services/pool/PoolService.java
Index: PoolService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/pool/PoolService.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PoolService.java 11 Jan 2003 18:42:34 -0000 1.2
+++ PoolService.java 13 Jan 2003 21:14:29 -0000 1.3
@@ -25,13 +25,13 @@
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Turbine" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
- * "Apache Turbine", nor may "Apache" appear in their name, without
+ * "Apache Turbine", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -54,9 +54,8 @@
* <http://www.apache.org/>.
*/
-import org.apache.turbine.util.TurbineException;
-import org.apache.turbine.util.pool.Recyclable;
import org.apache.turbine.services.factory.FactoryService;
+import org.apache.turbine.util.TurbineException;
/**
* The Pool Service extends the Factory Service by adding support
1.7 +19 -18
jakarta-turbine-2/src/java/org/apache/turbine/services/schedule/TurbineNonPersistentSchedulerService.java
Index: TurbineNonPersistentSchedulerService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/schedule/TurbineNonPersistentSchedulerService.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TurbineNonPersistentSchedulerService.java 4 Jan 2003 04:24:45 -0000 1.6
+++ TurbineNonPersistentSchedulerService.java 13 Jan 2003 21:14:29 -0000 1.7
@@ -60,8 +60,6 @@
import org.apache.commons.logging.LogFactory;
import org.apache.torque.om.NumberKey;
import org.apache.torque.om.ObjectKey;
-import org.apache.turbine.Turbine;
-import org.apache.turbine.services.InitializationException;
import org.apache.turbine.services.resources.TurbineResources;
/**
@@ -100,7 +98,8 @@
extends TurbineSchedulerService
{
/** Logging */
- private static Log log =
LogFactory.getLog(TurbineNonPersistentSchedulerService.class);
+ private static Log log = LogFactory.getLog(
+ TurbineNonPersistentSchedulerService.class);
/**
* Constructor.
@@ -120,14 +119,14 @@
*/
public void init()
{
- if ( getInit() )
+ if (getInit())
{
return;
}
try
{
- log.info ( "TurbineNonPersistentSchedulerService init()....starting!");
+ log.info("TurbineNonPersistentSchedulerService init()....starting!");
scheduleQueue = new JobQueue();
mainLoop = new MainLoop();
@@ -138,23 +137,24 @@
// for the scheduleQueue
if (!jobProps.isEmpty())
{
- for (int i=0;i<jobProps.size();i++)
+ for (int i = 0; i < jobProps.size(); i++)
{
String jobName = (String)jobProps.elementAt(i);
String jobPrefix = "scheduler.job." + jobName ;
- if ( (TurbineResources.getString(jobPrefix + ".ID", null)) ==
null)
+ if ((TurbineResources.getString(jobPrefix + ".ID", null))
+ == null)
{
throw new Exception(
- "There is an error in the TurbineResources.properties file.
\n" +
- jobPrefix + ".ID is not found.\n");
+ "There is an error in the TurbineResources.properties file.
\n"
+ + jobPrefix + ".ID is not found.\n");
}
- int sec = TurbineResources.getInt(jobPrefix + ".SECOND", -1);
- int min = TurbineResources.getInt(jobPrefix + ".MINUTE", -1);
- int hr = TurbineResources.getInt(jobPrefix + ".HOUR", -1);
- int wkday = TurbineResources.getInt(jobPrefix + ".WEEKDAY",
-1);
- int dayOfMonth = TurbineResources.getInt(jobPrefix +
".DAY_OF_MONTH", -1);
+ int sec = TurbineResources.getInt(jobPrefix + ".SECOND", -1);
+ int min = TurbineResources.getInt(jobPrefix + ".MINUTE", -1);
+ int hr = TurbineResources.getInt(jobPrefix + ".HOUR", -1);
+ int wkday = TurbineResources.getInt(jobPrefix + ".WEEKDAY", -1);
+ int dayOfMonth = TurbineResources.getInt(jobPrefix +
".DAY_OF_MONTH", -1);
JobEntry je = new JobEntry(sec,
min,
@@ -167,18 +167,19 @@
}
}
- if ( jobs != null && jobs.size() > 0 )
+ if (jobs != null && jobs.size() > 0)
{
scheduleQueue.batchLoad(jobs);
restart();
}
setInit(true);
- log.info ( "TurbineNonPersistentSchedulerService init()....finished!");
+ log.info("TurbineNonPersistentSchedulerService init()....finished!");
}
catch (Exception e)
{
- log.error ( "Cannot initialize TurbineNonPersistentSchedulerService!: "
+ e );
+ log.error("Cannot initialize TurbineNonPersistentSchedulerService!: "
+ + e );
}
}
@@ -261,7 +262,7 @@
catch(Exception e)
{
// Log problems.
- log.error ( "Problem updating Scheduled Job: " + e);
+ log.error("Problem updating Scheduled Job: " + e);
}
// Update the queue.
scheduleQueue.modify(je);
1.7 +21 -20
jakarta-turbine-2/src/java/org/apache/turbine/services/schedule/TurbineSchedulerService.java
Index: TurbineSchedulerService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/schedule/TurbineSchedulerService.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TurbineSchedulerService.java 4 Jan 2003 04:24:45 -0000 1.6
+++ TurbineSchedulerService.java 13 Jan 2003 21:14:29 -0000 1.7
@@ -60,7 +60,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.torque.util.Criteria;
-import org.apache.turbine.Turbine;
import org.apache.turbine.services.InitializationException;
import org.apache.turbine.services.TurbineBaseService;
import org.apache.turbine.services.resources.TurbineResources;
@@ -116,7 +115,7 @@
try
{
// START SCHEDULER HERE
- if ( TurbineResources.getBoolean("scheduler.enabled", false) )
+ if (TurbineResources.getBoolean("scheduler.enabled", false))
{
scheduleQueue = new JobQueue();
mainLoop = new MainLoop();
@@ -124,7 +123,7 @@
// Load all from cold storage.
List jobs = JobEntryPeer.doSelect(new Criteria());
- if ( jobs != null && jobs.size() > 0 )
+ if (jobs != null && jobs.size() > 0)
{
scheduleQueue.batchLoad(jobs);
restart();
@@ -134,13 +133,15 @@
}
else
{
- log.info ("TurbineSchedulerService was not started " +
- "because scheduler.enabled is not 'true' in the
TurbineResources.properties file.");
+ log.info("TurbineSchedulerService was not started "
+ + "because scheduler.enabled is not 'true' in the "
+ + "TurbineResources.properties file.");
}
}
catch (Exception e)
{
- throw new InitializationException("TurbineSchedulerService failed to
initialize", e);
+ throw new InitializationException(
+ "TurbineSchedulerService failed to initialize", e);
}
}
@@ -167,7 +168,7 @@
*/
public void shutdown()
{
- if(getThread() != null)
+ if (getThread() != null)
{
getThread().interrupt();
}
@@ -201,10 +202,10 @@
// Save to DB.
je.save();
}
- catch(Exception e)
+ catch (Exception e)
{
// Log problems.
- log.error ( "Problem saving new Scheduled Job: " + e);
+ log.error("Problem saving new Scheduled Job: " + e);
}
// Add to the queue.
scheduleQueue.add(je);
@@ -228,10 +229,10 @@
JobEntryPeer.doDelete(c);
}
- catch(Exception ouch)
+ catch (Exception ouch)
{
// Log problem.
- log.error ( "Problem removing Scheduled Job: " + ouch);
+ log.error("Problem removing Scheduled Job: " + ouch);
}
// Remove from the queue.
@@ -253,10 +254,10 @@
je.calcRunTime();
je.save();
}
- catch(Exception e)
+ catch (Exception e)
{
// Log problems.
- log.error ( "Problem updating Scheduled Job: " + e);
+ log.error("Problem updating Scheduled Job: " + e);
}
// Update the queue.
scheduleQueue.modify(je);
@@ -332,7 +333,7 @@
{
try
{
- while ( !Thread.interrupted() )
+ while (!Thread.interrupted())
{
// Grab the next job off the queue.
JobEntry je = scheduleQueue.getNext();
@@ -347,7 +348,7 @@
long now = System.currentTimeMillis();
long when = je.getNextRuntime();
- if ( when > now )
+ if (when > now)
{
// Wait till next runtime.
wait(when - now);
@@ -385,10 +386,10 @@
{
try
{
- for(;;)
+ for(; ; )
{
JobEntry je = nextJob();
- if ( je != null )
+ if (je != null)
{
// Start the thread to run the job.
Runnable wt = new WorkerThread(je);
@@ -401,10 +402,10 @@
}
}
}
- catch(Exception e)
+ catch (Exception e)
{
// Log error.
- log.error ( "Error running a Scheduled Job: " + e);
+ log.error("Error running a Scheduled Job: " + e);
}
finally
{
1.15 +9 -7
jakarta-turbine-2/src/java/org/apache/turbine/services/security/BaseSecurityService.java
Index: BaseSecurityService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/security/BaseSecurityService.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- BaseSecurityService.java 13 Jan 2003 00:13:22 -0000 1.14
+++ BaseSecurityService.java 13 Jan 2003 21:14:29 -0000 1.15
@@ -64,13 +64,13 @@
import org.apache.turbine.om.security.Permission;
import org.apache.turbine.om.security.Role;
import org.apache.turbine.om.security.User;
+import org.apache.turbine.services.InitializationException;
+import org.apache.turbine.services.TurbineBaseService;
import org.apache.turbine.services.TurbineServices;
-import org.apache.turbine.services.crypto.TurbineCrypto;
-import org.apache.turbine.services.crypto.CryptoService;
import org.apache.turbine.services.crypto.CryptoAlgorithm;
+import org.apache.turbine.services.crypto.CryptoService;
+import org.apache.turbine.services.crypto.TurbineCrypto;
import org.apache.turbine.services.factory.FactoryService;
-import org.apache.turbine.services.InitializationException;
-import org.apache.turbine.services.TurbineBaseService;
import org.apache.turbine.util.security.AccessControlList;
import org.apache.turbine.util.security.DataBackendException;
import org.apache.turbine.util.security.EntityExistsException;
@@ -78,7 +78,6 @@
import org.apache.turbine.util.security.PasswordMismatchException;
import org.apache.turbine.util.security.PermissionSet;
import org.apache.turbine.util.security.RoleSet;
-import org.apache.turbine.util.security.TurbineAccessControlList;
import org.apache.turbine.util.security.UnknownEntityException;
/**
@@ -113,7 +112,10 @@
/** Holds a list of all roles in the systems, for speeding up the access */
private RoleSet allRoles = null;
- /** Holds a list of all permissions in the systems, for speeding up the access
*/
+ /**
+ * Holds a list of all permissions in the systems, for speeding up the
+ * access
+ */
private PermissionSet allPermissions = null;
/** The number of threads concurrently reading security information */
1.15 +5 -10
jakarta-turbine-2/src/java/org/apache/turbine/services/security/db/DBSecurityService.java
Index: DBSecurityService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/security/db/DBSecurityService.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- DBSecurityService.java 13 Jan 2003 00:13:22 -0000 1.14
+++ DBSecurityService.java 13 Jan 2003 21:14:29 -0000 1.15
@@ -59,7 +59,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -69,10 +68,6 @@
import org.apache.turbine.om.security.Group;
import org.apache.turbine.om.security.Permission;
import org.apache.turbine.om.security.Role;
-import org.apache.turbine.om.security.SecurityObject;
-import org.apache.turbine.om.security.TurbineGroup;
-import org.apache.turbine.om.security.TurbinePermission;
-import org.apache.turbine.om.security.TurbineRole;
import org.apache.turbine.om.security.User;
import org.apache.turbine.om.security.peer.GroupPeer;
import org.apache.turbine.om.security.peer.PermissionPeer;
@@ -140,7 +135,7 @@
if (!TurbineSecurity.accountExists(user))
{
throw new UnknownEntityException("The account '"
- + user.getUserName() + "' does not
exist");
+ + user.getUserName() + "' does not exist");
}
try
{
@@ -180,12 +175,12 @@
}
catch (Exception e)
{
- throw new DataBackendException("Failed to build ACL for user '" +
- user.getUserName() + "'" , e);
+ throw new DataBackendException("Failed to build ACL for user '"
+ + user.getUserName() + "'" , e);
}
finally
{
- // notify the state modifiers that we are done creating the snapshot.
+ // notify the state modifiers that we are done creating the snapshot
unlockShared();
}
}
1.8 +17 -17
jakarta-turbine-2/src/java/org/apache/turbine/services/servlet/TurbineServletService.java
Index: TurbineServletService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/servlet/TurbineServletService.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TurbineServletService.java 4 Jan 2003 04:24:45 -0000 1.7
+++ TurbineServletService.java 13 Jan 2003 21:14:29 -0000 1.8
@@ -59,11 +59,10 @@
import java.net.URL;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
-import org.apache.turbine.Turbine;
-import org.apache.turbine.services.InitializationException;
-import org.apache.turbine.services.TurbineBaseService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.turbine.Turbine;
+import org.apache.turbine.services.TurbineBaseService;
import org.apache.turbine.util.ServletUtils;
/**
@@ -132,9 +131,9 @@
* @return an URL object or null is the uri is malformed or
* can't be resolved
*/
- public URL getResource( String uri )
+ public URL getResource(String uri)
{
- if ( servletContext == null)
+ if (servletContext == null)
{
return null;
}
@@ -143,7 +142,7 @@
try
{
- url = getServletContext().getResource( uri );
+ url = getServletContext().getResource(uri);
// work-around for Websphere 3.52
if (url != null && url.toString().startsWith("classloader:"))
{
@@ -154,7 +153,7 @@
url = new URL("file:" + getServletContext().getRealPath(uri));
}
}
- catch ( MalformedURLException e)
+ catch (MalformedURLException e)
{
//if the URL is wrong, return null
}
@@ -169,14 +168,15 @@
* @param uri the URI to resolve
* @return an InputStream on the URI content or null
*/
- public InputStream getResourceAsStream( String uri )
+ public InputStream getResourceAsStream(String uri)
{
- if ( servletContext == null) return null;
+ if (servletContext == null)
+ {
+ return null;
+ }
InputStream is = null;
-
- is = servletContext.getResourceAsStream( uri );
-
+ is = servletContext.getResourceAsStream(uri);
return is;
}
@@ -188,15 +188,15 @@
* @param uri the URI to resolve
* @return the full system path of this URI
*/
- public String getRealPath( String uri )
+ public String getRealPath(String uri)
{
- if ( getServletContext() == null || uri == null )
+ if (getServletContext() == null || uri == null)
{
return null;
}
else
{
- return getServletContext().getRealPath( uri );
+ return getServletContext().getRealPath(uri);
}
}
@@ -278,7 +278,7 @@
* @param path The String containing a path or path list.
* @return A String with the expanded path or path list.
*/
- public String expandRelative( String path )
+ public String expandRelative(String path)
{
return ServletUtils.expandRelative(getServletConfig(), path);
}
1.2 +5 -5
jakarta-turbine-2/src/java/org/apache/turbine/services/session/TurbineSessionService.java
Index: TurbineSessionService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/session/TurbineSessionService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TurbineSessionService.java 6 Jan 2003 00:34:58 -0000 1.1
+++ TurbineSessionService.java 13 Jan 2003 21:14:29 -0000 1.2
@@ -60,17 +60,17 @@
import java.util.Map;
import java.util.Vector;
import javax.servlet.http.HttpSession;
-
import org.apache.turbine.om.security.User;
-import org.apache.turbine.om.security.TurbineUser;
import org.apache.turbine.services.TurbineBaseService;
/**
- * The SessionService allows access to the current sessions of the current context.
+ * The SessionService allows access to the current sessions of the current
+ * context.
* The session objects that are cached by this service are obtained through
* a listener. The listener must be configured in your web.xml file.
*
- * Access to this service should be through
org.apache.turbine.session.TurbineSession
+ * Access to this service should be through
+ * org.apache.turbine.session.TurbineSession
*
* @author <a href="mailto:[EMAIL PROTECTED]">Quinton McCombs</a>
* @version $Id$
1.13 +12 -29
jakarta-turbine-2/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java
Index: TurbineVelocityService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TurbineVelocityService.java 4 Jan 2003 04:24:45 -0000 1.12
+++ TurbineVelocityService.java 13 Jan 2003 21:14:29 -0000 1.13
@@ -59,39 +59,22 @@
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
-
import java.util.Iterator;
import java.util.Vector;
-
import javax.servlet.ServletConfig;
-
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationConverter;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
import org.apache.turbine.Turbine;
-import org.apache.turbine.TurbineConstants;
-
import org.apache.turbine.services.InitializationException;
-
import org.apache.turbine.services.pull.TurbinePull;
-
-import org.apache.turbine.services.servlet.TurbineServlet;
-
import org.apache.turbine.services.template.BaseTemplateEngineService;
-
import org.apache.turbine.util.RunData;
-import org.apache.turbine.util.TurbineConfig;
import org.apache.turbine.util.TurbineException;
-
import org.apache.velocity.VelocityContext;
-
import org.apache.velocity.app.Velocity;
-
import org.apache.velocity.context.Context;
-
import org.apache.velocity.runtime.log.SimpleLog4JLogSystem;
/**
@@ -322,7 +305,7 @@
*
* @param context A Context.
* @param filename A String with the filename of the template.
- * @param out A OutputStream where we will write the process template as
+ * @param output A OutputStream where we will write the process template as
* a String.
*
* @throws TurbineException Any exception trown while processing will be
@@ -365,7 +348,7 @@
*
* @param context A Context.
* @param filename A String with the filename of the template.
- * @param out A OutputStream where we will write the process template as
+ * @param output A OutputStream where we will write the process template as
* a String.
* @return The character encoding applied to the resulting String.
*
@@ -570,8 +553,8 @@
configuration.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM_CLASS,
SimpleLog4JLogSystem.class.getName());
- configuration.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM +
".log4j.category",
- "velocity");
+ configuration.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM
+ + ".log4j.category", "velocity");
/*
* Get all the template paths where the velocity runtime should search
@@ -580,7 +563,7 @@
*/
String key;
Vector keys = new Vector();
- for (Iterator i = configuration.getKeys(); i.hasNext();)
+ for (Iterator i = configuration.getKeys(); i.hasNext(); )
{
key = (String) i.next();
if (key.endsWith(RESOURCE_LOADER_PATH))
@@ -597,7 +580,7 @@
int ind;
Vector paths;
String entry;
- for (Iterator i = keys.iterator(); i.hasNext();)
+ for (Iterator i = keys.iterator(); i.hasNext(); )
{
key = (String) i.next();
paths = configuration.getVector(key,null);
@@ -626,13 +609,13 @@
entry = "!/";
path = path.substring(9);
}
- path = JAR_PREFIX + "file:" +
- Turbine.getRealPath(path) + entry;
+ path = JAR_PREFIX + "file:"
+ + Turbine.getRealPath(path) + entry;
}
else if (path.startsWith(ABSOLUTE_PREFIX))
{
- path = path.substring (ABSOLUTE_PREFIX.length(),
- path.length());
+ path = path.substring(ABSOLUTE_PREFIX.length(),
+ path.length());
}
else if (!path.startsWith(JAR_PREFIX))
{
@@ -667,7 +650,7 @@
* will do its own searching to determine whether
* a template exists or not.
*
- * @param String template to search for
+ * @param template String template to search for
* @return boolean
*/
public boolean templateExists(String template)
1.12 +12 -13
jakarta-turbine-2/src/java/org/apache/turbine/services/xmlrpc/TurbineXmlRpcService.java
Index: TurbineXmlRpcService.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/xmlrpc/TurbineXmlRpcService.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TurbineXmlRpcService.java 4 Jan 2003 04:24:45 -0000 1.11
+++ TurbineXmlRpcService.java 13 Jan 2003 21:14:29 -0000 1.12
@@ -54,29 +54,28 @@
* <http://www.apache.org/>.
*/
-import org.apache.xmlrpc.WebServer;
-import org.apache.xmlrpc.XmlRpc;
-import org.apache.xmlrpc.XmlRpcClient;
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.XmlRpcServer;
-import org.apache.xmlrpc.secure.SecureWebServer;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.Socket;
-import java.net.UnknownHostException;
import java.net.URL;
+import java.net.UnknownHostException;
import java.util.Iterator;
import java.util.Vector;
import javax.servlet.ServletConfig;
import org.apache.commons.configuration.Configuration;
-import org.apache.turbine.Turbine;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.turbine.services.InitializationException;
import org.apache.turbine.services.TurbineBaseService;
import org.apache.turbine.services.xmlrpc.util.FileTransfer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.turbine.util.TurbineException;
+import org.apache.xmlrpc.WebServer;
+import org.apache.xmlrpc.XmlRpc;
+import org.apache.xmlrpc.XmlRpcClient;
+import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.XmlRpcServer;
+import org.apache.xmlrpc.secure.SecureWebServer;
/**
@@ -314,8 +313,8 @@
* Register an Object as a default handler for the service.
*
* @param handler The handler to use.
- * @exception XmlRpcException.
- * @exception IOException.
+ * @exception XmlRpcException
+ * @exception IOException
*/
public void registerHandler(Object handler)
throws XmlRpcException,
1.2 +39 -44
jakarta-turbine-2/src/java/org/apache/turbine/util/HttpUtils.java
Index: HttpUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/HttpUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HttpUtils.java 16 Aug 2001 05:09:39 -0000 1.1
+++ HttpUtils.java 13 Jan 2003 21:14:30 -0000 1.2
@@ -1,7 +1,10 @@
package org.apache.turbine.util;
-/*
- * Copyright (c) 1997-2000 The Java Apache Project. All rights reserved.
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -15,55 +18,47 @@
* the documentation and/or other materials provided with the
* distribution.
*
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the Java Apache
- * Project for use in the Apache JServ servlet engine project
- * <http://java.apache.org/>."
- *
- * 4. The names "Apache JServ", "Apache JServ Servlet Engine", "Turbine",
- * "Apache Turbine", "Turbine Project", "Apache Turbine Project" and
- * "Java Apache Project" must not be used to endorse or promote products
- * derived from this software without prior written permission.
- *
- * 5. Products derived from this software may not be called "Apache JServ"
- * nor may "Apache" nor "Apache JServ" appear in their names without
- * prior written permission of the Java Apache Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the Java Apache
- * Project for use in the Apache JServ servlet engine project
- * <http://java.apache.org/>."
- *
- * THIS SOFTWARE IS PROVIDED BY THE JAVA APACHE PROJECT "AS IS" AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JAVA APACHE PROJECT OR
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Turbine", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
*
* This software consists of voluntary contributions made by many
- * individuals on behalf of the Java Apache Group. For more information
- * on the Java Apache Project and the Apache JServ Servlet Engine project,
- * please see <http://java.apache.org/>.
- *
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
*/
import java.text.SimpleDateFormat;
-
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
-import org.apache.turbine.util.RunData;
-
/**
* This class provides utilities for handling some semi-trivial
* HTTP stuff that would othterwize be handled elsewhere.
@@ -80,7 +75,7 @@
static
{
httpDateFormat = new SimpleDateFormat(
- "EEE, dd MMM yyyyy HH:mm:ss z", Locale.US );
+ "EEE, dd MMM yyyyy HH:mm:ss z", Locale.US);
httpDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
}
@@ -110,7 +105,7 @@
*/
public static void setCacheHeaders(RunData data, int expiry)
{
- if ( expiry == 0 )
+ if (expiry == 0)
{
data.getResponse().setHeader("Pragma", "no-cache");
data.getResponse().setHeader("Cache-Control", "no-cache");
@@ -119,7 +114,7 @@
}
else
{
- Date expiryDate = new Date( System.currentTimeMillis() + expiry );
+ Date expiryDate = new Date(System.currentTimeMillis() + expiry);
data.getResponse().setHeader(
"Expires", formatHttpDate(expiryDate));
}
1.7 +2 -3
jakarta-turbine-2/src/java/org/apache/turbine/util/TurbineConfig.java
Index: TurbineConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/TurbineConfig.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TurbineConfig.java 20 Dec 2002 00:08:58 -0000 1.6
+++ TurbineConfig.java 13 Jan 2003 21:14:30 -0000 1.7
@@ -72,10 +72,9 @@
import javax.servlet.ServletContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratum.lifecycle.Initializable;
import org.apache.stratum.lifecycle.Disposable;
+import org.apache.stratum.lifecycle.Initializable;
import org.apache.turbine.Turbine;
-import org.apache.turbine.services.TurbineServices;
/**
* A class used for initalization of Turbine without a servlet container.
1.2 +9 -12
jakarta-turbine-2/src/java/org/apache/turbine/util/template/TemplateLink.java
Index: TemplateLink.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/template/TemplateLink.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TemplateLink.java 16 Aug 2001 05:10:01 -0000 1.1
+++ TemplateLink.java 13 Jan 2003 21:14:30 -0000 1.2
@@ -25,13 +25,13 @@
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Turbine" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
- * "Apache Turbine", nor may "Apache" appear in their name, without
+ * "Apache Turbine", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -54,10 +54,7 @@
* <http://www.apache.org/>.
*/
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.turbine.services.pull.ApplicationTool;
-
import org.apache.turbine.util.DynamicURI;
import org.apache.turbine.util.RunData;
import org.apache.turbine.util.ServerData;
@@ -95,7 +92,7 @@
public TemplateLink()
{
}
-
+
/**
* Constructor.
*
@@ -128,7 +125,7 @@
// we just blithely cast to RunData as if another object
// or null is passed in we'll throw an appropriate runtime
// exception.
- super.init((RunData)data);
+ super.init((RunData) data);
}
/**
@@ -159,7 +156,7 @@
public TemplateLink setPage(String t)
{
template = t;
- addPathInfo(TEMPLATE_KEY,t);
+ addPathInfo(TEMPLATE_KEY, t);
return this;
}
@@ -175,7 +172,7 @@
}
/**
- * Returns the URI. After rendering the URI, it clears the
+ * Returns the URI. After rendering the URI, it clears the
* pathInfo and QueryString portions of the DynamicURI.
*
* @return A String with the URI in the form
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>