Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code Style] Provide all documentation and address all warnings #109

Merged
merged 31 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
290006e
documentation
river3966 Aug 4, 2023
d21ce9a
documentation
river3966 Aug 5, 2023
c31b547
documentation
river3966 Aug 5, 2023
18be3b0
Merge branch 'main' into 68-entity-documentation
river3966 Aug 8, 2023
a2f5079
documentation
river3966 Aug 8, 2023
9006482
documentation
river3966 Aug 8, 2023
cdd7255
documentation
river3966 Aug 9, 2023
2b1c258
documentation
river3966 Aug 9, 2023
e6d3c84
small
river3966 Aug 11, 2023
85a20b6
small
river3966 Aug 11, 2023
c4f07b4
Merge remote-tracking branch 'origin/main' into 68-entity-documentation
river3966 Aug 11, 2023
22ba3ab
Merge remote-tracking branch 'origin/89-fix-matching-algorithm' into …
river3966 Aug 11, 2023
3ef97bf
create all attorney
river3966 Aug 11, 2023
6ebe860
ok
river3966 Aug 11, 2023
7b60f36
ok
river3966 Aug 12, 2023
0172bbc
delete attorney creation
YifanLiu2 Aug 13, 2023
53d68be
Merge remote-tracking branch 'origin/main' into 68-entity-documentation
YifanLiu2 Aug 13, 2023
6a7f933
merge with main
YifanLiu2 Aug 13, 2023
05157aa
Merge remote-tracking branch 'origin/68-entity-documentation' into 68…
river3966 Aug 13, 2023
32a2c2c
doc
river3966 Aug 13, 2023
be8f481
doc
river3966 Aug 13, 2023
8fddfcf
doc
river3966 Aug 13, 2023
1a200b4
doc
river3966 Aug 13, 2023
164ac37
commit for UIFactory test first attempt
josephpcsywm Aug 15, 2023
950aa36
commit for UIFactory test first attempt
josephpcsywm Aug 15, 2023
fe16717
finish ui factory test
YifanLiu2 Aug 15, 2023
c37575d
Merge remote-tracking branch 'origin/68-entity-documentation' into 10…
YifanLiu2 Aug 15, 2023
bd8720d
merge with main and add documentation
YifanLiu2 Aug 15, 2023
a6b069a
small changes
YifanLiu2 Aug 15, 2023
7176ecd
solve all warnings
YifanLiu2 Aug 15, 2023
179f38d
add attorney registration
YifanLiu2 Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ dependencies {
implementation 'commons-validator:commons-validator:1.7'
implementation 'com.toedter:jcalendar:1.4'
implementation 'com.fasterxml.jackson.core:jackson-core:2.12.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.7.1'
implementation 'commons-io:commons-io:2.8.0'
implementation 'cn.hutool:hutool-core:5.7.16'
implementation 'cn.hutool:hutool-core:5.8.11'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.5'

}
Expand Down
58 changes: 30 additions & 28 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import adapter.controller.*;
import adapter.presenter.*;
import businessrule.UIFactory;
import businessrule.gateway.*;
import businessrule.inputboundary.*;
import businessrule.outputboundary.*;
import businessrule.responsemodel.BaseResponseModel;
import businessrule.usecase.*;
import driver.database.*;
import driver.screen.UIDesign;
import driver.screen.UIManager;
import driver.screen.WelcomeUI;
import entity.Attorney;
import entity.factory.ClientFactory;
import entity.factory.PostFactory;
import entity.factory.QuestionFactory;
import adapters.controllers.*;
import adapters.presenters.*;
import entities.factories.AttorneyFactory;
import infrastructure.screens.UIFactory;
import usecases.gateway.*;
import usecases.inputboundary.*;
import usecases.outputboundary.*;
import usecases.responses.BaseResponseModel;
import usecases.interactors.*;
import infrastructure.database.*;
import infrastructure.screens.utils.UIDesign;
import infrastructure.screens.utils.UIManager;
import entities.factories.ClientFactory;
import entities.factories.PostFactory;
import entities.factories.QuestionFactory;

import javax.swing.*;
import java.awt.*;
Expand All @@ -25,6 +24,7 @@ public static void main(String[] args) {
ClientGateway clientGateway = new ClientRepository();
AttorneyGateway attorneyGateway = new AttorneyRepository();
ClientFactory clientFactory = new ClientFactory();
AttorneyFactory attorneyFactory = new AttorneyFactory();

QuestionFactory questionFactory = new QuestionFactory();
QuestionGateway questionGateway = new QuestionRepo();
Expand All @@ -33,14 +33,14 @@ public static void main(String[] args) {
System.out.println("System - finished set up repo");


AttorneyRepository attorneyRepo = new AttorneyRepository();
attorneyRepo.delete(12345678);
Attorney attorney = new Attorney();
attorney.setUserName("Kaxi");
attorney.setPassword("12345678");
attorney.setUserId(12345678);
attorney.setEmail("123455@gmail.com");
attorneyRepo.save(attorney);
// AttorneyRepository attorneyRepo = new AttorneyRepository();
// attorneyRepo.delete(12345678);
// Attorney attorney = new Attorney();
// attorney.setUserName("Kaxi");
// attorney.setPassword("12345678");
// attorney.setUserId(12345678);
// attorney.setEmail("123455@gmail.com");
// attorneyRepo.save(attorney);

//set up Jframe
JFrame application = new JFrame("Legal Consultation Platform");
Expand All @@ -64,8 +64,10 @@ public static void main(String[] args) {
UserLoginInputBoundary userLoginInteractor = new UserLoginInteractor(gatewayFactory, homePageOutputBoundary);
UserLoginControl loginControl = new UserLoginControl(userLoginInteractor);

UserRegisterInputBoundary clientRegisterInteractor = new ClientRegisterInteractor(clientGateway, clientFactory, registerOutputBoundary);
ClientRegisterControl registerControl = new ClientRegisterControl(clientRegisterInteractor);
UserRegisterInputBoundary clientRegisterInteractor = new ClientRegisterInteractor(clientGateway, registerOutputBoundary, clientFactory);
UserRegisterInputBoundary attorneyRegisterInteractor = new AttorneyRegisterInteractor(attorneyGateway, registerOutputBoundary, attorneyFactory);
RegisterControl registerControl = new RegisterControl(clientRegisterInteractor);
RegisterControl attorneyRegisterControl = new RegisterControl(attorneyRegisterInteractor);

QuestionInputBoundary questionInteractor = new AskQuestionInteractor(questionGateway, theQuestionOutputBoundary,
questionFactory, clientGateway);
Expand Down Expand Up @@ -93,15 +95,15 @@ public static void main(String[] args) {
postFactory, gatewayFactory);
PostControl postControl = new PostControl(replyInteractor);

RateInputBoundary rateInteractor = new RateInteractor(questionGateway, homePageOutputBoundary, clientGateway,
RateInputBoundary rateInteractor = new RateInteractor(questionGateway, homePageOutputBoundary,
attorneyGateway);
RateControl rateControl = new RateControl(rateInteractor);
System.out.println("System - finished set up use case");

//control container
ControlContainer controlContainer = new ControlContainer(registerControl, closeQuestionControl,
postControl, questionControl, rateControl, selectQuestionControl, loginControl, viewQuestionControl,
browseQuestionControl, recommendationControl);
browseQuestionControl, recommendationControl, attorneyRegisterControl);

//feed control container into the response formatter
UIManager.setControlContainer(controlContainer);
Expand Down
22 changes: 0 additions & 22 deletions src/main/java/adapter/controller/ClientRegisterControl.java

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/adapter/controller/CloseQuestionControl.java

This file was deleted.

20 changes: 0 additions & 20 deletions src/main/java/adapter/controller/PostControl.java

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/java/adapter/controller/QuestionControl.java

This file was deleted.

19 changes: 0 additions & 19 deletions src/main/java/adapter/controller/RateControl.java

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/adapter/controller/SelectQuestionControl.java

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/adapter/controller/UserLoginControl.java

This file was deleted.

20 changes: 0 additions & 20 deletions src/main/java/adapter/controller/ViewQuestionControl.java

This file was deleted.

37 changes: 0 additions & 37 deletions src/main/java/adapter/presenter/HomePageResponseFormatter.java

This file was deleted.

41 changes: 0 additions & 41 deletions src/main/java/adapter/presenter/RegisterResponseFormatter.java

This file was deleted.

41 changes: 0 additions & 41 deletions src/main/java/adapter/presenter/TheQuestionResponseFormatter.java

This file was deleted.

Loading
Loading