package com.zyeeda.drivebox.services.base;

import javax.servlet.ServletContext;

import org.apache.tapestry5.ioc.Registry;

import com.zyeeda.framework.FrameworkConstants;
import com.zyeeda.framework.persistence.PersistenceService;
import com.zyeeda.framework.persistence.internal.DefaultPersistenceServiceProvider;
import com.zyeeda.framework.utils.IocUtils;

public class ResourceService {
	
	private ServletContext ctx;
	private Registry reg;

	public ResourceService(ServletContext ctx) {
		this.ctx = ctx;
		this.reg = (Registry) this.ctx.getAttribute(FrameworkConstants.SERVICE_REGISTRY);
	}
	
	protected ServletContext getServletContext() {
		return this.ctx;
	}
	
	protected Registry getServiceRegistry() {
		return this.reg;
	}
	
	protected PersistenceService getPersistenceService() {
		return this.reg.getService(IocUtils.getServiceId(DefaultPersistenceServiceProvider.class), PersistenceService.class);
	}
	
}

@@ -319,16 +319,148 @@
 vider;%0D%0A
+import com.zyeeda.framework.security.SecurityService;%0D%0Aimport com.zyeeda.framework.security.internal.ShiroSecurityServiceProvider;%0D%0A
 import c
@@ -1079,11 +1079,185 @@
 %0A%09%7D%0D%0A%09%0D%0A
+%09protected SecurityService%3C?%3E getSecurityService() %7B%0D%0A%09%09return this.reg.getService(IocUtils.getServiceId(ShiroSecurityServiceProvider.class), SecurityService.class);%0D%0A%09%7D%0D%0A%09%0D%0A
 %7D%0D%0A

Add getSecurityService to ResourceService. Issue 4