EMMA Coverage Report (generated Fri Sep 15 10:32:43 EDT 2006)
[all classes][org.apache.pluto.driver.services.portal]

COVERAGE SUMMARY FOR SOURCE FILE [OneStartPageConfig.java]

nameclass, %method, %block, %line, %
OneStartPageConfig.java0%   (0/1)0%   (0/16)0%   (0/189)0%   (0/49)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class OneStartPageConfig0%   (0/1)0%   (0/16)0%   (0/189)0%   (0/49)
OneStartPageConfig (): void 0%   (0/1)0%   (0/28)0%   (0/7)
addPortlet (String, String, String, String, String): void 0%   (0/1)0%   (0/63)0%   (0/13)
addPortletAttribute (PortletAttribute): void 0%   (0/1)0%   (0/6)0%   (0/2)
addSubtab (OneStartSubtab): void 0%   (0/1)0%   (0/9)0%   (0/2)
getAllPortletIds (): Collection 0%   (0/1)0%   (0/18)0%   (0/4)
getColumnOnePortletIds (): Collection 0%   (0/1)0%   (0/3)0%   (0/1)
getColumnThreePortletIds (): List 0%   (0/1)0%   (0/3)0%   (0/1)
getColumnTwoPortletIds (): List 0%   (0/1)0%   (0/3)0%   (0/1)
getOrderNumber (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getSubtabs (): List 0%   (0/1)0%   (0/30)0%   (0/6)
getTitle (): String 0%   (0/1)0%   (0/3)0%   (0/1)
setColumnOnePortletIds (List): void 0%   (0/1)0%   (0/4)0%   (0/2)
setColumnThreePortletIds (List): void 0%   (0/1)0%   (0/4)0%   (0/2)
setColumnTwoPortletIds (List): void 0%   (0/1)0%   (0/4)0%   (0/2)
setOrderNumber (int): void 0%   (0/1)0%   (0/4)0%   (0/2)
setTitle (String): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package org.apache.pluto.driver.services.portal;
2 
3import java.util.ArrayList;
4import java.util.Collection;
5import java.util.Iterator;
6import java.util.List;
7 
8import org.apache.pluto.driver.services.impl.resource.OneStartResourceConfigReader;
9 
10import edu.iu.uis.sit.portal.portlet.attribute.PortletAttribute;
11import edu.iu.uis.sit.portal.portlet.attribute.PortletAttributeManager;
12 
13public class OneStartPageConfig extends PageConfig {
14 
15    private List columnOnePortletIds;
16    private List columnTwoPortletIds;
17    private List columnThreePortletIds;
18    private List subtabs;
19    private List portletAttributes;
20    
21    private String title;
22 
23        public OneStartPageConfig() {
24        columnOnePortletIds = new ArrayList();
25        columnTwoPortletIds = new ArrayList();
26        columnThreePortletIds = new ArrayList();
27        subtabs = new ArrayList();
28        portletAttributes = new ArrayList();
29    }
30        
31    public void addSubtab(OneStartSubtab subtab) {
32                subtabs.add(subtab.getOrder() - 1, subtab);
33    }
34        
35    public void addPortletAttribute(PortletAttribute portletAttribute) {
36        portletAttributes.add(portletAttribute);
37    }
38    
39    public void addPortlet(String contextPath, String portletName, String portletId, String column, String columnOrder) {
40        int col = new Integer(column);
41        int order = new Integer(columnOrder);
42        
43        String id = PortletWindowConfig.createPortletId(contextPath, portletName, portletId);
44        
45            if (col == 1) {
46                columnOnePortletIds.add(order - 1, id);
47        } else if (col == 2) {
48                columnTwoPortletIds.add(order - 1, id);
49        } else if (col == 2) {
50                columnThreePortletIds.add(order - 1, id);
51        }
52            
53            // keep the superclass in synch -- be nice to remove this requirement
54        addPortlet(contextPath, portletName, portletId);
55        
56        // need to get the portlet just added and add the attributes to it 
57        PortletAttributeManager.getInstance().setAttributes(id, portletAttributes);
58        
59        // get ready for the next portlet attributes
60        portletAttributes.clear();
61    }
62    
63    public Collection getAllPortletIds() {
64            Collection allPortletIds = new ArrayList(getColumnOnePortletIds());
65            allPortletIds.addAll(getColumnTwoPortletIds());
66            allPortletIds.addAll(getColumnThreePortletIds());
67            return allPortletIds;
68    }
69    
70        public Collection getColumnOnePortletIds() {
71                return columnOnePortletIds;
72        }
73 
74        public void setColumnOnePortletIds(List columnOnePortletIds) {
75                this.columnOnePortletIds = columnOnePortletIds;
76        }
77 
78        public List getColumnThreePortletIds() {
79                return columnThreePortletIds;
80        }
81 
82        public void setColumnThreePortletIds(List columnThreePortletIds) {
83                this.columnThreePortletIds = columnThreePortletIds;
84        }
85 
86        public List getColumnTwoPortletIds() {
87                return columnTwoPortletIds;
88        }
89 
90        public void setColumnTwoPortletIds(List columnTwoPortletIds) {
91                this.columnTwoPortletIds = columnTwoPortletIds;
92        }
93 
94        public List getSubtabs() {
95                List pageConfigs = new ArrayList();
96                for (Iterator iter = subtabs.iterator(); iter.hasNext();) {
97                        OneStartSubtab subtab = (OneStartSubtab) iter.next();
98                        pageConfigs.add(subtab.getOrder() - 1, OneStartResourceConfigReader.getFactory().getResourceConfig().getRenderConfig().getPageConfig(subtab.getPageName()));
99                }
100                return pageConfigs;
101        }
102        
103        public String getTitle() {
104                return title;
105        }
106 
107        public void setTitle(String title) {
108                this.title = title;
109        }
110        
111        
112        // Bit of a Hack: Pluto mades these package level and
113        // we need them for doing personalization.  This hack
114        // keeps us from needing to modify their source as long
115        // as we keep this class in the same package :(
116    public void setOrderNumber(int number) {
117        super.setOrderNumber(number);
118    }
119 
120    public int getOrderNumber() {
121        return super.getOrderNumber();
122    }
123 
124}

[all classes][org.apache.pluto.driver.services.portal]
EMMA 2.0.5312 (C) Vladimir Roubtsov