1/*2 * $Id: TilesBodyTag.java 727708 2008-12-18 12:36:35Z apetrelli $3 *4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */21package org.apache.tiles.jsp.taglib;
2223import javax.servlet.jsp.tagext.BodyTagSupport;
24import javax.servlet.jsp.tagext.TryCatchFinally;
2526/***27 * An abstract common base class to extend for all Tiles JSP tag handlers which28 * access body content. Defines useful life cycle extension points.29 *30 * @version $Rev: 727708 $ $Date: 2008-12-18 13:36:35 +0100 (gio, 18 dic 2008) $31 * @since 2.1.132 */33publicabstractclassTilesBodyTagextends BodyTagSupport implements
34 TryCatchFinally {
3536/***37 * Default no-op implementation, but overrideable if needed.38 *39 * @param throwable The throwable object.40 * @throws Throwable The throwable object itself, by default.41 * @see TryCatchFinally#doCatch(Throwable)42 */43publicvoid doCatch(Throwable throwable) throws Throwable {
44throwthrowable;
45 }
4647/***48 * Called after doEndTag(). This common implementation calls reset() to49 * release any per-invocation resources.50 *51 * @see TryCatchFinally#doFinally()52 */53publicvoid doFinally() {
54 reset();
55 }
5657/***58 * Release any per-invocation resources, resetting any resources or state59 * that should be cleared between successive invocations of60 * {@link javax.servlet.jsp.tagext.Tag#doEndTag()} and61 * {@link javax.servlet.jsp.tagext.Tag#doStartTag()}.62 */63protectedvoid reset() {
64 }
6566/***67 * Release any per-instance resources, releasing any resources or state68 * before this tag instance is disposed.69 *70 * @see javax.servlet.jsp.tagext.Tag#release()71 */72 @Override
73publicvoid release() {
74super.release();
75 reset();
76 }
7778 }