diff --git a/README.md b/README.md index beb43803ab93f659b60c3caea16a21c8fc1be06f..297ec910a42548561cfb1f4df69e6bf72bd5a42e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -_This is an assignment to the class [Programmieren 3](https://hsro-inf-prg3.github.io) at the [Technical University of Applied Sciences Rosenheim](https://www.th-rosenheim.de)._ +_This is an assignment to the [Software Architecture](https://ohm-softa.github.io) class at the [Technische Hochschule Nürnberg](http://www.th-nuernberg.de)._ # Assignment 11: Futures - CLI variant diff --git a/build.gradle b/build.gradle index dc6437f474780bd66f92aa88998cd8ebb5efd190..c5007fe37da6ebc475030c9ed60a129049446671 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ repositories { } // Define the main class for the application -mainClassName = 'de.thro.inf.prg3.a11.App' +mainClassName = 'ohm.softa.a11.App' dependencies { /* Commons Lang3 */ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 457aad0d98108420a977756b7145c93c8910b076..5c2d1cf016b3885f6930543d57b744ea8c220a1a 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6295dd776c08edd99de1b29fe9549e12509bb80d..f4d7b2bf616f7674854ff527df47b371b72472da 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Thu Dec 13 17:32:22 CET 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip diff --git a/gradlew b/gradlew index af6708ff229fda75da4f7cc4da4747217bac4d53..b0d6d0ab5deb588123dd658f0b079934ee05a72e 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index 6d57edc706c93465988754383a2d7ff353d4e79f..15e1ee37a70d7dfdfd8cf727022e117b6f6153a7 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,84 +1,100 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/java/de/thro/inf/prg3/a11/App.java b/src/main/java/ohm/softa/a11/App.java similarity index 58% rename from src/main/java/de/thro/inf/prg3/a11/App.java rename to src/main/java/ohm/softa/a11/App.java index 9b8041149e09f69740001b0713788c4ffd42e4ef..a126cd09a1a6b56e4002d7ca4f8fa344e69c03a7 100644 --- a/src/main/java/de/thro/inf/prg3/a11/App.java +++ b/src/main/java/ohm/softa/a11/App.java @@ -1,11 +1,11 @@ -package de.thro.inf.prg3.a11; +package ohm.softa.a11; -import de.thro.inf.prg3.a11.openmensa.OpenMensaAPI; -import de.thro.inf.prg3.a11.openmensa.OpenMensaAPIService; -import de.thro.inf.prg3.a11.openmensa.model.Canteen; -import de.thro.inf.prg3.a11.openmensa.model.Meal; -import de.thro.inf.prg3.a11.openmensa.model.PageInfo; -import de.thro.inf.prg3.a11.util.ListUtil; +import ohm.softa.a11.openmensa.OpenMensaAPI; +import ohm.softa.a11.openmensa.OpenMensaAPIService; +import ohm.softa.a11.openmensa.model.Canteen; +import ohm.softa.a11.openmensa.model.Meal; +import ohm.softa.a11.openmensa.model.PageInfo; +import ohm.softa.a11.util.ListUtil; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -60,50 +60,53 @@ public class App { */ private static void printCanteens() throws ExecutionException, InterruptedException { System.out.print("Fetching canteens ["); - openMensaAPI.getCanteens().thenApply(response -> { - System.out.print("#"); - PageInfo pageInfo = PageInfo.extractFromResponse(response); - List<Canteen> allCanteens; - - /* unwrapping the response body */ - if (response.body() == null) { - /* fallback to empty list if response body was empty */ - allCanteens = new LinkedList<>(); - } else { - allCanteens = response.body(); - } - - /* declare variable to be able to use `thenCombine` */ - CompletableFuture<List<Canteen>> remainingCanteensFuture = null; - - for (int i = 2; i <= pageInfo.getTotalCountOfPages(); i++) { + openMensaAPI.getCanteens() + .thenApply(response -> { System.out.print("#"); - /* if we're fetching the first page the future is null and has to be assigned */ - if (remainingCanteensFuture == null) { - remainingCanteensFuture = openMensaAPI.getCanteens(i); + PageInfo pageInfo = PageInfo.extractFromResponse(response); + List<Canteen> allCanteens; + + /* unwrapping the response body */ + if (response.body() == null) { + /* fallback to empty list if response body was empty */ + allCanteens = new LinkedList<>(); } else { - /* from the second page on the futures are combined - * to combine a future with another you have to provide a function to combine the results */ - remainingCanteensFuture = remainingCanteensFuture.thenCombine(openMensaAPI.getCanteens(i), ListUtil::mergeLists); + allCanteens = response.body(); } - } - try { - /* collect all retrieved in one list */ - allCanteens.addAll(remainingCanteensFuture.get()); - } catch (InterruptedException | ExecutionException e) { - e.printStackTrace(); - } - System.out.println("]"); - /* sort the retrieved canteens by their ids and return them */ - allCanteens.sort(Comparator.comparing(Canteen::getId)); - return allCanteens; - }).thenAccept(canteens -> { - /* print all canteens to STDOUT */ - for (Canteen c : canteens) { - System.out.println(c); - } - }).get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ + /* declare variable to be able to use `thenCombine` */ + CompletableFuture<List<Canteen>> remainingCanteensFuture = null; + + for (int i = 2; i <= pageInfo.getTotalCountOfPages(); i++) { + System.out.print("#"); + /* if we're fetching the first page the future is null and has to be assigned */ + if (remainingCanteensFuture == null) { + remainingCanteensFuture = openMensaAPI.getCanteens(i); + } else { + /* from the second page on the futures are combined + * to combine a future with another you have to provide a function to combine the results */ + remainingCanteensFuture = remainingCanteensFuture.thenCombine(openMensaAPI.getCanteens(i), ListUtil::mergeLists); + } + } + + try { + /* collect all retrieved in one list */ + allCanteens.addAll(remainingCanteensFuture.get()); + } catch (InterruptedException | ExecutionException e) { + e.printStackTrace(); + } + System.out.println("]"); + /* sort the retrieved canteens by their ids and return them */ + allCanteens.sort(Comparator.comparing(Canteen::getId)); + return allCanteens; + }) + .thenAccept(canteens -> { + /* print all canteens to STDOUT */ + for (Canteen c : canteens) { + System.out.println(c); + } + }) + .get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ } /** @@ -121,24 +124,27 @@ public class App { final String dateString = dateFormat.format(currentDate.getTime()); /* fetch the state of the canteen */ - openMensaAPI.getCanteenState(currentCanteenId, dateString).thenApply(state -> { - /* if canteen is open fetch the meals */ - if (state != null && !state.isClosed()) { - try { - return openMensaAPI.getMeals(currentCanteenId, dateString).get(); - } catch (InterruptedException | ExecutionException e) { + openMensaAPI.getCanteenState(currentCanteenId, dateString) + .thenApply(state -> { + /* if canteen is open fetch the meals */ + if (state != null && !state.isClosed()) { + try { + return openMensaAPI.getMeals(currentCanteenId, dateString).get(); + } catch (InterruptedException | ExecutionException e) { + } + } else { + /* if canteen is not open - print a message and return */ + System.out.println(String.format("Seems like the canteen has closed on this date: %s", dateFormat.format(currentDate.getTime()))); } - } else { - /* if canteen is not open - print a message and return */ - System.out.println(String.format("Seems like the canteen has closed on this date: %s", dateFormat.format(currentDate.getTime()))); - } - return new LinkedList<Meal>(); - }).thenAccept(meals -> { - /* print the retrieved meals to the STDOUT */ - for (Meal m : meals) { - System.out.println(m); - } - }).get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ + return new LinkedList<Meal>(); + }) + .thenAccept(meals -> { + /* print the retrieved meals to the STDOUT */ + for (Meal m : meals) { + System.out.println(m); + } + }) + .get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ } /** diff --git a/src/main/java/de/thro/inf/prg3/a11/App2.java b/src/main/java/ohm/softa/a11/App2.java similarity index 61% rename from src/main/java/de/thro/inf/prg3/a11/App2.java rename to src/main/java/ohm/softa/a11/App2.java index 7505f0beeac1e3a337afec134426ae273edd188d..dd7b499b5c63633598a9eea8aa5ce8c8f641f68d 100644 --- a/src/main/java/de/thro/inf/prg3/a11/App2.java +++ b/src/main/java/ohm/softa/a11/App2.java @@ -1,10 +1,10 @@ -package de.thro.inf.prg3.a11; +package ohm.softa.a11; -import de.thro.inf.prg3.a11.openmensa.OpenMensaAPI; -import de.thro.inf.prg3.a11.openmensa.OpenMensaAPIService; -import de.thro.inf.prg3.a11.openmensa.model.Canteen; -import de.thro.inf.prg3.a11.openmensa.model.Meal; -import de.thro.inf.prg3.a11.openmensa.model.PageInfo; +import ohm.softa.a11.openmensa.OpenMensaAPI; +import ohm.softa.a11.openmensa.OpenMensaAPIService; +import ohm.softa.a11.openmensa.model.Canteen; +import ohm.softa.a11.openmensa.model.Meal; +import ohm.softa.a11.openmensa.model.PageInfo; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -58,43 +58,46 @@ public class App2 { */ private static void printCanteens() throws ExecutionException, InterruptedException { System.out.print("Fetching canteens ["); - openMensaAPI.getCanteens().thenApply(response -> { - System.out.print("#"); - PageInfo pageInfo = PageInfo.extractFromResponse(response); - - List<Canteen> allCanteens; - - /* unwrapping the response body */ - if (response.body() == null) { - /* fallback to empty list if response body was empty */ - allCanteens = new LinkedList<>(); - } else { - allCanteens = response.body(); - } - - /* iterate all pages - * 2 to including 8 because page index is not 0 indexed */ - for (int i = 2; i <= pageInfo.getTotalCountOfPages(); i++) { + openMensaAPI.getCanteens() + .thenApply(response -> { System.out.print("#"); - try { - /* you can block this thread with `get` because we are already in a - * background thread because of `thenApply` */ - allCanteens.addAll(openMensaAPI.getCanteens(i).get()); - } catch (InterruptedException | ExecutionException e) { - System.out.println("Error while retrieving canteens"); + PageInfo pageInfo = PageInfo.extractFromResponse(response); + + List<Canteen> allCanteens; + + /* unwrapping the response body */ + if (response.body() == null) { + /* fallback to empty list if response body was empty */ + allCanteens = new LinkedList<>(); + } else { + allCanteens = response.body(); } - } - System.out.println("]"); - /* sort the canteens by their id and return them */ - allCanteens.sort(Comparator.comparing(Canteen::getId)); - return allCanteens; - }).thenAccept(canteens -> { - /* print all canteens to STDOUT */ - for (Canteen c : canteens) { - System.out.println(c); - } - }).get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ + /* iterate all pages + * 2 to including 8 because page index is not 0 indexed */ + for (int i = 2; i <= pageInfo.getTotalCountOfPages(); i++) { + System.out.print("#"); + try { + /* you can block this thread with `get` because we are already in a + * background thread because of `thenApply` */ + allCanteens.addAll(openMensaAPI.getCanteens(i).get()); + } catch (InterruptedException | ExecutionException e) { + System.out.println("Error while retrieving canteens"); + } + } + + System.out.println("]"); + /* sort the canteens by their id and return them */ + allCanteens.sort(Comparator.comparing(Canteen::getId)); + return allCanteens; + }) + .thenAccept(canteens -> { + /* print all canteens to STDOUT */ + for (Canteen c : canteens) { + System.out.println(c); + } + }) + .get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ } /** @@ -112,24 +115,27 @@ public class App2 { final String dateString = dateFormat.format(currentDate.getTime()); /* fetch the state of the canteen */ - openMensaAPI.getCanteenState(currentCanteenId, dateString).thenApply(state -> { - /* if canteen is open fetch the meals */ - if (state != null && !state.isClosed()) { - try { - return openMensaAPI.getMeals(currentCanteenId, dateString).get(); - } catch (InterruptedException | ExecutionException e) { + openMensaAPI.getCanteenState(currentCanteenId, dateString) + .thenApply(state -> { + /* if canteen is open fetch the meals */ + if (state != null && !state.isClosed()) { + try { + return openMensaAPI.getMeals(currentCanteenId, dateString).get(); + } catch (InterruptedException | ExecutionException e) { + } + } else { + /* if canteen is not open - print a message and return */ + System.out.println(String.format("Seems like the canteen has closed on this date: %s", dateFormat.format(currentDate.getTime()))); } - } else { - /* if canteen is not open - print a message and return */ - System.out.println(String.format("Seems like the canteen has closed on this date: %s", dateFormat.format(currentDate.getTime()))); - } - return new LinkedList<Meal>(); - }).thenAccept(meals -> { - /* print the retrieved meals to the STDOUT */ - for (Meal m : meals) { - System.out.println(m); - } - }).get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ + return new LinkedList<Meal>(); + }) + .thenAccept(meals -> { + /* print the retrieved meals to the STDOUT */ + for (Meal m : meals) { + System.out.println(m); + } + }) + .get(); /* block the thread by calling `get` to ensure that all results are retrieved when the method is completed */ } /** diff --git a/src/main/java/de/thro/inf/prg3/a11/MenuSelection.java b/src/main/java/ohm/softa/a11/MenuSelection.java similarity index 83% rename from src/main/java/de/thro/inf/prg3/a11/MenuSelection.java rename to src/main/java/ohm/softa/a11/MenuSelection.java index 5cb37d84da314cbab286cf1b5683b7d4fbb0cbb6..4e059e465a478f2a6396ddd0e34f3ab607017373 100644 --- a/src/main/java/de/thro/inf/prg3/a11/MenuSelection.java +++ b/src/main/java/ohm/softa/a11/MenuSelection.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11; +package ohm.softa.a11; /** * @author Peter Kurfer diff --git a/src/main/java/de/thro/inf/prg3/a11/openmensa/OpenMensaAPI.java b/src/main/java/ohm/softa/a11/openmensa/OpenMensaAPI.java similarity index 89% rename from src/main/java/de/thro/inf/prg3/a11/openmensa/OpenMensaAPI.java rename to src/main/java/ohm/softa/a11/openmensa/OpenMensaAPI.java index 9e82cff2ed3b986894de7a70a41647f50df8addc..24d4bed8bfcd27980148e1ccdfad39132590b00c 100644 --- a/src/main/java/de/thro/inf/prg3/a11/openmensa/OpenMensaAPI.java +++ b/src/main/java/ohm/softa/a11/openmensa/OpenMensaAPI.java @@ -1,8 +1,8 @@ -package de.thro.inf.prg3.a11.openmensa; +package ohm.softa.a11.openmensa; -import de.thro.inf.prg3.a11.openmensa.model.Canteen; -import de.thro.inf.prg3.a11.openmensa.model.Meal; -import de.thro.inf.prg3.a11.openmensa.model.State; +import ohm.softa.a11.openmensa.model.Canteen; +import ohm.softa.a11.openmensa.model.Meal; +import ohm.softa.a11.openmensa.model.State; import retrofit2.Response; import retrofit2.http.GET; import retrofit2.http.Path; diff --git a/src/main/java/de/thro/inf/prg3/a11/openmensa/OpenMensaAPIService.java b/src/main/java/ohm/softa/a11/openmensa/OpenMensaAPIService.java similarity index 95% rename from src/main/java/de/thro/inf/prg3/a11/openmensa/OpenMensaAPIService.java rename to src/main/java/ohm/softa/a11/openmensa/OpenMensaAPIService.java index 317e8207c8a0347fad24d2bbe8e495d454e1bfee..5889d6ebf2092f950d369926daf4c66399582328 100644 --- a/src/main/java/de/thro/inf/prg3/a11/openmensa/OpenMensaAPIService.java +++ b/src/main/java/ohm/softa/a11/openmensa/OpenMensaAPIService.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11.openmensa; +package ohm.softa.a11.openmensa; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; diff --git a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/Canteen.java b/src/main/java/ohm/softa/a11/openmensa/model/Canteen.java similarity index 97% rename from src/main/java/de/thro/inf/prg3/a11/openmensa/model/Canteen.java rename to src/main/java/ohm/softa/a11/openmensa/model/Canteen.java index 966939d32044dd8dd4122ee80b8549b15cba7076..b89624e727b3a83f46fb0ef3b57d408c468cc1c6 100644 --- a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/Canteen.java +++ b/src/main/java/ohm/softa/a11/openmensa/model/Canteen.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11.openmensa.model; +package ohm.softa.a11.openmensa.model; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/Meal.java b/src/main/java/ohm/softa/a11/openmensa/model/Meal.java similarity index 96% rename from src/main/java/de/thro/inf/prg3/a11/openmensa/model/Meal.java rename to src/main/java/ohm/softa/a11/openmensa/model/Meal.java index ef67ebd578cbb3b944e0605b4ede4412fded121f..49e4e71085e99c6713ac392e3e7f52244e3c0f04 100644 --- a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/Meal.java +++ b/src/main/java/ohm/softa/a11/openmensa/model/Meal.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11.openmensa.model; +package ohm.softa.a11.openmensa.model; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/PageInfo.java b/src/main/java/ohm/softa/a11/openmensa/model/PageInfo.java similarity index 98% rename from src/main/java/de/thro/inf/prg3/a11/openmensa/model/PageInfo.java rename to src/main/java/ohm/softa/a11/openmensa/model/PageInfo.java index 8b0579bfa793779deb2687c047acc2fded80eca3..079a3d72a9706ced296da1f40a89f3422b4b3243 100644 --- a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/PageInfo.java +++ b/src/main/java/ohm/softa/a11/openmensa/model/PageInfo.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11.openmensa.model; +package ohm.softa.a11.openmensa.model; import okhttp3.Headers; import retrofit2.Response; diff --git a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/State.java b/src/main/java/ohm/softa/a11/openmensa/model/State.java similarity index 96% rename from src/main/java/de/thro/inf/prg3/a11/openmensa/model/State.java rename to src/main/java/ohm/softa/a11/openmensa/model/State.java index 0eb236a76b8c5bf2ae8db1154c70cfb9551505ce..1e4a0b588800d7e8ef29f941f581771cae4fb88f 100644 --- a/src/main/java/de/thro/inf/prg3/a11/openmensa/model/State.java +++ b/src/main/java/ohm/softa/a11/openmensa/model/State.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11.openmensa.model; +package ohm.softa.a11.openmensa.model; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/src/main/java/de/thro/inf/prg3/a11/util/ListUtil.java b/src/main/java/ohm/softa/a11/util/ListUtil.java similarity index 90% rename from src/main/java/de/thro/inf/prg3/a11/util/ListUtil.java rename to src/main/java/ohm/softa/a11/util/ListUtil.java index 53f34881342501e29d115d9230b2ddb9dedf2e6c..127396be41994a2309470fe268d6c0ac28893bc6 100644 --- a/src/main/java/de/thro/inf/prg3/a11/util/ListUtil.java +++ b/src/main/java/ohm/softa/a11/util/ListUtil.java @@ -1,4 +1,4 @@ -package de.thro.inf.prg3.a11.util; +package ohm.softa.a11.util; import java.util.LinkedList; import java.util.List; diff --git a/src/test/java/de/thro/inf/prg3/a11/tests/OpenMensaApiTests.java b/src/test/java/ohm/softa/a11/tests/OpenMensaApiTests.java similarity index 93% rename from src/test/java/de/thro/inf/prg3/a11/tests/OpenMensaApiTests.java rename to src/test/java/ohm/softa/a11/tests/OpenMensaApiTests.java index 6d546dffb2a411ced753972744495f808d5eb857..3b45da264dfef8d24470f00fad57167681492969 100644 --- a/src/test/java/de/thro/inf/prg3/a11/tests/OpenMensaApiTests.java +++ b/src/test/java/ohm/softa/a11/tests/OpenMensaApiTests.java @@ -1,8 +1,8 @@ -package de.thro.inf.prg3.a11.tests; +package ohm.softa.a11.tests; -import de.thro.inf.prg3.a11.openmensa.OpenMensaAPI; -import de.thro.inf.prg3.a11.openmensa.OpenMensaAPIService; -import de.thro.inf.prg3.a11.openmensa.model.PageInfo; +import ohm.softa.a11.openmensa.OpenMensaAPI; +import ohm.softa.a11.openmensa.OpenMensaAPIService; +import ohm.softa.a11.openmensa.model.PageInfo; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.Test;