|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ServiceAuthenticationData | Line # 27 | 6 | 0% | 4 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (27) | |||
| Result | |||
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestNotNullServiceParams
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestNotNullServiceParams
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestNullServiceParams
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestNullServiceParams
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestFullServiceParams
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestFullServiceParams
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestFullParams
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestFullParams
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationAdminNoCred
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationAdminNoCred
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationNoCred
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationNoCred
|
1 PASS | |
|
1.0
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationAdminAdminCred
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationAdminAdminCred
|
1 PASS | |
|
0.8
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationUserCred
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationUserCred
|
1 PASS | |
|
0.8
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationUserNoCred
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestAuthenticationUserNoCred
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testFileDownload
net.sf.arestc.core.OverallDesignTest.testFileDownload
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testRepositoryRetrieval
net.sf.arestc.core.OverallDesignTest.testRepositoryRetrieval
|
1 PASS | |
|
0.6
|
net.sf.arestc.configuration.services.BaseServiceTest.testGetAuthenticatingUser
net.sf.arestc.configuration.services.BaseServiceTest.testGetAuthenticatingUser
|
1 PASS | |
|
0.6
|
net.sf.arestc.configuration.services.BaseServiceTest.testIsAuthenticationRequired
net.sf.arestc.configuration.services.BaseServiceTest.testIsAuthenticationRequired
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testFileUpload
net.sf.arestc.core.OverallDesignTest.testFileUpload
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testRepositoryDelete
net.sf.arestc.core.OverallDesignTest.testRepositoryDelete
|
1 PASS | |
|
0.6
|
net.sf.arestc.configuration.services.BaseServiceTest.testGetAdminPassword
net.sf.arestc.configuration.services.BaseServiceTest.testGetAdminPassword
|
1 PASS | |
|
0.6
|
net.sf.arestc.configuration.services.BaseServiceTest.testGetAdminUser
net.sf.arestc.configuration.services.BaseServiceTest.testGetAdminUser
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testRepositoryMultiPost
net.sf.arestc.core.OverallDesignTest.testRepositoryMultiPost
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testRepositoryCreate
net.sf.arestc.core.OverallDesignTest.testRepositoryCreate
|
1 PASS | |
|
0.6
|
net.sf.arestc.core.OverallDesignTest.testTicketRetrievalWithTicketer
net.sf.arestc.core.OverallDesignTest.testTicketRetrievalWithTicketer
|
1 PASS | |
|
0.4
|
net.sf.arestc.configuration.services.BaseServiceTest.testGetServiceURL
net.sf.arestc.configuration.services.BaseServiceTest.testGetServiceURL
|
1 PASS | |
|
0.4
|
net.sf.arestc.configuration.ServicesConfigurationFactoryTest.testConfigureString
net.sf.arestc.configuration.ServicesConfigurationFactoryTest.testConfigureString
|
1 PASS | |
|
0.4
|
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestNullParameters
net.sf.arestc.core.validations.RequestValidatorTest.testValidateRequestNullParameters
|
1 PASS | |
|
0.4
|
net.sf.arestc.core.OverallDesignTest.testLoadResponseFromFile
net.sf.arestc.core.OverallDesignTest.testLoadResponseFromFile
|
1 PASS | |
|
0.4
|
net.sf.arestc.configuration.services.BaseServiceTest.testGetURLParameters
net.sf.arestc.configuration.services.BaseServiceTest.testGetURLParameters
|
1 PASS | |
|
0.4
|
net.sf.arestc.configuration.ServicesConfigurationFactoryTest.testConfigure
net.sf.arestc.configuration.ServicesConfigurationFactoryTest.testConfigure
|
1 PASS | |
|
0.2
|
net.sf.arestc.core.OverallDesignTest.testTicketRetrieval
net.sf.arestc.core.OverallDesignTest.testTicketRetrieval
|
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.services; | |
| 20 | ||
| 21 | import org.apache.commons.httpclient.Credentials; | |
| 22 | ||
| 23 | // TODO: Auto-generated Javadoc | |
| 24 | /** | |
| 25 | * The Class ServiceAuthenticationData. | |
| 26 | */ | |
| 27 | public class ServiceAuthenticationData { | |
| 28 | /** The authentication required. */ | |
| 29 | private final boolean authenticationRequired; | |
| 30 | /** The authenticating user. */ | |
| 31 | private final String authenticatingUser; | |
| 32 | /** The admin credentials. */ | |
| 33 | private final Credentials adminCredentials; | |
| 34 | ||
| 35 | /** | |
| 36 | * Instantiates a new service authentication data. | |
| 37 | * | |
| 38 | * @param authenticationRequired | |
| 39 | * the authentication required | |
| 40 | * @param authenticatingUser | |
| 41 | * the authenticating user | |
| 42 | * @param adminCredentials | |
| 43 | * the admin credentials | |
| 44 | */ | |
| 45 | 280 |
public ServiceAuthenticationData(final boolean authenticationRequired, |
| 46 | final String authenticatingUser, final Credentials adminCredentials) { | |
| 47 | 280 | this.authenticationRequired = authenticationRequired; |
| 48 | 280 | this.authenticatingUser = authenticatingUser; |
| 49 | 280 | this.adminCredentials = adminCredentials; |
| 50 | } | |
| 51 | ||
| 52 | /** | |
| 53 | * Gets the admin credentials. | |
| 54 | * | |
| 55 | * @return the admin credentials | |
| 56 | */ | |
| 57 | 23 |
public Credentials getAdminCredentials() { |
| 58 | 23 | return adminCredentials; |
| 59 | } | |
| 60 | ||
| 61 | /** | |
| 62 | * Gets the authenticating user. | |
| 63 | * | |
| 64 | * @return the authenticating user | |
| 65 | */ | |
| 66 | 66 |
public String getAuthenticatingUser() { |
| 67 | 66 | return authenticatingUser; |
| 68 | } | |
| 69 | ||
| 70 | /** | |
| 71 | * Checks if is authentication required. | |
| 72 | * | |
| 73 | * @return true, if is authentication required | |
| 74 | */ | |
| 75 | 31 |
public boolean isAuthenticationRequired() { |
| 76 | 31 | return authenticationRequired; |
| 77 | } | |
| 78 | ||
| 79 | } | |
|
||||||||||||