1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.rendering.wikimodel.xml

File WemProgrammingTagNotifier.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart2.png
81% of files have more coverage

Code metrics

0
13
5
1
80
47
5
0.38
2.6
5
1

Classes

Class Line # Actions
WemProgrammingTagNotifier 31 13 0% 5 16
0.1111111111.1%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.rendering.wikimodel.xml;
21   
22    import java.util.Map;
23   
24    import org.xwiki.rendering.wikimodel.IWemListenerProgramming;
25    import org.xwiki.rendering.wikimodel.WikiParameters;
26   
27    /**
28    * @version $Id: d928ffadb943d55056aa541abd88d8c26d957358 $
29    * @since 4.0M1
30    */
 
31    public class WemProgrammingTagNotifier extends AbstractTagNotifier
32    implements
33    IWemListenerProgramming
34    {
35    /**
36    * @param listener
37    */
 
38  6 toggle public WemProgrammingTagNotifier(ITagListener listener)
39    {
40  6 super(listener);
41    }
42   
 
43  0 toggle public void onExtensionBlock(String extensionName, WikiParameters params)
44    {
45  0 fListener.onTag(EXTENSION_BLOCK, tagParams(
46    EXTENSION_NAME,
47    extensionName), userParams(params));
48    }
49   
 
50  0 toggle public void onExtensionInline(String extensionName, WikiParameters params)
51    {
52  0 fListener.onTag(EXTENSION_INLINE, tagParams(
53    EXTENSION_NAME,
54    extensionName), userParams(params));
55    }
56   
 
57  0 toggle public void onMacroBlock(
58    String macroName,
59    WikiParameters params,
60    String content)
61    {
62  0 Map<String, String> tagParams = tagParams(MACRO_NAME, macroName);
63  0 Map<String, String> userParams = userParams(params);
64  0 fListener.beginTag(MACRO_BLOCK, tagParams, userParams);
65  0 fListener.onCDATA(content);
66  0 fListener.endTag(MACRO_BLOCK, tagParams, userParams);
67    }
68   
 
69  0 toggle public void onMacroInline(
70    String macroName,
71    WikiParameters params,
72    String content)
73    {
74  0 Map<String, String> tagParams = tagParams(MACRO_NAME, macroName);
75  0 Map<String, String> userParams = userParams(params);
76  0 fListener.beginTag(MACRO_INLINE, tagParams, userParams);
77  0 fListener.onCDATA(content);
78  0 fListener.endTag(MACRO_INLINE, tagParams, userParams);
79    }
80    }