Clover Coverage Report - ARESTC 0.1.7-SNAPSHOT
Coverage timestamp: Fri Aug 27 2010 19:12:04 CEST
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
9   73   6   1.8
2   25   0.67   5
5     1.2  
1    
 
  BaseCommand       Line # 25 9 0% 6 0 100% 1.0
 
  (20)
 
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 it under the
8    * terms of the Lesser General Public License as published by the Free Software
9    * Foundation, either version 3 of the License, or (at your option) any later
10    * version.
11    *
12    * ARESTC is distributed in the hope that it will be useful, but WITHOUT ANY
13    * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14    * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15    *
16    * You should have received a copy of the Lesser General Public License along
17    * with ARESTC. If not, see <http://www.gnu.org/licenses/>.
18    */
19    package net.sf.arestc.core;
20   
21   
22    /**
23    * The Class BaseCommand.
24    */
 
25    public class BaseCommand implements ConnectorCommand {
26   
27    /** The next link. */
28    protected ConnectorCommand nextLink;
29   
 
30  25 toggle public BaseCommand() {
31  25 super();
32  25 nextLink = null;
33    }
34   
 
35  36 toggle public BaseCommand(final ConnectorCommand next) {
36  36 super();
37  36 nextLink = next;
38    }
39   
40    /*
41    * (non-Javadoc)
42    *
43    * @see net.sf.arestc.core.ConnectorCommand#getNextLink()
44    */
 
45  54 toggle public ConnectorCommand getNextLink() {
46  54 return nextLink;
47    }
48   
49    /*
50    * (non-Javadoc)
51    *
52    * @see net.sf.arestc.core.ConnectorCommand#process(net.sf.arestc.core.
53    * ConnectorRequest, net.sf.arestc.core.ConnectorContext)
54    */
 
55  32 toggle public ConnectorContext process(final ConnectorRequest request,
56    ConnectorContext context) throws CommandException {
57  32 if (null != getNextLink()) {
58  22 context = getNextLink().process(request, context);
59    }
60  32 return context;
61    }
62   
63    /*
64    * (non-Javadoc)
65    *
66    * @see net.sf.arestc.core.ConnectorCommand#setNextLink(net.sf.arestc.core.
67    * ConnectorCommand)
68    */
 
69  17 toggle public void setNextLink(final ConnectorCommand nextLink) {
70  17 this.nextLink = nextLink;
71    }
72   
73    }