package com.fatwire.gst.foundation.controller;

import javax.servlet.ServletContext;

import com.fatwire.assetapi.data.BaseController;
import com.fatwire.gst.foundation.controller.action.Injector;
import com.fatwire.gst.foundation.controller.support.WebContextUtil;

import COM.FutureTense.Interfaces.DependenciesAwareModelAndView;
import COM.FutureTense.Interfaces.ICS;

public class InjectingController extends BaseController {
	
	public InjectingController(ICS ics)
	{
		super();
		this.setICS(ics);
		
	}

	public DependenciesAwareModelAndView handleRequest()
	{
		
		ServletContext srvCtx = ics.getIServlet().getServlet().getServletContext();
		AppContext ctx = WebContextUtil.getWebAppContext(srvCtx);
		Injector injector = ctx.getBean("Injector",Injector.class); 
		injector.inject(ics, this);		
		
		return super.handleRequest();
	}
	
}

@@ -1,8 +1,622 @@
+/*%0A * Copyright 2016 Function1. All Rights Reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A
 package 
@@ -942,47 +942,8 @@
 iew;
-%0Aimport COM.FutureTense.Interfaces.ICS;
 %0A%0Apu
@@ -1004,86 +1004,8 @@
 %7B%0A%09%0A
-%09public InjectingController(ICS ics)%0A%09%7B%0A%09%09super();%0A%09%09this.setICS(ics);%0A%09%09%0A%09%7D%0A%0A
 %09pub
@@ -1057,14 +1057,10 @@
 st()
-%0A%09%7B%0A%09%09
+ %7B
 %0A%09%09S
@@ -1289,19 +1289,16 @@
 his);%09%09%0A
-%09%09%0A
 %09%09return
@@ -1325,11 +1325,9 @@
 ();%0A
+
 %09%7D%0A
-%09%0A
 %7D%0A

Add license to controller file.