1 /* 2 * Copyright 2010 FatWire Corporation. All Rights Reserved. 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 package com.fatwire.gst.foundation.controller; 17 18 import COM.FutureTense.Interfaces.IPS; 19 20 /** 21 * <p> 22 * This is the controller (dispatcher) that dispatches the request to the 23 * correct asset/template combination based on the path field for a Web 24 * Referenceable Asset. 25 * </p> 26 * <p/> 27 * This controller should be called from an outer XML element via the 28 * <tt>CALLJAVA</tt> tag: 29 * <code><CALLJAVA CLASS="com.fatwire.gst.foundation.controller.BaseController" /> 30 * </code> 31 * 32 * @author Tony Field 33 * @author Dolf Dijkstra 34 * @since Jun 10, 2010 35 */ 36 public class BaseController extends AbstractController { 37 38 private RenderPageAdapter delegate; 39 40 @Override 41 public void SetAppLogic(IPS ips) { 42 super.SetAppLogic(ips); 43 delegate = new RenderPageAdapter(ics); 44 } 45 46 @Override 47 protected void doExecute() { 48 delegate.doExecute(); 49 } 50 51 @Override 52 protected void handleException(final Exception e) { 53 delegate.handleException(e); 54 } 55 56 }