-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 39-feature-21-handling-change-task-details
- Loading branch information
Showing
32 changed files
with
854 additions
and
534 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import c_interface_adapters.ProjectSelectionPresenter; | ||
import d_frameworks_and_drivers.database_management.DatabaseInitializer.DBInitializer; | ||
import d_frameworks_and_drivers.database_management.ProjectUUIDArray; | ||
import javafx.application.Application; | ||
|
||
import java.util.UUID; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
System.out.println(ProjectUUIDArray.convertCsvToArrayList()); | ||
System.out.println("Main Above"); | ||
Application.launch(ProjectSelectionPresenter.class, args); | ||
} | ||
} |
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
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
143 changes: 43 additions & 100 deletions
143
...ava/b_application_business_rules/use_cases/project_selection_use_cases/CreateProject.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,100 +1,43 @@ | ||
//package b_application_business_rules.use_cases.project_selection_use_cases; | ||
//import a_enterprise_business_rules.entities.Project; | ||
//import b_application_business_rules.boundaries.ProjectSelectionInputBoundary; | ||
//import b_application_business_rules.boundaries.ProjectSelectionOutputBoundary; | ||
//import b_application_business_rules.entity_models.ProjectModel; | ||
//import b_application_business_rules.entity_models.ColumnModel; | ||
//import java.util.List; | ||
//import java.util.UUID; | ||
// | ||
//public class CreateProject implements ProjectSelectionInputBoundary { | ||
// private final ProjectSelectionOutputBoundary outputBoundary; | ||
// | ||
// public CreateProject(ProjectSelectionOutputBoundary outputBoundary) { | ||
// this.outputBoundary = outputBoundary; | ||
// } | ||
// | ||
// @Override | ||
// public void setCurrentProject(Project project) { | ||
// | ||
// } | ||
// | ||
// /** | ||
// * @param project | ||
// */ | ||
// @Override | ||
// public void setCurrentProject(ProjectModel project) { | ||
// | ||
// } | ||
// | ||
// @Override | ||
// public void createProject(String name, String description) { | ||
// | ||
// } | ||
// | ||
// /** | ||
// * | ||
// */ | ||
// @Override | ||
// public void createProject() { | ||
// | ||
// } | ||
// | ||
//// @Override | ||
//// public void createProject(ProjectModel projectModel){ | ||
//// try{ | ||
//// // Create the new Project entity | ||
//// Project project = createProjectEntity(projectModel); | ||
//// Project project1 = new Project(projectModel.getName(), projectModel.getID(), projectModel.getDescription(), | ||
//// projectModel.getColumnModels()); | ||
//// | ||
//// // Notify via the output boundary if created successfully | ||
//// outputBoundary.projectCreated(new ProjectModel(project.getName(), project.getID(), project.getDescription(), | ||
//// projectModel.getColumnModels())); // ??? | ||
//// } catch (Exception e){ | ||
//// // Notify via the output boundary if cretion failed | ||
//// outputBoundary.projectCreationFailed(e.getMessage()); | ||
//// } | ||
//// } | ||
// | ||
// @Override | ||
// public void projectDeletionFailed(String message) { | ||
// | ||
// } | ||
// | ||
// @Override | ||
// public void projectDeleted(UUID projectID) { | ||
// | ||
// } | ||
// | ||
// @Override | ||
// public void openProject(UUID currentProjectID) { | ||
// | ||
// } | ||
// | ||
// @Override | ||
// public void renameProject(UUID projectUUID) { | ||
// | ||
// } | ||
// | ||
// @Override | ||
// public void deleteProject(UUID projectUUID) { | ||
// | ||
// } | ||
// | ||
// // Validate projectModel data | ||
// private void validateProjectModel(ProjectModel projectModel) { | ||
// if (projectModel.getName() == null || projectModel.getName().isEmpty()){ | ||
// throw new IllegalArgumentException("Project name cannot be empty."); | ||
// } | ||
// | ||
// // to be continued | ||
// } | ||
// | ||
// // Create the Project entity from the ProjectModel (Project factory ?) | ||
//// private Project createProjectEntity(ProjectModel projectModel) { | ||
//// return new Project(projectModel.getName(), projectModel.getID(), projectModel.getDescription(), | ||
//// projectModel.getColumnModels()); // ??? | ||
//// } | ||
// | ||
//} | ||
package b_application_business_rules.use_cases.project_selection_use_cases; | ||
|
||
import a_enterprise_business_rules.entities.Column; | ||
import a_enterprise_business_rules.entities.Project; | ||
import b_application_business_rules.entity_models.ProjectModel; | ||
import b_application_business_rules.use_cases.project_selection_gateways.IDBInsert; | ||
import d_frameworks_and_drivers.database_management.DBControllers.DBManagerInsertController; | ||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
public class CreateProject { | ||
/** | ||
* Empty constructor (would be autogenerated by Java if not included anyways) | ||
*/ | ||
public CreateProject() { | ||
} | ||
|
||
/** | ||
* Creates a project in the database based on the inputted <code>Project</code>. | ||
* | ||
* @param project The project to insert into the database. | ||
*/ | ||
public void createProject(Project project) { | ||
IDBInsert databaseInserter = new DBManagerInsertController(); | ||
ProjectModel projectModel = new ProjectModel(project); | ||
databaseInserter.DBInsert(projectModel); | ||
} | ||
|
||
/** | ||
* Creates a project in the database based on the inputted project's attributes. | ||
* | ||
* @param name The project's name. | ||
* @param ID The project's UUID. | ||
* @param description The project's description. | ||
* @param columns The project's columns. | ||
*/ | ||
public void createProject(String name, UUID ID, String description, List<Column> columns) { | ||
IDBInsert databaseInserter = new DBManagerInsertController(); | ||
Project project = new Project(name, ID, description, columns); | ||
ProjectModel projectModel = new ProjectModel(project); | ||
databaseInserter.DBInsert(projectModel); | ||
} | ||
} |
Oops, something went wrong.