1 /* 2 * Copyright 2000-2001,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.apache.jetspeed.portal.portlets; 18 19 20 21 // Jetspeed stuff 22 import org.apache.jetspeed.portal.PortletException; 23 24 /** 25 * A Velocity based portlet implementation 26 * <p> 27 * <strong>NOTE:</strong>This supports the pre-MVC style of template 28 * based portlet development and is supplied for backward compatibility. 29 * The prefered method is to define template-based portlets is to use 30 * @see org.apache.jetspeed.portal.portlets.GenericMVCPortlet 31 * or a sub-class there of. The GenericMVCPortlet javadoc provides 32 * instructions for using using the MVC portlet model. 33 * </p> 34 * @author <a HREF="mailto:re_carrasco@bco011.sonda.cl">Roberto Carrasco</a> 35 * @author <a HREF="mailto:raphael@apache.org">Raphaël Luta</a> 36 * @author <a HREF="mailto:paulsp@apache.org">Paul Spencer</a> 37 * @author <a HREF="mailto:sweaver@rippe.com">Scott Weaver</a>u 38 */ 39 public class VelocityPortlet extends GenericMVCPortlet 40 41 { 42 /** 43 * STW: Backward compatibility: set the viewType to "Velocity". 44 */ 45 public void init() throws PortletException 46 { 47 setCacheable(true); 48 setViewType("Velocity"); 49 super.init(); 50 } 51 52 53 54 } 55 56