From 85615bea25d26fb0e05bc4da17cc1980987ad1d1 Mon Sep 17 00:00:00 2001 From: Alexander-D-Karpov Date: Wed, 7 Feb 2024 16:51:14 +0300 Subject: [PATCH] major updates, moved to socket client-server connections, added all commands, fs control --- .idea/compiler.xml | 16 ++ .idea/jarRepositories.xml | 20 ++ .idea/misc.xml | 8 + .idea/modules.xml | 8 - .idea/workspace.xml | 57 ++++- itmo-prog-lab-5.iml | 7 +- pom.xml | 59 +++++ src/Main.java | 10 - src/client/ClientApp.java | 46 ---- src/client/ConsoleManager.java | 26 --- src/common/models/Coordinates.java | 29 --- src/common/models/Event.java | 37 ---- src/main/java/Main.java | 31 +++ src/main/java/client/ClientApp.java | 35 +++ src/main/java/client/ConsoleManager.java | 63 ++++++ src/main/java/common/Protocol.java | 39 ++++ src/main/java/common/enums/EventType.java | 8 + .../java}/common/enums/TicketType.java | 0 src/main/java/common/models/Coordinates.java | 29 +++ src/main/java/common/models/Event.java | 60 +++++ src/{ => main/java}/common/models/Ticket.java | 12 +- .../java}/common/utils/TicketComparator.java | 0 src/main/java/server/ClientHandler.java | 44 ++++ src/main/java/server/CollectionManager.java | 173 +++++++++++++++ .../java}/server/CommandProcessor.java | 0 src/main/java/server/FileManager.java | 66 ++++++ src/main/java/server/ServerApp.java | 32 +++ src/main/java/server/commands/AddCommand.java | 18 ++ .../java/server/commands/AddIfMinCommand.java | 16 ++ .../java/server/commands/ClearCommand.java | 15 ++ src/main/java/server/commands/Command.java | 31 +++ .../server/commands/ExecuteScriptCommand.java | 15 ++ .../java/server/commands/ExitCommand.java | 15 ++ .../server/commands/FilterByEventCommand.java | 15 ++ .../commands/FilterLessThanTypeCommand.java | 15 ++ .../commands/GroupCountingByTypeCommand.java | 14 ++ .../java/server/commands/HelpCommand.java | 32 +++ .../java/server/commands/InfoCommand.java | 14 ++ .../server/commands/RemoveByIdCommand.java | 15 ++ .../server/commands/RemoveGreaterCommand.java | 16 ++ .../server/commands/RemoveHeadCommand.java | 14 ++ .../java/server/commands/SaveCommand.java | 16 ++ .../java/server/commands/ShowCommand.java | 14 ++ .../java/server/commands/UpdateCommand.java | 17 ++ src/server/CollectionManager.java | 37 ---- src/server/FileManager.java | 36 --- src/server/ServerApp.java | 10 - src/server/commands/Command.java | 21 -- src/server/commands/HelpCommand.java | 27 --- src/server/commands/ShowCommand.java | 26 --- target/classes/Main.class | Bin 0 -> 2045 bytes target/classes/client/ClientApp.class | Bin 0 -> 2959 bytes target/classes/client/ConsoleManager.class | Bin 0 -> 3167 bytes target/classes/common/Protocol.class | Bin 0 -> 2164 bytes target/classes/common/enums/EventType.class | Bin 0 -> 1126 bytes target/classes/common/enums/TicketType.class | Bin 0 -> 1121 bytes .../classes/common/models/Coordinates.class | Bin 0 -> 755 bytes target/classes/common/models/Event.class | Bin 0 -> 1589 bytes target/classes/common/models/Ticket.class | Bin 0 -> 2752 bytes .../common/utils/TicketComparator.class | Bin 0 -> 299 bytes target/classes/server/CollectionManager.class | Bin 0 -> 9910 bytes target/classes/server/CommandProcessor.class | Bin 0 -> 2809 bytes ...FileManager$TicketsCollectionWrapper.class | Bin 0 -> 1089 bytes target/classes/server/FileManager.class | Bin 0 -> 3384 bytes target/classes/server/ServerApp.class | Bin 0 -> 2950 bytes .../classes/server/commands/AddCommand.class | Bin 0 -> 823 bytes .../server/commands/AddIfMinCommand.class | Bin 0 -> 770 bytes .../server/commands/ClearCommand.class | Bin 0 -> 651 bytes target/classes/server/commands/Command.class | Bin 0 -> 873 bytes .../commands/ExecuteScriptCommand.class | Bin 0 -> 601 bytes .../classes/server/commands/ExitCommand.class | Bin 0 -> 582 bytes .../commands/FilterByEventCommand.class | Bin 0 -> 738 bytes .../commands/FilterLessThanTypeCommand.class | Bin 0 -> 757 bytes .../commands/GroupCountingByTypeCommand.class | Bin 0 -> 660 bytes .../classes/server/commands/HelpCommand.class | Bin 0 -> 1856 bytes .../classes/server/commands/InfoCommand.class | Bin 0 -> 603 bytes .../server/commands/RemoveByIdCommand.class | Bin 0 -> 764 bytes .../commands/RemoveGreaterCommand.class | Bin 0 -> 790 bytes .../server/commands/RemoveHeadCommand.class | Bin 0 -> 624 bytes .../classes/server/commands/SaveCommand.class | Bin 0 -> 673 bytes .../classes/server/commands/ShowCommand.class | Bin 0 -> 600 bytes .../server/commands/UpdateCommand.class | Bin 0 -> 886 bytes target/lab5-1.0-SNAPSHOT.jar | Bin 0 -> 32851 bytes target/maven-archiver/pom.properties | 3 + .../compile/default-compile/createdFiles.lst | 32 +++ .../compile/default-compile/inputFiles.lst | 31 +++ target/site/css/maven-base.css | 168 ++++++++++++++ target/site/css/maven-theme.css | 161 ++++++++++++++ target/site/css/print.css | 26 +++ target/site/css/site.css | 1 + target/site/dependencies.html | 208 ++++++++++++++++++ target/site/dependency-info.html | 98 +++++++++ target/site/images/close.gif | Bin 0 -> 279 bytes target/site/images/collapsed.gif | Bin 0 -> 53 bytes target/site/images/expanded.gif | Bin 0 -> 52 bytes target/site/images/external.png | Bin 0 -> 230 bytes target/site/images/icon_error_sml.gif | Bin 0 -> 1010 bytes target/site/images/icon_info_sml.gif | Bin 0 -> 606 bytes target/site/images/icon_success_sml.gif | Bin 0 -> 990 bytes target/site/images/icon_warning_sml.gif | Bin 0 -> 576 bytes .../images/logos/build-by-maven-black.png | Bin 0 -> 2294 bytes .../images/logos/build-by-maven-white.png | Bin 0 -> 2260 bytes target/site/images/logos/maven-feather.png | Bin 0 -> 3330 bytes target/site/images/newwindow.png | Bin 0 -> 220 bytes target/site/index.html | 73 ++++++ target/site/plugin-management.html | 93 ++++++++ target/site/plugins.html | 123 +++++++++++ target/site/project-info.html | 96 ++++++++ target/site/summary.html | 108 +++++++++ 109 files changed, 2250 insertions(+), 335 deletions(-) create mode 100644 .idea/compiler.xml create mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/modules.xml create mode 100644 pom.xml delete mode 100644 src/Main.java delete mode 100644 src/client/ClientApp.java delete mode 100644 src/client/ConsoleManager.java delete mode 100644 src/common/models/Coordinates.java delete mode 100644 src/common/models/Event.java create mode 100644 src/main/java/Main.java create mode 100644 src/main/java/client/ClientApp.java create mode 100644 src/main/java/client/ConsoleManager.java create mode 100644 src/main/java/common/Protocol.java create mode 100644 src/main/java/common/enums/EventType.java rename src/{ => main/java}/common/enums/TicketType.java (100%) create mode 100644 src/main/java/common/models/Coordinates.java create mode 100644 src/main/java/common/models/Event.java rename src/{ => main/java}/common/models/Ticket.java (84%) rename src/{ => main/java}/common/utils/TicketComparator.java (100%) create mode 100644 src/main/java/server/ClientHandler.java create mode 100644 src/main/java/server/CollectionManager.java rename src/{ => main/java}/server/CommandProcessor.java (100%) create mode 100644 src/main/java/server/FileManager.java create mode 100644 src/main/java/server/ServerApp.java create mode 100644 src/main/java/server/commands/AddCommand.java create mode 100644 src/main/java/server/commands/AddIfMinCommand.java create mode 100644 src/main/java/server/commands/ClearCommand.java create mode 100644 src/main/java/server/commands/Command.java create mode 100644 src/main/java/server/commands/ExecuteScriptCommand.java create mode 100644 src/main/java/server/commands/ExitCommand.java create mode 100644 src/main/java/server/commands/FilterByEventCommand.java create mode 100644 src/main/java/server/commands/FilterLessThanTypeCommand.java create mode 100644 src/main/java/server/commands/GroupCountingByTypeCommand.java create mode 100644 src/main/java/server/commands/HelpCommand.java create mode 100644 src/main/java/server/commands/InfoCommand.java create mode 100644 src/main/java/server/commands/RemoveByIdCommand.java create mode 100644 src/main/java/server/commands/RemoveGreaterCommand.java create mode 100644 src/main/java/server/commands/RemoveHeadCommand.java create mode 100644 src/main/java/server/commands/SaveCommand.java create mode 100644 src/main/java/server/commands/ShowCommand.java create mode 100644 src/main/java/server/commands/UpdateCommand.java delete mode 100644 src/server/CollectionManager.java delete mode 100644 src/server/FileManager.java delete mode 100644 src/server/ServerApp.java delete mode 100644 src/server/commands/Command.java delete mode 100644 src/server/commands/HelpCommand.java delete mode 100644 src/server/commands/ShowCommand.java create mode 100644 target/classes/Main.class create mode 100644 target/classes/client/ClientApp.class create mode 100644 target/classes/client/ConsoleManager.class create mode 100644 target/classes/common/Protocol.class create mode 100644 target/classes/common/enums/EventType.class create mode 100644 target/classes/common/enums/TicketType.class create mode 100644 target/classes/common/models/Coordinates.class create mode 100644 target/classes/common/models/Event.class create mode 100644 target/classes/common/models/Ticket.class create mode 100644 target/classes/common/utils/TicketComparator.class create mode 100644 target/classes/server/CollectionManager.class create mode 100644 target/classes/server/CommandProcessor.class create mode 100644 target/classes/server/FileManager$TicketsCollectionWrapper.class create mode 100644 target/classes/server/FileManager.class create mode 100644 target/classes/server/ServerApp.class create mode 100644 target/classes/server/commands/AddCommand.class create mode 100644 target/classes/server/commands/AddIfMinCommand.class create mode 100644 target/classes/server/commands/ClearCommand.class create mode 100644 target/classes/server/commands/Command.class create mode 100644 target/classes/server/commands/ExecuteScriptCommand.class create mode 100644 target/classes/server/commands/ExitCommand.class create mode 100644 target/classes/server/commands/FilterByEventCommand.class create mode 100644 target/classes/server/commands/FilterLessThanTypeCommand.class create mode 100644 target/classes/server/commands/GroupCountingByTypeCommand.class create mode 100644 target/classes/server/commands/HelpCommand.class create mode 100644 target/classes/server/commands/InfoCommand.class create mode 100644 target/classes/server/commands/RemoveByIdCommand.class create mode 100644 target/classes/server/commands/RemoveGreaterCommand.class create mode 100644 target/classes/server/commands/RemoveHeadCommand.class create mode 100644 target/classes/server/commands/SaveCommand.class create mode 100644 target/classes/server/commands/ShowCommand.class create mode 100644 target/classes/server/commands/UpdateCommand.class create mode 100644 target/lab5-1.0-SNAPSHOT.jar create mode 100644 target/maven-archiver/pom.properties create mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 target/site/css/maven-base.css create mode 100644 target/site/css/maven-theme.css create mode 100644 target/site/css/print.css create mode 100644 target/site/css/site.css create mode 100644 target/site/dependencies.html create mode 100644 target/site/dependency-info.html create mode 100644 target/site/images/close.gif create mode 100644 target/site/images/collapsed.gif create mode 100644 target/site/images/expanded.gif create mode 100644 target/site/images/external.png create mode 100644 target/site/images/icon_error_sml.gif create mode 100644 target/site/images/icon_info_sml.gif create mode 100644 target/site/images/icon_success_sml.gif create mode 100644 target/site/images/icon_warning_sml.gif create mode 100644 target/site/images/logos/build-by-maven-black.png create mode 100644 target/site/images/logos/build-by-maven-white.png create mode 100644 target/site/images/logos/maven-feather.png create mode 100644 target/site/images/newwindow.png create mode 100644 target/site/index.html create mode 100644 target/site/plugin-management.html create mode 100644 target/site/plugins.html create mode 100644 target/site/project-info.html create mode 100644 target/site/summary.html diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..3d3ebce --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 07115cd..82dbec8 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,13 @@ + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 9cae477..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 168e596..c8fceed 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,13 +5,37 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +