-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix_client_checkstyle' into 'master'
Fix client checkstyle See merge request cse1105/2018-2019/oopp-group-12/template!104
- Loading branch information
Showing
17 changed files
with
140 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
client/src/main/java/groupxii/client/connector/LoginConnector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 20 additions & 8 deletions
28
client/src/main/java/groupxii/client/connector/TransportConnector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
package groupxii.client.connector; | ||
|
||
public class TransportConnector { | ||
public static String retrieveTransportList(){ | ||
/** | ||
* Shortcut for /vehicleNameList. | ||
*/ | ||
public static String retrieveTransportList() { | ||
String resource = "/vehicleNameList"; | ||
return Connector.getRequest(resource); | ||
} | ||
public static String calculateCO2Reduction(String goodTransportName, String badTransportName , int goodConsumption , int badConsumption) { | ||
|
||
/** | ||
* Shortcut for /calculateTransprot. | ||
*/ | ||
public static String calculateCO2Reduction(String goodTransportName, | ||
String badTransportName, | ||
int goodConsumption, | ||
int badConsumption) { | ||
String resource = "/calculateTransport" | ||
+ "?" + goodTransportName | ||
+ "&" + badTransportName | ||
+ "&" + goodConsumption | ||
+ "&" + badConsumption; | ||
+ "?goodVehicleType=" + goodTransportName | ||
+ "&badVehicleType" + badTransportName | ||
+ "&goodAvgConsumption" + goodConsumption | ||
+ "&badAvgConsumption" + badConsumption; | ||
|
||
return Connector.getRequest(resource); | ||
} | ||
|
||
/** | ||
* Shortcut for /usedTransportList. | ||
*/ | ||
public static String retrieveUsedTransportList() { | ||
String resource = "/usedTransportList"; | ||
return Connector.getRequest(resource); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.