Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
../../../../img/srcFileCovDistChart0.png 48% of files have more coverage
19   86   14   1,46
2   66   0,74   13
13     1,08  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  AvailablePlugins       Line # 8 19 0% 14 34 0% 0.0
 
No Tests
 
1    package net.sourceforge.pebble.plugins;
2   
3    import java.util.*;
4   
5    /**
6    * @author James Roper
7    */
 
8    public class AvailablePlugins {
9    public static final String PERMALINK_PROVIDER = "permalink-provider";
10    public static final String CONTENT_DECORATOR = "content-decorator";
11    public static final String BLOG_LISTENER = "blog-listener";
12    public static final String BLOG_ENTRY_LISTENER = "blog-entry-listener";
13    public static final String COMMENT_LISTENER = "comment-listener";
14    public static final String COMMENT_CONFIRMATION_STRATEGY = "comment-confirmation-strategy";
15    public static final String TRACKBACK_LISTENER = "trackback-listener";
16    public static final String TRACKBACK_CONFIRMATION_STRATEGY = "trackback-confirmation-strategy";
17    public static final String LUCENCE_ANALYZER = "lucene-analyzer";
18    public static final String LOGGER = "logger";
19   
20    private final Map<String, List<Plugin>> plugins;
21   
 
22  0 toggle public Map<String, List<Plugin>> copyMap()
23    {
24  0 Map<String, List<Plugin>> map = new HashMap<String, List<Plugin>>();
25  0 for (Map.Entry<String, List<Plugin>> entry : plugins.entrySet())
26    {
27  0 map.put(entry.getKey(), new ArrayList<Plugin>(entry.getValue()));
28    }
29  0 return map;
30    }
31   
 
32  0 toggle public AvailablePlugins(Map<String, List<Plugin>> plugins) {
33  0 this.plugins = plugins;
34    }
35   
 
36  0 toggle public Collection<Plugin> getPermalinkProviders() {
37  0 return getEmptyIfNull(PERMALINK_PROVIDER);
38    }
39   
 
40  0 toggle public Collection<Plugin> getContentDecorators() {
41  0 return getEmptyIfNull(CONTENT_DECORATOR);
42    }
43   
 
44  0 toggle public Collection<Plugin> getBlogListeners() {
45  0 return getEmptyIfNull(BLOG_LISTENER);
46    }
47   
 
48  0 toggle public Collection<Plugin> getBlogEntryListeners() {
49  0 return getEmptyIfNull(BLOG_ENTRY_LISTENER);
50    }
51   
 
52  0 toggle public Collection<Plugin> getCommentListeners() {
53  0 return getEmptyIfNull(COMMENT_LISTENER);
54    }
55   
 
56  0 toggle public Collection<Plugin> getCommentConfirmationStrategies() {
57  0 return getEmptyIfNull(COMMENT_CONFIRMATION_STRATEGY);
58    }
59   
 
60  0 toggle public Collection<Plugin> getTrackbackListeners() {
61  0 return getEmptyIfNull(TRACKBACK_LISTENER);
62    }
63   
 
64  0 toggle public Collection<Plugin> getTrackbackConfirmationStrategies() {
65  0 return getEmptyIfNull(TRACKBACK_CONFIRMATION_STRATEGY);
66    }
67   
 
68  0 toggle public Collection<Plugin> getLuceneAnalyzers() {
69  0 return getEmptyIfNull(LUCENCE_ANALYZER);
70    }
71   
 
72  0 toggle public Collection<Plugin> getLoggers() {
73  0 return getEmptyIfNull(LOGGER);
74    }
75   
 
76  0 toggle private Collection<Plugin> getEmptyIfNull(String key) {
77  0 Collection<Plugin> list = plugins.get(key);
78  0 if (list == null) {
79  0 return Collections.emptyList();
80    }
81    else {
82  0 return Collections.unmodifiableCollection(list);
83    }
84    }
85   
86    }