You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/06/14 16:41:31 UTC
cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/mimetype TurbineMimeTypeService.java
jvanzyl 01/06/14 07:41:31
Modified: src/java/org/apache/turbine/services/mimetype
TurbineMimeTypeService.java
Log:
- updating service as per notes.
Revision Changes Path
1.4 +10 -13 jakarta-turbine/src/java/org/apache/turbine/services/mimetype/TurbineMimeTypeService.java
Index: TurbineMimeTypeService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/mimetype/TurbineMimeTypeService.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TurbineMimeTypeService.java 2001/04/08 12:46:29 1.3
+++ TurbineMimeTypeService.java 2001/06/14 14:41:30 1.4
@@ -58,15 +58,12 @@
import java.io.IOException;
import java.util.Locale;
-import org.apache.turbine.services.TurbineBaseService;
-import org.apache.turbine.services.servlet.TurbineServlet;
+import org.apache.turbine.services.BaseService;
import org.apache.turbine.services.InitializationException;
import org.apache.turbine.services.mimetype.util.MimeType;
import org.apache.turbine.services.mimetype.util.MimeTypeMap;
import org.apache.turbine.services.mimetype.util.CharSetMap;
-import org.apache.velocity.runtime.configuration.Configuration;
-
/**
* The MimeType Service maintains mappings between MIME types and
* the corresponding file name extensions, and between locales and
@@ -85,10 +82,10 @@
* a set of most common mappings.
*
* @author <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a>
- * @version $Id: TurbineMimeTypeService.java,v 1.3 2001/04/08 12:46:29 ilkka Exp $
+ * @version $Id: TurbineMimeTypeService.java,v 1.4 2001/06/14 14:41:30 jvanzyl Exp $
*/
public class TurbineMimeTypeService
- extends TurbineBaseService
+ extends BaseService
implements MimeTypeService
{
/**
@@ -127,13 +124,13 @@
throws InitializationException
{
String path = null;
- Configuration conf = getConfiguration();
- if (conf != null)
+
+ if (getConfiguration() != null)
{
- path = conf.getString(MIME_TYPES);
+ path = getConfiguration().getString(MIME_TYPES);
if (path != null)
{
- path = TurbineServlet.getRealPath(path);
+ path = getRealPath(path);
}
}
if (path != null)
@@ -152,12 +149,12 @@
mimeTypeMap = new MimeTypeMap();
}
- if (conf != null)
+ if (getConfiguration() != null)
{
- path = conf.getString(CHARSETS);
+ path = getConfiguration().getString(CHARSETS);
if (path != null)
{
- path = TurbineServlet.getRealPath(path);
+ path = getRealPath(path);
}
}
if (path != null)
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org