|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BaseCommand | Line # 25 | 9 | 0% | 6 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (20) | |||
| Result | |||
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testFileDownload
net.sf.arestc.core.OverallDesignTest.testFileDownload
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testTicketRetrieval
net.sf.arestc.core.OverallDesignTest.testTicketRetrieval
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testRepositoryRetrieval
net.sf.arestc.core.OverallDesignTest.testRepositoryRetrieval
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testRepositoryMultiPost
net.sf.arestc.core.OverallDesignTest.testRepositoryMultiPost
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testFileUpload
net.sf.arestc.core.OverallDesignTest.testFileUpload
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testTicketRetrievalWithTicketer
net.sf.arestc.core.OverallDesignTest.testTicketRetrievalWithTicketer
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testRepositoryCreate
net.sf.arestc.core.OverallDesignTest.testRepositoryCreate
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.OverallDesignTest.testRepositoryDelete
net.sf.arestc.core.OverallDesignTest.testRepositoryDelete
|
1 PASS | |
|
0.6875
|
net.sf.arestc.core.OverallDesignTest.testLoadResponseFromFile
net.sf.arestc.core.OverallDesignTest.testLoadResponseFromFile
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForDownloadFile
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForDownloadFile
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForUploadMultipart
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForUploadMultipart
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForLogin
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForLogin
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForUploadFile
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForUploadFile
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForNodeCreate
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForNodeCreate
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForNodeRetrieve
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForNodeRetrieve
|
1 PASS | |
|
0.5
|
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForNodeDelete
net.sf.arestc.core.commands.ChainBuilderTest.testGetDefaultChainForNodeDelete
|
1 PASS | |
|
0.1875
|
net.sf.arestc.core.StandardConnectorRequestTest.testGetEndTransformer
net.sf.arestc.core.StandardConnectorRequestTest.testGetEndTransformer
|
1 PASS | |
|
0.1875
|
net.sf.arestc.core.StandardConnectorRequestTest.testGetEndLink
net.sf.arestc.core.StandardConnectorRequestTest.testGetEndLink
|
1 PASS | |
|
0.1875
|
net.sf.arestc.core.StandardConnectorRequestTest.testGetStartLink
net.sf.arestc.core.StandardConnectorRequestTest.testGetStartLink
|
1 PASS | |
|
0.1875
|
net.sf.arestc.core.StandardConnectorRequestTest.testGetStartTransformer
net.sf.arestc.core.StandardConnectorRequestTest.testGetStartTransformer
|
1 PASS | |
| 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 |
public BaseCommand() { |
| 31 | 25 | super(); |
| 32 | 25 | nextLink = null; |
| 33 | } | |
| 34 | ||
| 35 | 36 |
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 |
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 |
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 |
public void setNextLink(final ConnectorCommand nextLink) { |
| 70 | 17 | this.nextLink = nextLink; |
| 71 | } | |
| 72 | ||
| 73 | } | |
|
||||||||||||