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 [WindowStateDeleteController.java]

nameclass, %method, %block, %line, %
WindowStateDeleteController.java100% (1/1)100% (6/6)100% (74/74)100% (19/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class WindowStateDeleteController100% (1/1)100% (6/6)100% (74/74)100% (19/19)
WindowStateDeleteController (): 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% (39/39)100% (9/9)
setAdminService (AdminService): void 100% (1/1)100% (4/4)100% (2/2)

1package edu.iu.uis.sit.portal.portlet.admin.web;
2 
3import java.util.ArrayList;
4import java.util.Iterator;
5import java.util.List;
6 
7import javax.portlet.PortletRequest;
8 
9import org.springframework.web.portlet.ModelAndView;
10import org.springframework.web.portlet.mvc.SimpleFormController;
11 
12import edu.iu.uis.sit.portal.portlet.admin.domain.PortalSupport;
13import edu.iu.uis.sit.portal.portlet.admin.services.AdminService;
14import edu.iu.uis.sit.portal.portlet.utility.Constants;
15 
16public class WindowStateDeleteController extends SimpleFormController {
17 
18        private AdminService adminService;
19 
20        protected void onSubmitAction(Object command) throws Exception {
21                PortalSupport portalSupport = (PortalSupport) command;
22                getAdminService().deletePortalSupport(portalSupport);
23        }
24 
25        protected ModelAndView onSubmitRender(Object command) throws Exception {
26                ModelAndView modelAndView = new ModelAndView("displayWindowStates");
27                List windowStates = new ArrayList();
28                for (Iterator iter = getAdminService().getPortalConfig().getPortalSupports().iterator(); iter.hasNext();) {
29                        PortalSupport support = (PortalSupport) iter.next();
30                        if (Constants.WINDOW_STATE_SUPPORT.equals(support.getSupportType())) {
31                                windowStates.add(support);
32                        }
33                }
34                modelAndView.addObject("windowStates", windowStates);
35                return modelAndView;
36        }
37 
38        protected Object formBackingObject(PortletRequest request) throws Exception {
39                if (request.getParameter("portalSupportId") != null) {
40                        return getAdminService().findPortalSupportById(Long.parseLong(request.getParameter("portalSupportId")));
41                }
42                return new PortalSupport();
43        }
44 
45        public AdminService getAdminService() {
46                return adminService;
47        }
48 
49        public void setAdminService(AdminService adminService) {
50                this.adminService = adminService;
51        }
52 
53}

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