EMMA Coverage Report (generated Fri Sep 15 10:32:43 EDT 2006)
[all classes][edu.iu.uis.sit.portal.portlet.admin.web]

COVERAGE SUMMARY FOR SOURCE FILE [PortletConfigDeleteController.java]

nameclass, %method, %block, %line, %
PortletConfigDeleteController.java100% (1/1)100% (6/6)100% (61/61)100% (15/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PortletConfigDeleteController100% (1/1)100% (6/6)100% (61/61)100% (15/15)
PortletConfigDeleteController (): void 100% (1/1)100% (3/3)100% (1/1)
formBackingObject (PortletRequest): Object 100% (1/1)100% (17/17)100% (3/3)
getAdminService (): AdminService 100% (1/1)100% (3/3)100% (1/1)
onSubmitAction (Object): void 100% (1/1)100% (8/8)100% (3/3)
onSubmitRender (Object): ModelAndView 100% (1/1)100% (26/26)100% (5/5)
setAdminService (AdminService): void 100% (1/1)100% (4/4)100% (2/2)

1package edu.iu.uis.sit.portal.portlet.admin.web;
2 
3import javax.portlet.PortletRequest;
4 
5import org.springframework.web.portlet.ModelAndView;
6import org.springframework.web.portlet.mvc.SimpleFormController;
7 
8import edu.iu.uis.sit.portal.portlet.admin.domain.PortletConfig;
9import edu.iu.uis.sit.portal.portlet.admin.services.AdminService;
10 
11public class PortletConfigDeleteController extends SimpleFormController {
12 
13        private AdminService adminService;
14 
15        protected void onSubmitAction(Object command) throws Exception {
16                PortletConfig portletConfig = (PortletConfig) command;
17                getAdminService().deletePortletConfig(portletConfig);
18        }
19 
20        protected ModelAndView onSubmitRender(Object command) throws Exception {
21                ModelAndView modelAndView = new ModelAndView("displayPortletConfigs");
22                PortletConfig portletConfig = (PortletConfig) command;
23                modelAndView.addObject("portletApplicationId", portletConfig.getPortletApplicationId());
24                modelAndView.addObject("portletConfigs", getAdminService().findPortletApplicationById(portletConfig.getPortletApplicationId()).getPortletConfigs());
25                return modelAndView;
26        }
27 
28        protected Object formBackingObject(PortletRequest request) throws Exception {
29                if (request.getParameter("portletConfigId") != null) {
30                        return getAdminService().findPortletConfigById(Long.parseLong(request.getParameter("portletConfigId")));
31                }
32                return new PortletConfig();
33        }
34 
35        public AdminService getAdminService() {
36                return adminService;
37        }
38 
39        public void setAdminService(AdminService adminService) {
40                this.adminService = adminService;
41        }
42 
43}

[all classes][edu.iu.uis.sit.portal.portlet.admin.web]
EMMA 2.0.5312 (C) Vladimir Roubtsov