001 /* 002 * $Id: WebappResourcesFactoryBase.java 348357 2005-11-23 03:59:22Z niallp $ 003 * $Revision: 348357 $ 004 * $Date: 2005-11-23 03:59:22 +0000 (Wed, 23 Nov 2005) $ 005 * 006 * ==================================================================== 007 * 008 * Copyright 2003-2005 The Apache Software Foundation 009 * 010 * Licensed under the Apache License, Version 2.0 (the "License"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an "AS IS" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * 022 */ 023 package org.apache.commons.resources.impl; 024 025 import javax.servlet.ServletContext; 026 027 /** 028 * <p>Convenience base class for Web App implementations of 029 * {@link org.apache.commons.resources.ResourcesFactory}.</p> 030 */ 031 public abstract class WebappResourcesFactoryBase extends ResourcesFactoryBase { 032 033 /** 034 * <p>The <code>ServletContext</code> instance for resolving 035 * our resources references.</p> 036 */ 037 private ServletContext servletContext = null; 038 039 /** 040 * <p>Return the <code>ServletContext</code> instance for 041 * resolving our resources references.</p> 042 * @return The Servlet Context. 043 */ 044 public ServletContext getServletContext() { 045 046 return (this.servletContext); 047 048 } 049 050 /** 051 * <p>Set the <code>ServletContext</code> instance for 052 * resolving our resources references.</p> 053 * @param servletContext The Servlet Context. 054 */ 055 public void setServletContext(ServletContext servletContext) { 056 057 this.servletContext = servletContext; 058 059 } 060 061 }