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

COVERAGE SUMMARY FOR SOURCE FILE [PortletAttributeManager.java]

nameclass, %method, %block, %line, %
PortletAttributeManager.java0%   (0/1)0%   (0/5)0%   (0/36)0%   (0/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PortletAttributeManager0%   (0/1)0%   (0/5)0%   (0/36)0%   (0/11)
PortletAttributeManager (): void 0%   (0/1)0%   (0/8)0%   (0/3)
clear (): void 0%   (0/1)0%   (0/4)0%   (0/2)
getAttributes (String): List 0%   (0/1)0%   (0/6)0%   (0/1)
getInstance (): PortletAttributeManager 0%   (0/1)0%   (0/8)0%   (0/3)
setAttributes (String, List): void 0%   (0/1)0%   (0/10)0%   (0/2)

1package edu.iu.uis.sit.portal.portlet.attribute;
2 
3import java.util.ArrayList;
4import java.util.HashMap;
5import java.util.List;
6import java.util.Map;
7 
8//TODO: Should probably become a spring service
9 
10public class PortletAttributeManager {
11 
12    private static PortletAttributeManager instance;
13    private Map portletAttributes;
14    
15    private PortletAttributeManager() {
16        portletAttributes = new HashMap();
17    }
18    
19    public static PortletAttributeManager getInstance() {
20        if (instance == null) {
21            instance = new PortletAttributeManager();            
22        }
23        return instance;
24    }
25    
26    public void setAttributes(String id, List portletAttributes) {
27        this.portletAttributes.put(id, new ArrayList(portletAttributes));
28    }
29 
30    public List getAttributes(String id) {
31        return (List) portletAttributes.get(id);
32    }
33    
34    // TODO: Stick this call into the webapp context listener (init or destroy)
35    public void clear() {
36        portletAttributes.clear();
37    }
38    
39}

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