Index: lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java =================================================================== diff -u -rb67c428939ed96f08f56192d54b8ee55d8ab89d2 -r521f3087b376bc72feabd6f7cf81dab7f95739ab --- lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java (.../PedagogicalPlannerAction.java) (revision b67c428939ed96f08f56192d54b8ee55d8ab89d2) +++ lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java (.../PedagogicalPlannerAction.java) (revision 521f3087b376bc72feabd6f7cf81dab7f95739ab) @@ -90,6 +90,7 @@ import org.lamsfoundation.lams.learningdesign.SequenceActivity; import org.lamsfoundation.lams.learningdesign.ToolActivity; import org.lamsfoundation.lams.learningdesign.Transition; +import org.lamsfoundation.lams.learningdesign.dao.IActivityDAO; import org.lamsfoundation.lams.learningdesign.dao.hibernate.ActivityDAO; import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; @@ -131,17 +132,6 @@ * Action managing Pedagogical Planner base page and non-tool activities. * * @author Marcin Cieslak - * - * - * - * - * - * - * - * - * - * - * */ public class PedagogicalPlannerAction extends LamsDispatchAction { private static Logger log = Logger.getLogger(PedagogicalPlannerAction.class); @@ -153,7 +143,7 @@ private static IMonitoringService monitoringService; private static MessageService messageService; private static PedagogicalPlannerDAO pedagogicalPlannerDAO; - private static ActivityDAO activityDAO; + private static IActivityDAO activityDAO; private static final RAMDirectory luceneDir = new RAMDirectory(); private static final Analyzer luceneAnalyzer = new StandardAnalyzer(); @@ -1974,71 +1964,67 @@ } private IExportToolContentService getExportService() { - if (PedagogicalPlannerAction.exportService == null) { + if (exportService == null) { WebApplicationContext ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.exportService = (IExportToolContentService) ctx + exportService = (IExportToolContentService) ctx .getBean(CentralConstants.EXPORT_TOOLCONTENT_SERVICE_BEAN_NAME); } - return PedagogicalPlannerAction.exportService; + return exportService; } private IAuthoringService getAuthoringService() { - if (PedagogicalPlannerAction.authoringService == null) { + if (authoringService == null) { WebApplicationContext ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.authoringService = (IAuthoringService) ctx - .getBean(AuthoringConstants.AUTHORING_SERVICE_BEAN_NAME); + authoringService = (IAuthoringService) ctx.getBean(AuthoringConstants.AUTHORING_SERVICE_BEAN_NAME); } - return PedagogicalPlannerAction.authoringService; + return authoringService; } private IMonitoringService getMonitoringService() { - if (PedagogicalPlannerAction.monitoringService == null) { + if (monitoringService == null) { WebApplicationContext ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.monitoringService = (IMonitoringService) ctx - .getBean(CentralConstants.MONITORING_SERVICE_BEAN_NAME); + monitoringService = (IMonitoringService) ctx.getBean(CentralConstants.MONITORING_SERVICE_BEAN_NAME); } - return PedagogicalPlannerAction.monitoringService; + return monitoringService; } private IUserManagementService getUserManagementService() { - if (PedagogicalPlannerAction.userManagementService == null) { + if (userManagementService == null) { WebApplicationContext ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.userManagementService = (IUserManagementService) ctx + userManagementService = (IUserManagementService) ctx .getBean(CentralConstants.USER_MANAGEMENT_SERVICE_BEAN_NAME); } - return PedagogicalPlannerAction.userManagementService; + return userManagementService; } private MessageService getMessageService() { - if (PedagogicalPlannerAction.messageService == null) { + if (messageService == null) { WebApplicationContext ctx = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.messageService = (MessageService) ctx - .getBean(CentralConstants.CENTRAL_MESSAGE_SERVICE_BEAN_NAME); + messageService = (MessageService) ctx.getBean(CentralConstants.CENTRAL_MESSAGE_SERVICE_BEAN_NAME); } - return PedagogicalPlannerAction.messageService; + return messageService; } private PedagogicalPlannerDAO getPedagogicalPlannerDAO() { - if (PedagogicalPlannerAction.pedagogicalPlannerDAO == null) { + if (pedagogicalPlannerDAO == null) { WebApplicationContext wac = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.pedagogicalPlannerDAO = (PedagogicalPlannerDAO) wac - .getBean("pedagogicalPlannerDAO"); + pedagogicalPlannerDAO = (PedagogicalPlannerDAO) wac.getBean("pedagogicalPlannerDAO"); } - return PedagogicalPlannerAction.pedagogicalPlannerDAO; + return pedagogicalPlannerDAO; } - private ActivityDAO getActivityDAO() { - if (PedagogicalPlannerAction.activityDAO == null) { + private IActivityDAO getActivityDAO() { + if (activityDAO == null) { WebApplicationContext wac = WebApplicationContextUtils .getRequiredWebApplicationContext(getServlet().getServletContext()); - PedagogicalPlannerAction.activityDAO = (ActivityDAO) wac.getBean("activityDAO"); + activityDAO = (IActivityDAO) wac.getBean("activityDAO"); } - return PedagogicalPlannerAction.activityDAO; + return activityDAO; } } \ No newline at end of file