This project has retired. For details please refer to its Attic page.
BodyExecutable xref
View Javadoc

1   /*
2    * $Id: BodyExecutable.java 902403 2010-01-23 13:31:17Z 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.velocity.template;
23  
24  import java.util.Map;
25  
26  import javax.servlet.http.HttpServletRequest;
27  import javax.servlet.http.HttpServletResponse;
28  
29  import org.apache.velocity.context.Context;
30  import org.apache.velocity.runtime.Renderable;
31  
32  /***
33   * It represents an object that can be executed, with a body with "start" and
34   * "end" operation, under a Velocity+Servlet context.
35   *
36   * @version $Rev: 902403 $ $Date: 2010-01-23 14:31:17 +0100 (sab, 23 gen 2010) $
37   * @since 2.2.0
38   * @deprecated Use Velocity directives.
39   */
40  @Deprecated
41  public interface BodyExecutable {
42  
43      /***
44       * Starts the execution of the commands.
45       *
46       * @param request The HTTP request.
47       * @param response The HTTP response-
48       * @param velocityContext The Velocity context.
49       * @param params The map of the parameters.
50       * @since 2.2.0
51       */
52      void start(HttpServletRequest request, HttpServletResponse response,
53              Context velocityContext, Map<String, Object> params);
54  
55      /***
56       * Ends the execution of the commands.
57       *
58       * @param request The HTTP request.
59       * @param response The HTTP response-
60       * @param velocityContext The Velocity context.
61       * @return A renderable object. It does not necessary render anything.
62       * @since 2.2.0
63       */
64      Renderable end(HttpServletRequest request, HttpServletResponse response, Context velocityContext);
65  }