View Javadoc

1   /*
2    * $Id: WebappResourcesFactoryBase.java 348357 2005-11-23 03:59:22Z niallp $
3    * $Revision: 348357 $
4    * $Date: 2005-11-23 03:59:22 +0000 (Wed, 23 Nov 2005) $
5    *
6    * ====================================================================
7    *
8    *  Copyright 2003-2005 The Apache Software Foundation
9    *
10   *  Licensed under the Apache License, Version 2.0 (the "License");
11   *  you may not use this file except in compliance with the License.
12   *  You may obtain a copy of the License at
13   *
14   *      http://www.apache.org/licenses/LICENSE-2.0
15   *
16   *  Unless required by applicable law or agreed to in writing, software
17   *  distributed under the License is distributed on an "AS IS" BASIS,
18   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   *  See the License for the specific language governing permissions and
20   *  limitations under the License.
21   *
22   */
23  package org.apache.commons.resources.impl;
24  
25  import javax.servlet.ServletContext;
26  
27  /**
28   * <p>Convenience base class for Web App implementations of 
29   *    {@link org.apache.commons.resources.ResourcesFactory}.</p>
30   */
31  public abstract class WebappResourcesFactoryBase extends ResourcesFactoryBase {
32  
33      /**
34       * <p>The <code>ServletContext</code> instance for resolving
35       * our resources references.</p>
36       */
37      private ServletContext servletContext = null;
38  
39      /**
40       * <p>Return the <code>ServletContext</code> instance for
41       * resolving our resources references.</p>
42       * @return The Servlet Context.
43       */
44      public ServletContext getServletContext() {
45      
46          return (this.servletContext);
47      
48      }
49  
50      /**
51       * <p>Set the <code>ServletContext</code> instance for
52       * resolving our resources references.</p>
53       * @param servletContext The Servlet Context.
54       */
55      public void setServletContext(ServletContext servletContext) {
56      
57          this.servletContext = servletContext;
58      
59      }
60  
61  }