View Javadoc

1   /*
2    * $Id: MockPublicUrlDefinitionsFactory.java 527536 2007-04-11 15:44:51Z 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.definition;
23  
24  import org.apache.tiles.context.TilesRequestContext;
25  
26  /***
27   * Mock implementation of UrlDefinitionsFactory that exposes two of its methods
28   * as public instead of protected.
29   *
30   * @version $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
31   */
32  public class MockPublicUrlDefinitionsFactory extends UrlDefinitionsFactory {
33  
34      /***
35       * Exposes the <code>addDefinitions</code> method of
36       * <code>UrlDefinitionsFactory</code>.
37       *
38       * @param definitions The definitions to add.
39       * @param tilesContext The request context to use.
40       * @throws DefinitionsFactoryException If something goes wrong during the
41       * addition.
42       * @see org.apache.tiles.definition.UrlDefinitionsFactory#addDefinitions(org.apache.tiles.definition.Definitions,
43       *org.apache.tiles.context.TilesRequestContext)
44       */
45      public void addDefinitions(Definitions definitions,
46              TilesRequestContext tilesContext) throws DefinitionsFactoryException {
47          super.addDefinitions(definitions, tilesContext);
48      }
49  
50      /***
51       * Exposes the <code>isLocaleProcessed</code> method of
52       * <code>UrlDefinitionsFactory</code>.
53       *
54       * @param tilesContext The request context to use.
55       * @return <code>true</code> if the context has been already processed.
56       * @see org.apache.tiles.definition.UrlDefinitionsFactory
57       * #isContextProcessed(org.apache.tiles.context.TilesRequestContext)
58       */
59      public boolean isContextProcessed(TilesRequestContext tilesContext) {
60          return super.isContextProcessed(tilesContext);
61      }
62  }