Home » tiles-2.2.1-src » org.apache.tiles.jsp » context » [javadoc | source]

    1   /*
    2    * $Id: JspTilesContextFactory.java 711885 2008-11-06 16:06:38Z apetrelli $
    3    *
    4    * Licensed to the Apache Software Foundation (ASF) under one
    5    * or more contributor license agreements.  See the NOTICE file
    6    * distributed with this work for additional information
    7    * regarding copyright ownership.  The ASF licenses this file
    8    * to you under the Apache License, Version 2.0 (the
    9    * "License"); you may not use this file except in compliance
   10    * with the License.  You may obtain a copy of the License at
   11    *
   12    * http://www.apache.org/licenses/LICENSE-2.0
   13    *
   14    * Unless required by applicable law or agreed to in writing,
   15    * software distributed under the License is distributed on an
   16    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   17    * KIND, either express or implied.  See the License for the
   18    * specific language governing permissions and limitations
   19    * under the License.
   20    */
   21   
   22   package org.apache.tiles.jsp.context;
   23   
   24   
   25   import javax.servlet.ServletContext;
   26   
   27   import org.apache.tiles.TilesApplicationContext;
   28   import org.apache.tiles.context.TilesRequestContext;
   29   import org.apache.tiles.servlet.context.ServletTilesContextFactory;
   30   
   31   /**
   32    * Creates an instance of the appropriate TilesApplicationContext implementation.
   33    *
   34    * @version $Rev: 711885 $ $Date: 2008-11-06 17:06:38 +0100 (gio, 06 nov 2008) $
   35    * @deprecated Use {@link JspTilesRequestContextFactory}.
   36    */
   37   public class JspTilesContextFactory extends ServletTilesContextFactory {
   38   
   39       /**
   40        * The real factory.
   41        */
   42       private JspTilesRequestContextFactory factory;
   43   
   44       /**
   45        * Constructor.
   46        *
   47        * @deprecated Do not use! No replacement.
   48        */
   49       @Deprecated
   50       public JspTilesContextFactory() {
   51           factory = new JspTilesRequestContextFactory();
   52       }
   53   
   54       /** {@inheritDoc} */
   55       public TilesRequestContext createRequestContext(TilesApplicationContext context,
   56                                                       Object... requestItems) {
   57           return factory.createRequestContext(context, requestItems);
   58       }
   59   
   60       /**
   61        * Returns the original servlet context.
   62        *
   63        * @param context The application context.
   64        * @return The original servlet context, if found.
   65        * @deprecated Use {@link TilesApplicationContext#getContext()}.
   66        */
   67       protected ServletContext getServletContext(TilesApplicationContext context) {
   68           return (ServletContext) context.getContext();
   69       }
   70   }

Home » tiles-2.2.1-src » org.apache.tiles.jsp » context » [javadoc | source]