Clover Coverage Report - ARESTC 0.1.7-SNAPSHOT
Coverage timestamp: Fri Aug 27 2010 19:12:04 CEST
../../../../img/srcFileCovDistChart7.png 67% of files have more coverage
8   80   5   2.67
0   29   0.62   3
3     1.67  
1    
 
  DummyTransformer       Line # 36 8 0% 5 4 63.6% 0.6363636
 
  (1)
 
1    /*
2    *
3    * (C)opyright 2010, Nikolaos Georgosopoulos
4    *
5    * This file is part of ARESTC.
6   
7    ARESTC is free software: you can redistribute it and/or modify
8    it under the terms of the Lesser General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11   
12    ARESTC is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15    GNU General Public License for more details.
16   
17    You should have received a copy of the Lesser General Public License
18    along with ARESTC. If not, see <http://www.gnu.org/licenses/>.
19   
20    */
21    package net.sf.arestc.core;
22   
23    import java.io.IOException;
24    import java.net.MalformedURLException;
25   
26   
27    import org.apache.commons.io.IOUtils;
28    import org.apache.log4j.Logger;
29   
30    // TODO: Auto-generated Javadoc
31    /**
32    * The Class DummyTransformer.
33    *
34    * @author georgosn
35    */
 
36    public class DummyTransformer extends BaseCommand {
37   
38    /** The Constant LOGGER. */
39    private static final Logger LOGGER = Logger.getLogger(CallServer.class
40    .getName());
41   
42    /**
43    * Instantiates a new dummy transformer.
44    */
 
45  0 toggle public DummyTransformer() {
46  0 super();
47    }
48   
49    /**
50    * Instantiates a new dummy transformer.
51    *
52    * @param next the next
53    */
 
54  1 toggle public DummyTransformer(final ConnectorCommand next) {
55  1 super(next);
56    }
57   
58    /*
59    * (non-Javadoc)
60    *
61    * @see
62    * net.sf.arestc.core.BaseCommand#process(net.sf.arestc.core.ConnectorRequest
63    * , net.sf.arestc.core.ConnectorContext)
64    */
 
65  1 toggle @Override
66    public ConnectorContext process(final ConnectorRequest request,
67    final ConnectorContext context) throws CommandException {
68  1 try {
69  1 final String name = request.getServiceName();
70  1 context.setReturnedBody(IOUtils.toString(this.getClass()
71    .getClassLoader().getResourceAsStream(name)));
72    } catch (final MalformedURLException e) {
73  0 LOGGER.error("Error occured in process:", e);
74    } catch (final IOException e) {
75  0 LOGGER.error("Error occured in process:", e);
76    }
77  1 return super.process(request, context);
78    }
79   
80    }