You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2003/04/07 17:34:54 UTC
cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/util CookieParser.java
henning 2003/04/07 08:34:54
Modified: src/java/org/apache/turbine/services Service.java
src/java/org/apache/turbine/services/cache
GlobalCacheService.java
src/java/org/apache/turbine/services/crypto
CryptoService.java
src/java/org/apache/turbine/services/factory
FactoryService.java
src/java/org/apache/turbine/services/intake
IntakeService.java
src/java/org/apache/turbine/services/localization
LocalizationService.java
src/java/org/apache/turbine/services/mimetype
MimeTypeService.java
src/java/org/apache/turbine/services/naming
NamingService.java
src/java/org/apache/turbine/services/pool PoolService.java
src/java/org/apache/turbine/services/schedule
ScheduleService.java
src/java/org/apache/turbine/services/xmlrpc
XmlRpcService.java
src/java/org/apache/turbine/services/xslt XSLTService.java
src/java/org/apache/turbine/util CookieParser.java
Log:
remove "public" and "static final" from various interfaces.
Revision Changes Path
1.7 +2 -2 jakarta-turbine-2/src/java/org/apache/turbine/services/Service.java
Index: Service.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/Service.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Service.java 9 Mar 2003 03:06:24 -0000 1.6
+++ Service.java 7 Apr 2003 15:34:51 -0000 1.7
@@ -73,7 +73,7 @@
extends Initable
{
/** The name of this service. */
- static final String SERVICE_NAME = "Service";
+ String SERVICE_NAME = "Service";
/**
* Provides a Service with a reference to the ServiceBroker that
1.7 +2 -2 jakarta-turbine-2/src/java/org/apache/turbine/services/cache/GlobalCacheService.java
Index: GlobalCacheService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/cache/GlobalCacheService.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- GlobalCacheService.java 9 Mar 2003 03:06:25 -0000 1.6
+++ GlobalCacheService.java 7 Apr 2003 15:34:52 -0000 1.7
@@ -67,7 +67,7 @@
public interface GlobalCacheService
extends Service
{
- static final String SERVICE_NAME = "GlobalCacheService";
+ String SERVICE_NAME = "GlobalCacheService";
/**
* Gets a cached object given its id (a String).
1.6 +2 -2 jakarta-turbine-2/src/java/org/apache/turbine/services/crypto/CryptoService.java
Index: CryptoService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/crypto/CryptoService.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CryptoService.java 9 Mar 2003 03:06:26 -0000 1.5
+++ CryptoService.java 7 Apr 2003 15:34:52 -0000 1.6
@@ -76,7 +76,7 @@
extends Service
{
/** The name of the service */
- static final String SERVICE_NAME = "CryptoService";
+ String SERVICE_NAME = "CryptoService";
/**
* Returns a CryptoAlgorithm Object which represents the requested
1.5 +2 -2 jakarta-turbine-2/src/java/org/apache/turbine/services/factory/FactoryService.java
Index: FactoryService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/factory/FactoryService.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FactoryService.java 9 Mar 2003 03:06:26 -0000 1.4
+++ FactoryService.java 7 Apr 2003 15:34:52 -0000 1.5
@@ -71,7 +71,7 @@
/**
* The key under which this service is stored in TurbineServices.
*/
- static final String SERVICE_NAME = "FactoryService";
+ String SERVICE_NAME = "FactoryService";
/**
* Gets an instance of a named class.
1.8 +9 -8 jakarta-turbine-2/src/java/org/apache/turbine/services/intake/IntakeService.java
Index: IntakeService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/IntakeService.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- IntakeService.java 9 Mar 2003 03:06:26 -0000 1.7
+++ IntakeService.java 7 Apr 2003 15:34:52 -0000 1.8
@@ -55,6 +55,7 @@
*/
import java.beans.IntrospectionException;
+
import java.lang.reflect.Method;
import org.apache.turbine.services.intake.model.Group;
@@ -81,34 +82,34 @@
/**
* The key under which this service is stored in TurbineServices.
*/
- static final String SERVICE_NAME = "IntakeService";
+ String SERVICE_NAME = "IntakeService";
/**
* The property specifying the location of the xml specification.
*/
- static final String XML_PATH = "xml.path";
+ String XML_PATH = "xml.path";
/**
* The default location of the xml specification.
*/
- static final String XML_PATH_DEFAULT = "WEB-INF/conf/intake.xml";
+ String XML_PATH_DEFAULT = "WEB-INF/conf/intake.xml";
/**
- * The property specifying the location where a serialized version of
+ * The property specifying the location where a serialized version of
* the xml specification can be written for faster restarts..
*/
- static final String SERIAL_XML = "serialize.path";
+ String SERIAL_XML = "serialize.path";
/**
* The default location where a serialized version of
* the xml specification can be written for faster restarts..
*/
- static final String SERIAL_XML_DEFAULT = "WEB-INF/appData.ser";
+ String SERIAL_XML_DEFAULT = "WEB-INF/appData.ser";
/**
* The default pool capacity.
*/
- static final int DEFAULT_POOL_CAPACITY = 1024;
+ int DEFAULT_POOL_CAPACITY = 1024;
/**
* Gets an instance of a named group either from the pool
1.8 +36 -6 jakarta-turbine-2/src/java/org/apache/turbine/services/localization/LocalizationService.java
Index: LocalizationService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/localization/LocalizationService.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- LocalizationService.java 9 Mar 2003 03:06:29 -0000 1.7
+++ LocalizationService.java 7 Apr 2003 15:34:52 -0000 1.8
@@ -61,11 +61,19 @@
import org.apache.turbine.services.Service;
/**
- * Provides localization functionality using the interface provided by
- * <code>ResourceBundle</code>.
+ * <p>Provides localization functionality using the interface provided
+ * by <code>ResourceBundle</code>, plus leverages a "search path"
+ * style traversal of the <code>ResourceBundle</code> objects named by
+ * the <code>locale.default.bundles</code> to discover a value for a
+ * given key.</p>
+ *
+ * <p>It is suggested that one handle
+ * <a href="http://www.math.fu-berlin.de/~rene/www/java/tutorial/i18n/message/messageFormat.html">dealing with concatenated messages</a>
+ * using <code>MessageFormat</code> and properties files.</p>
*
* @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
* @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
+ * @author <a href="mailto:leonardr@collab.net">Leonard Richardson</a>
* @version $Id$
*/
public interface LocalizationService
@@ -74,12 +82,24 @@
/**
* The name of this service.
*/
- static final String SERVICE_NAME = "LocalizationService";
+ String SERVICE_NAME = "LocalizationService";
/**
* A constant for the HTTP <code>Accept-Language</code> header.
*/
- static final String ACCEPT_LANGUAGE = "Accept-Language";
+ String ACCEPT_LANGUAGE = "Accept-Language";
+
+ /**
+ * Retrieves the default language (as specified in the config
+ * file).
+ */
+ String getDefaultLanguage();
+
+ /**
+ * Retrieves the default country (as specified in the config
+ * file).
+ */
+ String getDefaultCountry();
/**
* Retrieves the name of the default bundle (as specified in the
@@ -89,6 +109,15 @@
String getDefaultBundleName();
/**
+ * Retrieves the list of names of bundles to search by default for
+ * <code>ResourceBundle</code> keys (as specified in the config
+ * file).
+ *
+ * @return The list of configured bundle names.
+ */
+ String[] getBundleNames();
+
+ /**
* Convenience method to get a default ResourceBundle.
*
* @return A localized ResourceBundle.
@@ -96,7 +125,8 @@
ResourceBundle getBundle();
/**
- * Convenience method to get a ResourceBundle based on name.
+ * Returns a ResourceBundle given the bundle name and the default
+ * locale information supplied by the configuration.
*
* @param bundleName Name of bundle.
* @return A localized ResourceBundle.
1.4 +2 -2 jakarta-turbine-2/src/java/org/apache/turbine/services/mimetype/MimeTypeService.java
Index: MimeTypeService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/mimetype/MimeTypeService.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MimeTypeService.java 9 Mar 2003 03:06:29 -0000 1.3
+++ MimeTypeService.java 7 Apr 2003 15:34:52 -0000 1.4
@@ -75,7 +75,7 @@
/**
* The name of the service.
*/
- static final String SERVICE_NAME = "MimeTypeService";
+ String SERVICE_NAME = "MimeTypeService";
/**
* Sets a MIME content type mapping to extensions to the map.
1.5 +4 -3 jakarta-turbine-2/src/java/org/apache/turbine/services/naming/NamingService.java
Index: NamingService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/naming/NamingService.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NamingService.java 9 Mar 2003 03:06:29 -0000 1.4
+++ NamingService.java 7 Apr 2003 15:34:53 -0000 1.5
@@ -65,9 +65,10 @@
* @author <a href="mailto:greg@shwoop.com">Greg Ritter</a>
* @version $Id$
*/
-public interface NamingService extends Service
+public interface NamingService
+ extends Service
{
- static final String SERVICE_NAME = "NamingService";
+ String SERVICE_NAME = "NamingService";
/**
* Return the Context with the specified name.
1.6 +5 -5 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PoolService.java 9 Mar 2003 03:06:30 -0000 1.5
+++ PoolService.java 7 Apr 2003 15:34:53 -0000 1.6
@@ -77,12 +77,12 @@
/**
* The key under which this service is stored in TurbineServices.
*/
- static final String SERVICE_NAME = "PoolService";
+ String SERVICE_NAME = "PoolService";
/**
* The default pool capacity.
*/
- static final int DEFAULT_POOL_CAPACITY = 128;
+ int DEFAULT_POOL_CAPACITY = 128;
/**
* Gets an instance of a specified class either from the pool
@@ -106,8 +106,8 @@
* @throws TurbineException if recycling fails.
*/
Object getInstance(Class clazz,
- Object params[],
- String signature[])
+ Object params[],
+ String signature[])
throws TurbineException;
/**
1.6 +12 -13 jakarta-turbine-2/src/java/org/apache/turbine/services/schedule/ScheduleService.java
Index: ScheduleService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/schedule/ScheduleService.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ScheduleService.java 9 Mar 2003 03:06:30 -0000 1.5
+++ ScheduleService.java 7 Apr 2003 15:34:53 -0000 1.6
@@ -70,13 +70,13 @@
extends Service
{
/** Name of service */
- public static final String SERVICE_NAME = "SchedulerService";
+ String SERVICE_NAME = "SchedulerService";
/** TR.props key for intially activating the scheduler thread */
- public static final String INTIALLY_ACTIVE = "enabled";
+ String INTIALLY_ACTIVE = "enabled";
/** TR.props key for the logger */
- public static final String LOGGER_NAME = "scheduler";
+ String LOGGER_NAME = "scheduler";
/**
* Get a specific Job from Storage.
@@ -85,7 +85,7 @@
* @return A JobEntry.
* @exception TurbineException could not retreive job
*/
- public JobEntry getJob(int oid)
+ JobEntry getJob(int oid)
throws TurbineException;
/**
@@ -94,7 +94,7 @@
* @param je A JobEntry with the job to add.
* @throws TurbineException job could not be added
*/
- public void addJob(JobEntry je)
+ void addJob(JobEntry je)
throws TurbineException;
/**
@@ -103,7 +103,7 @@
* @param je A JobEntry with the job to modify
* @throws TurbineException job could not be updated
*/
- public void updateJob(JobEntry je)
+ void updateJob(JobEntry je)
throws TurbineException;
/**
@@ -112,7 +112,7 @@
* @param je A JobEntry with the job to remove.
* @exception TurbineException job could not be removed
*/
- public void removeJob(JobEntry je)
+ void removeJob(JobEntry je)
throws TurbineException;
/**
@@ -120,24 +120,23 @@
*
* @return A List of jobs.
*/
- public List listJobs();
+ List listJobs();
/**
* Determines if the scheduler service is currently active.
*
* @return Status of the scheduler service.
*/
- public boolean isEnabled();
+ boolean isEnabled();
/**
* Starts the scheduler if not already running.
*/
- public void startScheduler();
+ void startScheduler();
/**
* Stops the scheduler if ti is currently running.
*/
- public void stopScheduler();
+ void stopScheduler();
}
-
1.8 +52 -50 jakarta-turbine-2/src/java/org/apache/turbine/services/xmlrpc/XmlRpcService.java
Index: XmlRpcService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/xmlrpc/XmlRpcService.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XmlRpcService.java 9 Mar 2003 03:06:35 -0000 1.7
+++ XmlRpcService.java 7 Apr 2003 15:34:53 -0000 1.8
@@ -55,7 +55,9 @@
*/
import java.io.InputStream;
+
import java.net.URL;
+
import java.util.Vector;
import org.apache.turbine.services.Service;
@@ -74,7 +76,7 @@
extends Service
{
/** TurbineXmlRpcService. */
- static final String SERVICE_NAME = "XmlRpcService";
+ String SERVICE_NAME = "XmlRpcService";
/**
* Execute a remote procedure call.
@@ -85,9 +87,9 @@
* @return An Object.
* @exception TurbineException
*/
- public Object executeRpc(URL url,
- String methodName,
- Vector params)
+ Object executeRpc(URL url,
+ String methodName,
+ Vector params)
throws TurbineException;
/**
@@ -102,11 +104,11 @@
* @return An Object.
* @exception TurbineException
*/
- public Object executeAuthenticatedRpc(URL url,
- String username,
- String password,
- String methodName,
- Vector params)
+ Object executeAuthenticatedRpc(URL url,
+ String username,
+ String password,
+ String methodName,
+ Vector params)
throws TurbineException;
/**
@@ -116,7 +118,7 @@
* to register the service
* @param handler The handler object
*/
- public void registerHandler(String handlerName, Object handler);
+ void registerHandler(String handlerName, Object handler);
/**
* Register an object as a the default handler for
@@ -124,14 +126,14 @@
*
* @param handler The handler object
*/
- public void registerHandler(Object handler);
+ void registerHandler(Object handler);
/**
* Unregister a handler.
*
* @param handlerName The name of the handler to unregister.
*/
- public void unregisterHandler(String handlerName);
+ void unregisterHandler(String handlerName);
/**
* Handle an XML-RPC request using the encapsulated server.
@@ -142,7 +144,7 @@
* @param is the stream to read request data from.
* @return the response body that needs to be sent to the client.
*/
- public byte[] handleRequest(InputStream is);
+ byte[] handleRequest(InputStream is);
/**
* Handle an XML-RPC request using the encapsulated server with user
@@ -159,7 +161,7 @@
* @param password the password given by user.
* @return the response body that needs to be sent to the client.
*/
- public byte[] handleRequest(InputStream is, String user, String password);
+ byte[] handleRequest(InputStream is, String user, String password);
/**
* Method to allow a client to send a file to a server.
@@ -171,11 +173,11 @@
* @param destinationFileName
* @throws TurbineException
*/
- public void send(String serverURL,
- String sourceLocationProperty,
- String sourceFileName,
- String destinationLocationProperty,
- String destinationFileName)
+ void send(String serverURL,
+ String sourceLocationProperty,
+ String sourceFileName,
+ String destinationLocationProperty,
+ String destinationFileName)
throws TurbineException;
/**
@@ -191,13 +193,13 @@
* @param destinationFileName
* @throws TurbineException
*/
- public void send(String serverURL,
- String username,
- String password,
- String sourceLocationProperty,
- String sourceFileName,
- String destinationLocationProperty,
- String destinationFileName)
+ void send(String serverURL,
+ String username,
+ String password,
+ String sourceLocationProperty,
+ String sourceFileName,
+ String destinationLocationProperty,
+ String destinationFileName)
throws TurbineException;
/**
@@ -210,11 +212,11 @@
* @param destinationFileName
* @throws TurbineException
*/
- public void get(String serverURL,
- String sourceLocationProperty,
- String sourceFileName,
- String destinationLocationProperty,
- String destinationFileName)
+ void get(String serverURL,
+ String sourceLocationProperty,
+ String sourceFileName,
+ String destinationLocationProperty,
+ String destinationFileName)
throws TurbineException;
/**
@@ -230,13 +232,13 @@
* @param destinationFileName
* @throws TurbineException
*/
- public void get(String serverURL,
- String username,
- String password,
- String sourceLocationProperty,
- String sourceFileName,
- String destinationLocationProperty,
- String destinationFileName)
+ void get(String serverURL,
+ String username,
+ String password,
+ String sourceLocationProperty,
+ String sourceFileName,
+ String destinationLocationProperty,
+ String destinationFileName)
throws TurbineException;
/**
@@ -248,9 +250,9 @@
* @param sourceFileName
* @throws TurbineException
*/
- public void remove(String serverURL,
- String sourceLocationProperty,
- String sourceFileName)
+ void remove(String serverURL,
+ String sourceLocationProperty,
+ String sourceFileName)
throws TurbineException;
/**
@@ -264,11 +266,11 @@
* @param sourceFileName
* @throws TurbineException
*/
- public void remove(String serverURL,
- String username,
- String password,
- String sourceLocationProperty,
- String sourceFileName)
+ void remove(String serverURL,
+ String username,
+ String password,
+ String sourceLocationProperty,
+ String sourceFileName)
throws TurbineException;
/**
@@ -278,7 +280,7 @@
* @see #acceptClient(java.lang.String)
* @see #denyClient(java.lang.String)
*/
- public void setParanoid(boolean state);
+ void setParanoid(boolean state);
/**
* Add an IP address to the list of accepted clients. The parameter can
@@ -290,7 +292,7 @@
* @see #denyClient(java.lang.String)
* @see #setParanoid(boolean)
*/
- public void acceptClient(String address);
+ void acceptClient(String address);
/**
* Add an IP address to the list of denied clients. The parameter can
@@ -301,6 +303,6 @@
* @see #acceptClient(java.lang.String)
* @see #setParanoid(boolean)
*/
- public void denyClient(String address);
+ void denyClient(String address);
}
1.5 +8 -1 jakarta-turbine-2/src/java/org/apache/turbine/services/xslt/XSLTService.java
Index: XSLTService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/xslt/XSLTService.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XSLTService.java 9 Mar 2003 03:06:35 -0000 1.4
+++ XSLTService.java 7 Apr 2003 15:34:53 -0000 1.5
@@ -71,7 +71,14 @@
public interface XSLTService
extends Service
{
- static final String SERVICE_NAME = "XSLTService";
+ /** Service name */
+ String SERVICE_NAME = "XSLTService";
+
+ /** Name of the Style sheet path property */
+ String STYLESHEET_PATH = "path";
+
+ /** Property for caching the stylesheets */
+ String STYLESHEET_CACHING = "cache";
/**
* Uses an xsl file to transform xml input from a reader and writes the
1.6 +4 -4 jakarta-turbine-2/src/java/org/apache/turbine/util/CookieParser.java
Index: CookieParser.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/CookieParser.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CookieParser.java 9 Mar 2003 02:54:11 -0000 1.5
+++ CookieParser.java 7 Apr 2003 15:34:53 -0000 1.6
@@ -87,8 +87,8 @@
public interface CookieParser
extends ValueParser
{
- static final int AGE_SESSION = -1;
- static final int AGE_DELETE = 0;
+ int AGE_SESSION = -1;
+ int AGE_DELETE = 0;
/**
* Gets the parsed RunData.
@@ -123,7 +123,7 @@
* @param response The http reponse from the servlet
*/
void setData(HttpServletRequest request,
- HttpServletResponse response);
+ HttpServletResponse response);
/**
* Get the Path where cookies will be stored
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org