Denis Thiessen
2 years ago
71 changed files with 28966 additions and 1134 deletions
-
88.mvn/wrapper/MavenWrapperDownloader.java
-
BIN.mvn/wrapper/maven-wrapper.jar
-
3.mvn/wrapper/maven-wrapper.properties
-
33domain/pom.xml
-
214domain/src/main/java/de/denisthiessen/domain/aggregates/Issue.java
-
158domain/src/main/java/de/denisthiessen/domain/aggregates/Project.java
-
6domain/src/main/java/de/denisthiessen/domain/domainServices/IssueManager.java
-
6domain/src/main/java/de/denisthiessen/domain/domainServices/ProjectManager.java
-
6domain/src/main/java/de/denisthiessen/domain/domainServices/UserManager.java
-
208domain/src/main/java/de/denisthiessen/domain/entities/IssueDetails.java
-
150domain/src/main/java/de/denisthiessen/domain/entities/ProjectDetails.java
-
6domain/src/main/java/de/denisthiessen/domain/entities/User.java
-
48domain/src/main/java/de/denisthiessen/domain/repositories/IssueRepository.java
-
50domain/src/main/java/de/denisthiessen/domain/repositories/ProjectRepository.java
-
40domain/src/main/java/de/denisthiessen/domain/repositories/UserRepository.java
-
98domain/src/main/java/de/denisthiessen/domain/valueObjects/IssueState.java
-
38domain/src/main/java/de/denisthiessen/domain/valueObjects/IssueStates.java
-
38domain/src/main/java/de/denisthiessen/domain/valueObjects/IssueUrgencies.java
-
98domain/src/main/java/de/denisthiessen/domain/valueObjects/IssueUrgency.java
-
96domain/src/main/java/de/denisthiessen/domain/valueObjects/ProjectInvite.java
-
BINdomain/target/3-cleanproject-domain-1.0-SNAPSHOT.jar
-
10domain/target/classes/META-INF/MANIFEST.MF
-
BINdomain/target/classes/de/denisthiessen/domain/aggregates/Issue.class
-
BINdomain/target/classes/de/denisthiessen/domain/aggregates/Project.class
-
BINdomain/target/classes/de/denisthiessen/domain/domainServices/IssueManager.class
-
BINdomain/target/classes/de/denisthiessen/domain/domainServices/ProjectManager.class
-
BINdomain/target/classes/de/denisthiessen/domain/domainServices/UserManager.class
-
BINdomain/target/classes/de/denisthiessen/domain/entities/IssueDetails.class
-
BINdomain/target/classes/de/denisthiessen/domain/entities/ProjectDetails.class
-
BINdomain/target/classes/de/denisthiessen/domain/entities/User.class
-
BINdomain/target/classes/de/denisthiessen/domain/repositories/IssueRepository.class
-
BINdomain/target/classes/de/denisthiessen/domain/repositories/ProjectRepository.class
-
BINdomain/target/classes/de/denisthiessen/domain/repositories/UserRepository.class
-
BINdomain/target/classes/de/denisthiessen/domain/valueObjects/IssueState.class
-
BINdomain/target/classes/de/denisthiessen/domain/valueObjects/IssueStates.class
-
BINdomain/target/classes/de/denisthiessen/domain/valueObjects/IssueUrgencies.class
-
BINdomain/target/classes/de/denisthiessen/domain/valueObjects/IssueUrgency.class
-
BINdomain/target/classes/de/denisthiessen/domain/valueObjects/ProjectInvite.class
-
BINdomain/target/domain-1.0-SNAPSHOT.jar
-
3domain/target/maven-archiver/pom.properties
-
16domain/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
-
16domain/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
-
29plugin/.gitignore
-
141plugin/frontend/generated/theme-issuetracker.generated.js
-
2plugin/frontend/generated/theme.js
-
36plugin/frontend/themes/issuetracker/main-layout.css
-
3plugin/frontend/themes/issuetracker/styles.css
-
1plugin/frontend/themes/issuetracker/theme.json
-
27466plugin/package-lock.json
-
183plugin/package.json
-
258plugin/pom.xml
-
12plugin/src/main/java/de/denisthiessen/CleanProjectApplication.java
-
6plugin/src/main/java/de/denisthiessen/plugins/views/MainLayout.java
-
4plugin/src/main/java/de/denisthiessen/plugins/views/about/AboutView.java
-
4plugin/src/main/java/de/denisthiessen/plugins/views/helloworld/HelloWorldView.java
-
41plugin/webpack.config.js
-
284pom.xml
-
21src/main/java/de/denisthiessen/se/Application.java
-
6src/main/java/de/denisthiessen/se/domain/domainServices/IssueManager.java
-
6src/main/java/de/denisthiessen/se/domain/domainServices/ProjectManager.java
-
6src/main/java/de/denisthiessen/se/domain/domainServices/UserManager.java
-
6src/main/java/de/denisthiessen/se/domain/entities/User.java
-
BINsrc/main/resources/META-INF/resources/icons/icon.png
-
BINsrc/main/resources/META-INF/resources/images/empty-plant.png
-
BINsrc/main/resources/META-INF/resources/images/logo.png
-
8src/main/resources/application.properties
-
7src/main/resources/banner.txt
-
0src/main/resources/vaadin-featureflags.properties
-
96src/test/java/de/denisthiessen/issuetracker/IssueCreationTest.java
-
28src/test/java/de/denisthiessen/issuetracker/MockIssueFactory.java
-
17src/test/java/de/denisthiessen/issuetracker/MockUserFactory.java
@ -1,2 +1 @@ |
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip |
|||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar |
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>issuetracker</artifactId> |
|||
<groupId>de.denisthiessen</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>domain</artifactId> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-compiler-plugin</artifactId> |
|||
<version>3.1</version> |
|||
<configuration> |
|||
<debug>true</debug> |
|||
<source>1.8</source> |
|||
<target>1.8</target> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
<dependencies> |
|||
|
|||
</dependencies> |
|||
|
|||
</project> |
@ -1,107 +1,107 @@ |
|||
package de.denisthiessen.se.domain.aggregates; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
import java.util.Optional; |
|||
import java.util.UUID; |
|||
|
|||
import de.denisthiessen.se.domain.entities.IssueDetails; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueState; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueStates; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueUrgencies; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueUrgency; |
|||
|
|||
public class Issue { |
|||
|
|||
private final String issueId; |
|||
private IssueState issueState; |
|||
private IssueDetails issueDetails; |
|||
private IssueUrgency issueUrgency; |
|||
|
|||
public Issue(IssueDetails issueDetails, IssueState issueState, IssueUrgency issueUrgency) { |
|||
|
|||
this.issueId = UUID.randomUUID().toString(); |
|||
this.issueDetails = Objects.requireNonNull(issueDetails); |
|||
this.issueState = Objects.requireNonNull(issueState); |
|||
this.issueUrgency = Objects.requireNonNull(issueUrgency); |
|||
} |
|||
|
|||
public IssueStates getIssueState() { |
|||
return this.issueState.getIssueStateValue(); |
|||
} |
|||
|
|||
public Date getIssueStateSetDate() { |
|||
return this.issueState.getIssueStateSetDate(); |
|||
} |
|||
|
|||
public IssueUrgencies getIssueUrgency() { |
|||
return this.issueUrgency.getIssueUrgencyValue(); |
|||
} |
|||
|
|||
public Date getIssueUrgencySetDate() { |
|||
return this.issueUrgency.getIssueUrgencySetDate(); |
|||
} |
|||
|
|||
public void setIssueState(IssueState issueState) { |
|||
this.issueState = issueState; |
|||
} |
|||
|
|||
public void setIssueUrgency(IssueUrgency issueUrgency) { |
|||
this.issueUrgency = issueUrgency; |
|||
} |
|||
|
|||
public String getIssueTitle() { |
|||
return this.issueDetails.getIssueTitle(); |
|||
} |
|||
|
|||
public void setIssueTitle(String issueTitle) { |
|||
this.issueDetails.setIssueTitle(issueTitle); |
|||
} |
|||
|
|||
public String getIssueDescription() { |
|||
return this.issueDetails.getIssueDescription(); |
|||
} |
|||
|
|||
public void setIssueDescription(String issueDescription) { |
|||
this.issueDetails.setIssueDescription(issueDescription); |
|||
} |
|||
|
|||
public Optional<User> getAssignedUser() { |
|||
return this.issueDetails.getAssignedUser(); |
|||
} |
|||
|
|||
public void setAssignedUser(User assignedUser) { |
|||
this.issueDetails.setAssignedUser(assignedUser); |
|||
} |
|||
|
|||
public long getIssueTimePending() { |
|||
return this.issueDetails.getIssueTimePending(); |
|||
} |
|||
|
|||
public final String getIssueId() { |
|||
return issueId; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof Issue)) { |
|||
return false; |
|||
} |
|||
|
|||
Issue issue = (Issue) o; |
|||
|
|||
return issueId.equals(issue.getIssueId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return issueId.hashCode(); |
|||
} |
|||
} |
|||
package de.denisthiessen.domain.aggregates; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
import java.util.Optional; |
|||
import java.util.UUID; |
|||
|
|||
import de.denisthiessen.domain.entities.IssueDetails; |
|||
import de.denisthiessen.domain.entities.User; |
|||
import de.denisthiessen.domain.valueObjects.IssueState; |
|||
import de.denisthiessen.domain.valueObjects.IssueStates; |
|||
import de.denisthiessen.domain.valueObjects.IssueUrgencies; |
|||
import de.denisthiessen.domain.valueObjects.IssueUrgency; |
|||
|
|||
public class Issue { |
|||
|
|||
private final String issueId; |
|||
private IssueState issueState; |
|||
private IssueDetails issueDetails; |
|||
private IssueUrgency issueUrgency; |
|||
|
|||
public Issue(IssueDetails issueDetails, IssueState issueState, IssueUrgency issueUrgency) { |
|||
|
|||
this.issueId = UUID.randomUUID().toString(); |
|||
this.issueDetails = Objects.requireNonNull(issueDetails); |
|||
this.issueState = Objects.requireNonNull(issueState); |
|||
this.issueUrgency = Objects.requireNonNull(issueUrgency); |
|||
} |
|||
|
|||
public IssueStates getIssueState() { |
|||
return this.issueState.getIssueStateValue(); |
|||
} |
|||
|
|||
public Date getIssueStateSetDate() { |
|||
return this.issueState.getIssueStateSetDate(); |
|||
} |
|||
|
|||
public IssueUrgencies getIssueUrgency() { |
|||
return this.issueUrgency.getIssueUrgencyValue(); |
|||
} |
|||
|
|||
public Date getIssueUrgencySetDate() { |
|||
return this.issueUrgency.getIssueUrgencySetDate(); |
|||
} |
|||
|
|||
public void setIssueState(IssueState issueState) { |
|||
this.issueState = issueState; |
|||
} |
|||
|
|||
public void setIssueUrgency(IssueUrgency issueUrgency) { |
|||
this.issueUrgency = issueUrgency; |
|||
} |
|||
|
|||
public String getIssueTitle() { |
|||
return this.issueDetails.getIssueTitle(); |
|||
} |
|||
|
|||
public void setIssueTitle(String issueTitle) { |
|||
this.issueDetails.setIssueTitle(issueTitle); |
|||
} |
|||
|
|||
public String getIssueDescription() { |
|||
return this.issueDetails.getIssueDescription(); |
|||
} |
|||
|
|||
public void setIssueDescription(String issueDescription) { |
|||
this.issueDetails.setIssueDescription(issueDescription); |
|||
} |
|||
|
|||
public Optional<User> getAssignedUser() { |
|||
return this.issueDetails.getAssignedUser(); |
|||
} |
|||
|
|||
public void setAssignedUser(User assignedUser) { |
|||
this.issueDetails.setAssignedUser(assignedUser); |
|||
} |
|||
|
|||
public long getIssueTimePending() { |
|||
return this.issueDetails.getIssueTimePending(); |
|||
} |
|||
|
|||
public final String getIssueId() { |
|||
return issueId; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof Issue)) { |
|||
return false; |
|||
} |
|||
|
|||
Issue issue = (Issue) o; |
|||
|
|||
return issueId.equals(issue.getIssueId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return issueId.hashCode(); |
|||
} |
|||
} |
@ -1,79 +1,79 @@ |
|||
package de.denisthiessen.se.domain.aggregates; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Objects; |
|||
import java.util.UUID; |
|||
|
|||
import de.denisthiessen.se.domain.entities.ProjectDetails; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
|
|||
public class Project { |
|||
|
|||
private final String projectId; |
|||
|
|||
private ProjectDetails projectDetails; |
|||
private List<Issue> projectIssues; |
|||
|
|||
public Project(ProjectDetails projectDetails) { |
|||
|
|||
this.projectId = UUID.randomUUID().toString(); |
|||
this.projectDetails = Objects.requireNonNull(projectDetails); |
|||
this.projectIssues = new ArrayList<>(); |
|||
} |
|||
|
|||
public final String getProjectId() { |
|||
return this.projectId; |
|||
} |
|||
|
|||
public List<Issue> getProjectIssues() { |
|||
return this.projectIssues; |
|||
} |
|||
|
|||
public String getProjectTitle() { |
|||
return this.projectDetails.getProjectTitle(); |
|||
} |
|||
|
|||
public void setProjectTitle(String title) { |
|||
this.projectDetails.setProjectTitle(title); |
|||
} |
|||
|
|||
public String getProjectDescription() { |
|||
return this.projectDetails.getProjectDescription(); |
|||
} |
|||
|
|||
public void setProjectDescription(String description) { |
|||
this.projectDetails.setProjectDescription(description); |
|||
} |
|||
|
|||
public final User getCreatedByUser() { |
|||
return this.projectDetails.getCreatedByUser(); |
|||
} |
|||
|
|||
public final Date getProjectCreationDate() { |
|||
return this.projectDetails.getProjectCreationDate(); |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof Project)) { |
|||
return false; |
|||
} |
|||
|
|||
Project project = (Project) o; |
|||
|
|||
return projectId.equals(project.getProjectId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return projectId.hashCode(); |
|||
} |
|||
} |
|||
package de.denisthiessen.domain.aggregates; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Objects; |
|||
import java.util.UUID; |
|||
|
|||
import de.denisthiessen.domain.entities.ProjectDetails; |
|||
import de.denisthiessen.domain.entities.User; |
|||
|
|||
public class Project { |
|||
|
|||
private final String projectId; |
|||
|
|||
private ProjectDetails projectDetails; |
|||
private List<Issue> projectIssues; |
|||
|
|||
public Project(ProjectDetails projectDetails) { |
|||
|
|||
this.projectId = UUID.randomUUID().toString(); |
|||
this.projectDetails = Objects.requireNonNull(projectDetails); |
|||
this.projectIssues = new ArrayList<>(); |
|||
} |
|||
|
|||
public final String getProjectId() { |
|||
return this.projectId; |
|||
} |
|||
|
|||
public List<Issue> getProjectIssues() { |
|||
return this.projectIssues; |
|||
} |
|||
|
|||
public String getProjectTitle() { |
|||
return this.projectDetails.getProjectTitle(); |
|||
} |
|||
|
|||
public void setProjectTitle(String title) { |
|||
this.projectDetails.setProjectTitle(title); |
|||
} |
|||
|
|||
public String getProjectDescription() { |
|||
return this.projectDetails.getProjectDescription(); |
|||
} |
|||
|
|||
public void setProjectDescription(String description) { |
|||
this.projectDetails.setProjectDescription(description); |
|||
} |
|||
|
|||
public final User getCreatedByUser() { |
|||
return this.projectDetails.getCreatedByUser(); |
|||
} |
|||
|
|||
public final Date getProjectCreationDate() { |
|||
return this.projectDetails.getProjectCreationDate(); |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof Project)) { |
|||
return false; |
|||
} |
|||
|
|||
Project project = (Project) o; |
|||
|
|||
return projectId.equals(project.getProjectId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return projectId.hashCode(); |
|||
} |
|||
} |
@ -0,0 +1,6 @@ |
|||
package de.denisthiessen.domain.domainServices; |
|||
|
|||
|
|||
public class IssueManager { |
|||
|
|||
} |
@ -0,0 +1,6 @@ |
|||
package de.denisthiessen.domain.domainServices; |
|||
|
|||
|
|||
public class ProjectManager { |
|||
|
|||
} |
@ -0,0 +1,6 @@ |
|||
package de.denisthiessen.domain.domainServices; |
|||
|
|||
|
|||
public class UserManager { |
|||
|
|||
} |
@ -1,104 +1,104 @@ |
|||
package de.denisthiessen.se.domain.entities; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
import java.util.Optional; |
|||
import java.util.UUID; |
|||
|
|||
public class IssueDetails { |
|||
|
|||
private final User createdByUser; |
|||
private final Date issueCreationDate; |
|||
private final String issueDetailId; |
|||
|
|||
private String issueTitle; |
|||
private String issueDescription; |
|||
private User assignedUser; |
|||
private long issueTimePending; |
|||
|
|||
public IssueDetails(User createdByUser, String issueTitle, String issueDescription) { |
|||
this(createdByUser, null, issueTitle, issueDescription); |
|||
} |
|||
|
|||
public IssueDetails(User createdByUser, User assignedUser, String issueTitle, String issueDescription) { |
|||
this.issueDetailId = UUID.randomUUID().toString(); |
|||
this.issueCreationDate = new Date(System.currentTimeMillis()); |
|||
this.createdByUser = Objects.requireNonNull(createdByUser, "Creation User cannot be null."); |
|||
this.issueTimePending = 0L; |
|||
|
|||
this.issueTitle = Objects.requireNonNull(issueTitle, "Issue Title cannot be null."); |
|||
this.issueDescription = Objects.requireNonNull(issueDescription, "Issue Description cannot be null"); |
|||
this.assignedUser = assignedUser; |
|||
} |
|||
|
|||
public String getIssueTitle() { |
|||
return issueTitle; |
|||
} |
|||
|
|||
public void setIssueTitle(String issueTitle) { |
|||
this.issueTitle = Objects.requireNonNull(issueTitle, "Issue Title cannot be null."); |
|||
} |
|||
|
|||
public String getIssueDescription() { |
|||
return issueDescription; |
|||
} |
|||
|
|||
public void setIssueDescription(String issueDescription) { |
|||
this.issueDescription = Objects.requireNonNull(issueDescription, "Issue Description cannot be null"); |
|||
} |
|||
|
|||
public Optional<User> getAssignedUser() { |
|||
|
|||
Optional<User> assignedUser = Optional.empty(); |
|||
|
|||
if (this.assignedUser != null) { |
|||
assignedUser = Optional.of(this.assignedUser); |
|||
} |
|||
|
|||
return assignedUser; |
|||
} |
|||
|
|||
public void setAssignedUser(User assignedUser) { |
|||
this.assignedUser = assignedUser; |
|||
} |
|||
|
|||
public long getIssueTimePending() { |
|||
issueTimePending = System.currentTimeMillis() - issueCreationDate.getTime(); |
|||
return issueTimePending; |
|||
} |
|||
|
|||
public final String getIssueDetailId() { |
|||
return issueDetailId; |
|||
} |
|||
|
|||
public final User getCreatedByUser() { |
|||
return createdByUser; |
|||
} |
|||
|
|||
public final Date getIssueCreationDate() { |
|||
return issueCreationDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof IssueDetails)) { |
|||
return false; |
|||
} |
|||
|
|||
IssueDetails issueDetails = (IssueDetails) o; |
|||
|
|||
return issueDetailId.equals(issueDetails.getIssueDetailId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return issueDetailId.hashCode(); |
|||
} |
|||
|
|||
} |
|||
package de.denisthiessen.domain.entities; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
import java.util.Optional; |
|||
import java.util.UUID; |
|||
|
|||
public class IssueDetails { |
|||
|
|||
private final User createdByUser; |
|||
private final Date issueCreationDate; |
|||
private final String issueDetailId; |
|||
|
|||
private String issueTitle; |
|||
private String issueDescription; |
|||
private User assignedUser; |
|||
private long issueTimePending; |
|||
|
|||
public IssueDetails(User createdByUser, String issueTitle, String issueDescription) { |
|||
this(createdByUser, null, issueTitle, issueDescription); |
|||
} |
|||
|
|||
public IssueDetails(User createdByUser, User assignedUser, String issueTitle, String issueDescription) { |
|||
this.issueDetailId = UUID.randomUUID().toString(); |
|||
this.issueCreationDate = new Date(System.currentTimeMillis()); |
|||
this.createdByUser = Objects.requireNonNull(createdByUser, "Creation User cannot be null."); |
|||
this.issueTimePending = 0L; |
|||
|
|||
this.issueTitle = Objects.requireNonNull(issueTitle, "Issue Title cannot be null."); |
|||
this.issueDescription = Objects.requireNonNull(issueDescription, "Issue Description cannot be null"); |
|||
this.assignedUser = assignedUser; |
|||
} |
|||
|
|||
public String getIssueTitle() { |
|||
return issueTitle; |
|||
} |
|||
|
|||
public void setIssueTitle(String issueTitle) { |
|||
this.issueTitle = Objects.requireNonNull(issueTitle, "Issue Title cannot be null."); |
|||
} |
|||
|
|||
public String getIssueDescription() { |
|||
return issueDescription; |
|||
} |
|||
|
|||
public void setIssueDescription(String issueDescription) { |
|||
this.issueDescription = Objects.requireNonNull(issueDescription, "Issue Description cannot be null"); |
|||
} |
|||
|
|||
public Optional<User> getAssignedUser() { |
|||
|
|||
Optional<User> assignedUser = Optional.empty(); |
|||
|
|||
if (this.assignedUser != null) { |
|||
assignedUser = Optional.of(this.assignedUser); |
|||
} |
|||
|
|||
return assignedUser; |
|||
} |
|||
|
|||
public void setAssignedUser(User assignedUser) { |
|||
this.assignedUser = assignedUser; |
|||
} |
|||
|
|||
public long getIssueTimePending() { |
|||
issueTimePending = System.currentTimeMillis() - issueCreationDate.getTime(); |
|||
return issueTimePending; |
|||
} |
|||
|
|||
public final String getIssueDetailId() { |
|||
return issueDetailId; |
|||
} |
|||
|
|||
public final User getCreatedByUser() { |
|||
return createdByUser; |
|||
} |
|||
|
|||
public final Date getIssueCreationDate() { |
|||
return issueCreationDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof IssueDetails)) { |
|||
return false; |
|||
} |
|||
|
|||
IssueDetails issueDetails = (IssueDetails) o; |
|||
|
|||
return issueDetailId.equals(issueDetails.getIssueDetailId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return issueDetailId.hashCode(); |
|||
} |
|||
|
|||
} |
@ -1,75 +1,75 @@ |
|||
package de.denisthiessen.se.domain.entities; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
import java.util.UUID; |
|||
|
|||
public class ProjectDetails { |
|||
|
|||
private final User createdByUser; |
|||
private final Date projectCreationDate; |
|||
private final String projectDetailId; |
|||
|
|||
private String projectTitle; |
|||
private String projectDescription; |
|||
|
|||
public ProjectDetails(User createdByUser, String projectTitle, String projectDescription) { |
|||
this.projectDetailId = UUID.randomUUID().toString(); |
|||
this.projectCreationDate = new Date(System.currentTimeMillis()); |
|||
this.createdByUser = Objects.requireNonNull(createdByUser, "Creation User cannot be null."); |
|||
|
|||
this.projectTitle = Objects.requireNonNull(projectTitle, "Project Title cannot be null."); |
|||
this.projectDescription = Objects.requireNonNull(projectDescription, "Project Description cannot be null"); |
|||
} |
|||
|
|||
public String getProjectTitle() { |
|||
return projectTitle; |
|||
} |
|||
|
|||
public void setProjectTitle(String projectTitle) { |
|||
this.projectTitle = Objects.requireNonNull(projectTitle, "Project Title cannot be null."); |
|||
} |
|||
|
|||
public String getProjectDescription() { |
|||
return projectDescription; |
|||
} |
|||
|
|||
public void setProjectDescription(String projectDescription) { |
|||
this.projectDescription = Objects.requireNonNull(projectDescription, "Project Description cannot be null"); |
|||
} |
|||
|
|||
public final String getProjectDetailId() { |
|||
return projectDetailId; |
|||
} |
|||
|
|||
public final User getCreatedByUser() { |
|||
return createdByUser; |
|||
} |
|||
|
|||
public final Date getProjectCreationDate() { |
|||
return projectCreationDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof ProjectDetails)) { |
|||
return false; |
|||
} |
|||
|
|||
ProjectDetails projectDetails = (ProjectDetails) o; |
|||
|
|||
return projectDetailId.equals(projectDetails.getProjectDetailId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return projectDetailId.hashCode(); |
|||
} |
|||
|
|||
} |
|||
package de.denisthiessen.domain.entities; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
import java.util.UUID; |
|||
|
|||
public class ProjectDetails { |
|||
|
|||
private final User createdByUser; |
|||
private final Date projectCreationDate; |
|||
private final String projectDetailId; |
|||
|
|||
private String projectTitle; |
|||
private String projectDescription; |
|||
|
|||
public ProjectDetails(User createdByUser, String projectTitle, String projectDescription) { |
|||
this.projectDetailId = UUID.randomUUID().toString(); |
|||
this.projectCreationDate = new Date(System.currentTimeMillis()); |
|||
this.createdByUser = Objects.requireNonNull(createdByUser, "Creation User cannot be null."); |
|||
|
|||
this.projectTitle = Objects.requireNonNull(projectTitle, "Project Title cannot be null."); |
|||
this.projectDescription = Objects.requireNonNull(projectDescription, "Project Description cannot be null"); |
|||
} |
|||
|
|||
public String getProjectTitle() { |
|||
return projectTitle; |
|||
} |
|||
|
|||
public void setProjectTitle(String projectTitle) { |
|||
this.projectTitle = Objects.requireNonNull(projectTitle, "Project Title cannot be null."); |
|||
} |
|||
|
|||
public String getProjectDescription() { |
|||
return projectDescription; |
|||
} |
|||
|
|||
public void setProjectDescription(String projectDescription) { |
|||
this.projectDescription = Objects.requireNonNull(projectDescription, "Project Description cannot be null"); |
|||
} |
|||
|
|||
public final String getProjectDetailId() { |
|||
return projectDetailId; |
|||
} |
|||
|
|||
public final User getCreatedByUser() { |
|||
return createdByUser; |
|||
} |
|||
|
|||
public final Date getProjectCreationDate() { |
|||
return projectCreationDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof ProjectDetails)) { |
|||
return false; |
|||
} |
|||
|
|||
ProjectDetails projectDetails = (ProjectDetails) o; |
|||
|
|||
return projectDetailId.equals(projectDetails.getProjectDetailId()); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return projectDetailId.hashCode(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,6 @@ |
|||
package de.denisthiessen.domain.entities; |
|||
|
|||
|
|||
public class User { |
|||
|
|||
} |
@ -1,24 +1,24 @@ |
|||
package de.denisthiessen.se.domain.repositories; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
import de.denisthiessen.se.domain.aggregates.Issue; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
|
|||
public interface IssueRepository { |
|||
|
|||
void createIssue(Issue issue); |
|||
|
|||
void deleteIssue(String issueId); |
|||
|
|||
void modifyIssue(Issue issue); |
|||
|
|||
Optional<Issue> findIssue(String issueId); |
|||
|
|||
Iterable<Issue> getIssuesCreatedFrom(User user); |
|||
|
|||
Iterable<Issue> getIssuesAssignedTo(User user); |
|||
|
|||
Iterable<Issue> getAllIssues(); |
|||
|
|||
} |
|||
package de.denisthiessen.domain.repositories; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
import de.denisthiessen.domain.aggregates.Issue; |
|||
import de.denisthiessen.domain.entities.User; |
|||
|
|||
public interface IssueRepository { |
|||
|
|||
void createIssue(Issue issue); |
|||
|
|||
void deleteIssue(String issueId); |
|||
|
|||
void modifyIssue(Issue issue); |
|||
|
|||
Optional<Issue> findIssue(String issueId); |
|||
|
|||
Iterable<Issue> getIssuesCreatedFrom(User user); |
|||
|
|||
Iterable<Issue> getIssuesAssignedTo(User user); |
|||
|
|||
Iterable<Issue> getAllIssues(); |
|||
|
|||
} |
@ -1,25 +1,25 @@ |
|||
package de.denisthiessen.se.domain.repositories; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
import de.denisthiessen.se.domain.aggregates.Issue; |
|||
import de.denisthiessen.se.domain.aggregates.Project; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
|
|||
public interface ProjectRepository { |
|||
|
|||
void createProject(Project project); |
|||
|
|||
void deleteProject(String projectId); |
|||
|
|||
void modifyProject(Project project); |
|||
|
|||
Optional<Project> findProject(String projectId); |
|||
|
|||
Iterable<Project> getProjectsCreatedFrom(User user); |
|||
|
|||
Iterable<Issue> getIssuesInProject(String projectId); |
|||
|
|||
Iterable<Project> getAllProjects(); |
|||
|
|||
} |
|||
package de.denisthiessen.domain.repositories; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
import de.denisthiessen.domain.aggregates.Issue; |
|||
import de.denisthiessen.domain.aggregates.Project; |
|||
import de.denisthiessen.domain.entities.User; |
|||
|
|||
public interface ProjectRepository { |
|||
|
|||
void createProject(Project project); |
|||
|
|||
void deleteProject(String projectId); |
|||
|
|||
void modifyProject(Project project); |
|||
|
|||
Optional<Project> findProject(String projectId); |
|||
|
|||
Iterable<Project> getProjectsCreatedFrom(User user); |
|||
|
|||
Iterable<Issue> getIssuesInProject(String projectId); |
|||
|
|||
Iterable<Project> getAllProjects(); |
|||
|
|||
} |
@ -1,20 +1,20 @@ |
|||
package de.denisthiessen.se.domain.repositories; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
import de.denisthiessen.se.domain.aggregates.Project; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
|
|||
public interface UserRepository { |
|||
|
|||
void createUser(User user); |
|||
|
|||
void deleteUser(String userId); |
|||
|
|||
void modifyUser(User user); |
|||
|
|||
Optional<User> findProject(String userId); |
|||
|
|||
Iterable<Project> getAllUser(); |
|||
|
|||
} |
|||
package de.denisthiessen.domain.repositories; |
|||
|
|||
import java.util.Optional; |
|||
|
|||
import de.denisthiessen.domain.aggregates.Project; |
|||
import de.denisthiessen.domain.entities.User; |
|||
|
|||
public interface UserRepository { |
|||
|
|||
void createUser(User user); |
|||
|
|||
void deleteUser(String userId); |
|||
|
|||
void modifyUser(User user); |
|||
|
|||
Optional<User> findProject(String userId); |
|||
|
|||
Iterable<Project> getAllUser(); |
|||
|
|||
} |
@ -1,49 +1,49 @@ |
|||
package de.denisthiessen.se.domain.valueObjects; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
|
|||
public final class IssueState { |
|||
|
|||
private final IssueStates issueState; |
|||
private final Date issueStateSetDate; |
|||
|
|||
public IssueState(IssueStates state) { |
|||
this.issueState = Objects.requireNonNull(state); |
|||
this.issueStateSetDate = new Date(System.currentTimeMillis()); |
|||
} |
|||
|
|||
public final IssueStates getIssueStateValue() { |
|||
return issueState; |
|||
} |
|||
|
|||
public final Date getIssueStateSetDate() { |
|||
return issueStateSetDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof IssueState)) { |
|||
return false; |
|||
} |
|||
|
|||
IssueState issueState = (IssueState) o; |
|||
IssueStates issueStateValue = issueState.getIssueStateValue(); |
|||
|
|||
return issueStateValue.equals(this.issueState); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
int issueStateHashCode = issueState.hashCode(); |
|||
long issueStateSetMillis = issueStateSetDate.getTime(); |
|||
|
|||
return (int) (issueStateSetMillis / (issueStateSetMillis % issueStateHashCode)); |
|||
} |
|||
} |
|||
package de.denisthiessen.domain.valueObjects; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
|
|||
public final class IssueState { |
|||
|
|||
private final IssueStates issueState; |
|||
private final Date issueStateSetDate; |
|||
|
|||
public IssueState(IssueStates state) { |
|||
this.issueState = Objects.requireNonNull(state); |
|||
this.issueStateSetDate = new Date(System.currentTimeMillis()); |
|||
} |
|||
|
|||
public final IssueStates getIssueStateValue() { |
|||
return issueState; |
|||
} |
|||
|
|||
public final Date getIssueStateSetDate() { |
|||
return issueStateSetDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof IssueState)) { |
|||
return false; |
|||
} |
|||
|
|||
IssueState issueState = (IssueState) o; |
|||
IssueStates issueStateValue = issueState.getIssueStateValue(); |
|||
|
|||
return issueStateValue.equals(this.issueState); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
int issueStateHashCode = issueState.hashCode(); |
|||
long issueStateSetMillis = issueStateSetDate.getTime(); |
|||
|
|||
return (int) (issueStateSetMillis / (issueStateSetMillis % issueStateHashCode)); |
|||
} |
|||
} |
@ -1,19 +1,19 @@ |
|||
package de.denisthiessen.se.domain.valueObjects; |
|||
|
|||
public enum IssueStates { |
|||
|
|||
PENDING("Pending"), |
|||
IN_PROGRESS("In Progress"), |
|||
TESTING("Testing"), |
|||
DONE("Done"); |
|||
|
|||
private final String issueStateName; |
|||
|
|||
private IssueStates(String issueStateName) { |
|||
this.issueStateName = issueStateName; |
|||
} |
|||
|
|||
public final String getStateName() { |
|||
return issueStateName; |
|||
} |
|||
} |
|||
package de.denisthiessen.domain.valueObjects; |
|||
|
|||
public enum IssueStates { |
|||
|
|||
PENDING("Pending"), |
|||
IN_PROGRESS("In Progress"), |
|||
TESTING("Testing"), |
|||
DONE("Done"); |
|||
|
|||
private final String issueStateName; |
|||
|
|||
private IssueStates(String issueStateName) { |
|||
this.issueStateName = issueStateName; |
|||
} |
|||
|
|||
public final String getStateName() { |
|||
return issueStateName; |
|||
} |
|||
} |
@ -1,19 +1,19 @@ |
|||
package de.denisthiessen.se.domain.valueObjects; |
|||
|
|||
public enum IssueUrgencies { |
|||
|
|||
NON_CRITICAL("Non Critical"), |
|||
NORMAL("Normal"), |
|||
CRITICAL("Critical"), |
|||
URGENT("Urgent"); |
|||
|
|||
private final String urgencyName; |
|||
|
|||
private IssueUrgencies(String urgencyName) { |
|||
this.urgencyName = urgencyName; |
|||
} |
|||
|
|||
public final String getUrgencyName() { |
|||
return urgencyName; |
|||
} |
|||
} |
|||
package de.denisthiessen.domain.valueObjects; |
|||
|
|||
public enum IssueUrgencies { |
|||
|
|||
NON_CRITICAL("Non Critical"), |
|||
NORMAL("Normal"), |
|||
CRITICAL("Critical"), |
|||
URGENT("Urgent"); |
|||
|
|||
private final String urgencyName; |
|||
|
|||
private IssueUrgencies(String urgencyName) { |
|||
this.urgencyName = urgencyName; |
|||
} |
|||
|
|||
public final String getUrgencyName() { |
|||
return urgencyName; |
|||
} |
|||
} |
@ -1,49 +1,49 @@ |
|||
package de.denisthiessen.se.domain.valueObjects; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
|
|||
public final class IssueUrgency { |
|||
|
|||
private final IssueUrgencies issueUrgency; |
|||
private final Date issueUrgencySetDate; |
|||
|
|||
public IssueUrgency(IssueUrgencies urgency) { |
|||
this.issueUrgency = Objects.requireNonNull(urgency); |
|||
this.issueUrgencySetDate = new Date(System.currentTimeMillis()); |
|||
} |
|||
|
|||
public final IssueUrgencies getIssueUrgencyValue() { |
|||
return issueUrgency; |
|||
} |
|||
|
|||
public final Date getIssueUrgencySetDate() { |
|||
return issueUrgencySetDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof IssueUrgency)) { |
|||
return false; |
|||
} |
|||
|
|||
IssueUrgency issueUrgency = (IssueUrgency) o; |
|||
IssueUrgencies issueUrgencyValue = issueUrgency.getIssueUrgencyValue(); |
|||
|
|||
return issueUrgencyValue.equals(this.issueUrgency); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
int issueUrgencyHashCode = issueUrgency.hashCode(); |
|||
long issueUrgencySetMillis = issueUrgencySetDate.getTime(); |
|||
|
|||
return (int) (issueUrgencySetMillis / (issueUrgencySetMillis % issueUrgencyHashCode)); |
|||
} |
|||
} |
|||
package de.denisthiessen.domain.valueObjects; |
|||
|
|||
import java.util.Date; |
|||
import java.util.Objects; |
|||
|
|||
public final class IssueUrgency { |
|||
|
|||
private final IssueUrgencies issueUrgency; |
|||
private final Date issueUrgencySetDate; |
|||
|
|||
public IssueUrgency(IssueUrgencies urgency) { |
|||
this.issueUrgency = Objects.requireNonNull(urgency); |
|||
this.issueUrgencySetDate = new Date(System.currentTimeMillis()); |
|||
} |
|||
|
|||
public final IssueUrgencies getIssueUrgencyValue() { |
|||
return issueUrgency; |
|||
} |
|||
|
|||
public final Date getIssueUrgencySetDate() { |
|||
return issueUrgencySetDate; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof IssueUrgency)) { |
|||
return false; |
|||
} |
|||
|
|||
IssueUrgency issueUrgency = (IssueUrgency) o; |
|||
IssueUrgencies issueUrgencyValue = issueUrgency.getIssueUrgencyValue(); |
|||
|
|||
return issueUrgencyValue.equals(this.issueUrgency); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
int issueUrgencyHashCode = issueUrgency.hashCode(); |
|||
long issueUrgencySetMillis = issueUrgencySetDate.getTime(); |
|||
|
|||
return (int) (issueUrgencySetMillis / (issueUrgencySetMillis % issueUrgencyHashCode)); |
|||
} |
|||
} |
@ -1,48 +1,48 @@ |
|||
package de.denisthiessen.se.domain.valueObjects; |
|||
|
|||
import de.denisthiessen.se.domain.aggregates.Project; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
|
|||
public final class ProjectInvite { |
|||
|
|||
private final User user; |
|||
private final Project project; |
|||
|
|||
public ProjectInvite(User user, Project project) { |
|||
this.user = user; |
|||
this.project = project; |
|||
} |
|||
|
|||
public final User getUser() { |
|||
return user; |
|||
} |
|||
|
|||
public final Project getProject() { |
|||
return project; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof ProjectInvite)) { |
|||
return false; |
|||
} |
|||
|
|||
ProjectInvite invite = (ProjectInvite) o; |
|||
User inviteUser = invite.getUser(); |
|||
Project inviteProject = invite.getProject(); |
|||
|
|||
return (inviteUser.equals(user) && inviteProject.equals(project)); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return user.hashCode() ^ project.hashCode(); |
|||
} |
|||
|
|||
} |
|||
package de.denisthiessen.domain.valueObjects; |
|||
|
|||
import de.denisthiessen.domain.aggregates.Project; |
|||
import de.denisthiessen.domain.entities.User; |
|||
|
|||
public final class ProjectInvite { |
|||
|
|||
private final User user; |
|||
private final Project project; |
|||
|
|||
public ProjectInvite(User user, Project project) { |
|||
this.user = user; |
|||
this.project = project; |
|||
} |
|||
|
|||
public final User getUser() { |
|||
return user; |
|||
} |
|||
|
|||
public final Project getProject() { |
|||
return project; |
|||
} |
|||
|
|||
@Override |
|||
public final boolean equals(Object o) { |
|||
|
|||
if (this == o) { |
|||
return true; |
|||
} |
|||
|
|||
if (!(o instanceof ProjectInvite)) { |
|||
return false; |
|||
} |
|||
|
|||
ProjectInvite invite = (ProjectInvite) o; |
|||
User inviteUser = invite.getUser(); |
|||
Project inviteProject = invite.getProject(); |
|||
|
|||
return (inviteUser.equals(user) && inviteProject.equals(project)); |
|||
} |
|||
|
|||
@Override |
|||
public final int hashCode() { |
|||
|
|||
return user.hashCode() ^ project.hashCode(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
Manifest-Version: 1.0 |
|||
Implementation-Title: 3-cleanproject-domain |
|||
Implementation-Version: 1.0-SNAPSHOT |
|||
Built-By: Nutzer |
|||
Implementation-Vendor-Id: de.dhbw |
|||
Build-Jdk: 1.8.0_181 |
|||
Implementation-URL: https://projects.spring.io/spring-boot/#/spring-bo |
|||
ot-starter-parent/cleanproject/3-cleanproject-domain |
|||
Created-By: Maven Integration for Eclipse |
|||
|
@ -0,0 +1,3 @@ |
|||
artifactId=domain |
|||
groupId=de.denisthiessen |
|||
version=1.0-SNAPSHOT |
@ -0,0 +1,16 @@ |
|||
de\denisthiessen\domain\aggregates\Issue.class |
|||
de\denisthiessen\domain\domainServices\ProjectManager.class |
|||
de\denisthiessen\domain\entities\ProjectDetails.class |
|||
de\denisthiessen\domain\valueObjects\IssueState.class |
|||
de\denisthiessen\domain\domainServices\UserManager.class |
|||
de\denisthiessen\domain\repositories\ProjectRepository.class |
|||
de\denisthiessen\domain\valueObjects\IssueUrgencies.class |
|||
de\denisthiessen\domain\entities\IssueDetails.class |
|||
de\denisthiessen\domain\repositories\UserRepository.class |
|||
de\denisthiessen\domain\entities\User.class |
|||
de\denisthiessen\domain\valueObjects\IssueUrgency.class |
|||
de\denisthiessen\domain\valueObjects\ProjectInvite.class |
|||
de\denisthiessen\domain\valueObjects\IssueStates.class |
|||
de\denisthiessen\domain\aggregates\Project.class |
|||
de\denisthiessen\domain\repositories\IssueRepository.class |
|||
de\denisthiessen\domain\domainServices\IssueManager.class |
@ -0,0 +1,16 @@ |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\domainServices\IssueManager.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\valueObjects\IssueStates.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\entities\ProjectDetails.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\domainServices\UserManager.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\aggregates\Project.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\valueObjects\ProjectInvite.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\valueObjects\IssueUrgency.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\domainServices\ProjectManager.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\entities\User.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\repositories\IssueRepository.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\repositories\UserRepository.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\repositories\ProjectRepository.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\valueObjects\IssueState.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\aggregates\Issue.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\valueObjects\IssueUrgencies.java |
|||
C:\Users\Nutzer\Desktop\Studienzeug\IssueTracker SE2\is_2\domain\src\main\java\de\denisthiessen\domain\entities\IssueDetails.java |
@ -0,0 +1,29 @@ |
|||
HELP.md |
|||
/target/ |
|||
!.mvn/wrapper/maven-wrapper.jar |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
|||
/build/ |
|||
|
|||
### VS Code ### |
|||
.vscode/ |
@ -0,0 +1,141 @@ |
|||
import 'construct-style-sheets-polyfill'; |
|||
import { DomModule } from "@polymer/polymer/lib/elements/dom-module"; |
|||
import { stylesFromTemplate } from "@polymer/polymer/lib/utils/style-gather"; |
|||
|
|||
const createLinkReferences = (css, target) => { |
|||
// Unresolved urls are written as '@import url(text);' to the css
|
|||
// [0] is the full match
|
|||
// [1] matches the media query
|
|||
// [2] matches the url
|
|||
const importMatcher = /(?:@media\s(.+?))?(?:\s{)?\@import\surl\((.+?)\);(?:})?/g; |
|||
|
|||
var match; |
|||
var styleCss = css; |
|||
|
|||
// For each external url import add a link reference
|
|||
while((match = importMatcher.exec(css)) !== null) { |
|||
styleCss = styleCss.replace(match[0], ""); |
|||
const link = document.createElement('link'); |
|||
link.rel = 'stylesheet'; |
|||
link.href = match[2]; |
|||
if (match[1]) { |
|||
link.media = match[1]; |
|||
} |
|||
// For target document append to head else append to target
|
|||
if (target === document) { |
|||
document.head.appendChild(link); |
|||
} else { |
|||
target.appendChild(link); |
|||
} |
|||
}; |
|||
return styleCss; |
|||
}; |
|||
|
|||
// target: Document | ShadowRoot
|
|||
export const injectGlobalCss = (css, target, first) => { |
|||
if(target === document) { |
|||
const hash = getHash(css); |
|||
if (window.Vaadin.theme.injectedGlobalCss.indexOf(hash) !== -1) { |
|||
return; |
|||
} |
|||
window.Vaadin.theme.injectedGlobalCss.push(hash); |
|||
} |
|||
const sheet = new CSSStyleSheet(); |
|||
sheet.replaceSync(createLinkReferences(css,target)); |
|||
if (first) { |
|||
target.adoptedStyleSheets = [sheet, ...target.adoptedStyleSheets]; |
|||
} else { |
|||
target.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet]; |
|||
} |
|||
}; |
|||
|
|||
const addCssBlock = function (block, before = false) { |
|||
const tpl = document.createElement("template"); |
|||
tpl.innerHTML = block; |
|||
document.head[before ? "insertBefore" : "appendChild"]( |
|||
tpl.content, |
|||
document.head.firstChild |
|||
); |
|||
}; |
|||
|
|||
const addStyleInclude = (module, target) => { |
|||
addCssBlock(`<custom-style><style include="${module}"></style></custom-style>`, true); |
|||
}; |
|||
|
|||
const getStyleModule = (id) => { |
|||
const template = DomModule.import(id, "template"); |
|||
const cssText = |
|||
template && |
|||
stylesFromTemplate(template, "") |
|||
.map((style) => style.textContent) |
|||
.join(" "); |
|||
return cssText; |
|||
}; |
|||
import stylesCss from 'themes/issuetracker/styles.css'; |
|||
import '@vaadin/vaadin-lumo-styles/typography.js'; |
|||
import '@vaadin/vaadin-lumo-styles/color.js'; |
|||
import '@vaadin/vaadin-lumo-styles/spacing.js'; |
|||
import '@vaadin/vaadin-lumo-styles/badge.js'; |
|||
|
|||
window.Vaadin = window.Vaadin || {}; |
|||
window.Vaadin.theme = window.Vaadin.theme || {}; |
|||
window.Vaadin.theme.injectedGlobalCss = []; |
|||
|
|||
/** |
|||
* Calculate a 32 bit FNV-1a hash |
|||
* Found here: https://gist.github.com/vaiorabbit/5657561
|
|||
* Ref.: http://isthe.com/chongo/tech/comp/fnv/
|
|||
* |
|||
* @param {string} str the input value |
|||
* @returns {string} 32 bit (as 8 byte hex string) |
|||
*/ |
|||
function hashFnv32a(str) { |
|||
/*jshint bitwise:false */ |
|||
let i, l, hval = 0x811c9dc5; |
|||
|
|||
for (i = 0, l = str.length; i < l; i++) { |
|||
hval ^= str.charCodeAt(i); |
|||
hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); |
|||
} |
|||
|
|||
// Convert to 8 digit hex string
|
|||
return ("0000000" + (hval >>> 0).toString(16)).substr(-8); |
|||
} |
|||
|
|||
/** |
|||
* Calculate a 64 bit hash for the given input. |
|||
* Double hash is used to significantly lower the collision probability. |
|||
* |
|||
* @param {string} input value to get hash for |
|||
* @returns {string} 64 bit (as 16 byte hex string) |
|||
*/ |
|||
function getHash(input) { |
|||
let h1 = hashFnv32a(input); // returns 32 bit (as 8 byte hex string)
|
|||
return h1 + hashFnv32a(h1 + input); |
|||
} |
|||
export const applyTheme = (target) => { |
|||
|
|||
injectGlobalCss(stylesCss.toString(), target); |
|||
|
|||
|
|||
if (!document['_vaadintheme_issuetracker_componentCss']) { |
|||
|
|||
document['_vaadintheme_issuetracker_componentCss'] = true; |
|||
} |
|||
// Lumo styles are injected into shadow roots.
|
|||
// For the document, we need to be compatible with flow-generated-imports and add missing <style> tags.
|
|||
const shadowRoot = (target instanceof ShadowRoot); |
|||
if (shadowRoot) { |
|||
injectGlobalCss(getStyleModule("lumo-typography"), target, true); |
|||
injectGlobalCss(getStyleModule("lumo-color"), target, true); |
|||
injectGlobalCss(getStyleModule("lumo-spacing"), target, true); |
|||
injectGlobalCss(getStyleModule("lumo-badge"), target, true); |
|||
} else if (!document['_vaadinthemelumoimports_']) { |
|||
addStyleInclude("lumo-typography", target); |
|||
addStyleInclude("lumo-color", target); |
|||
addStyleInclude("lumo-spacing", target); |
|||
addStyleInclude("lumo-badge", target); |
|||
document['_vaadinthemelumoimports_'] = true; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,2 @@ |
|||
import {applyTheme as _applyTheme} from 'generated/theme-issuetracker.generated.js'; |
|||
export const applyTheme = _applyTheme; |
@ -0,0 +1,36 @@ |
|||
[slot='drawer'] { |
|||
background-image: linear-gradient(0deg, var(--lumo-shade-5pct), var(--lumo-shade-5pct)); |
|||
} |
|||
|
|||
[slot='drawer'] nav a { |
|||
text-decoration: none; |
|||
transition: color 140ms; |
|||
} |
|||
|
|||
[slot='drawer'] nav a .la { |
|||
margin-top: calc(var(--lumo-space-xs) * 0.5); |
|||
} |
|||
|
|||
[slot='drawer'] nav a::before { |
|||
border-radius: var(--lumo-border-radius); |
|||
bottom: calc(var(--lumo-space-xs) * 0.5); |
|||
content: ''; |
|||
left: 0; |
|||
position: absolute; |
|||
right: 0; |
|||
top: calc(var(--lumo-space-xs) * 0.5); |
|||
transition: background-color 140ms; |
|||
} |
|||
|
|||
[slot='drawer'] nav a[highlight] { |
|||
color: var(--lumo-primary-text-color); |
|||
} |
|||
|
|||
[slot='drawer'] nav a[highlight]::before { |
|||
background-color: var(--lumo-primary-color-10pct); |
|||
} |
|||
|
|||
[slot='drawer'] footer vaadin-context-menu { |
|||
align-items: center; |
|||
display: flex; |
|||
} |
@ -0,0 +1,3 @@ |
|||
@import url('./main-layout.css'); |
|||
@import url('lumo-css-framework/all-classes.css'); |
|||
@import url('line-awesome/dist/line-awesome/css/line-awesome.min.css'); |
@ -0,0 +1 @@ |
|||
{"lumoImports":["typography","color","spacing","badge"]} |
27466
plugin/package-lock.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,183 @@ |
|||
{ |
|||
"name": "no-name", |
|||
"license": "UNLICENSED", |
|||
"dependencies": { |
|||
"@polymer/iron-a11y-announcer": "3.0.2", |
|||
"@polymer/iron-a11y-keys-behavior": "3.0.1", |
|||
"@polymer/iron-fit-behavior": "3.0.2", |
|||
"@polymer/iron-flex-layout": "3.0.1", |
|||
"@polymer/iron-icon": "3.0.1", |
|||
"@polymer/iron-iconset-svg": "3.0.1", |
|||
"@polymer/iron-list": "3.1.0", |
|||
"@polymer/iron-media-query": "3.0.1", |
|||
"@polymer/iron-meta": "3.0.1", |
|||
"@polymer/iron-overlay-behavior": "3.0.3", |
|||
"@polymer/iron-resizable-behavior": "3.0.1", |
|||
"@polymer/iron-scroll-target-behavior": "3.0.1", |
|||
"@polymer/polymer": "3.2.0", |
|||
"@vaadin/vaadin-accordion": "1.2.0", |
|||
"@vaadin/vaadin-app-layout": "2.2.0", |
|||
"@vaadin/vaadin-avatar": "1.0.4", |
|||
"@vaadin/vaadin-board": "2.2.0", |
|||
"@vaadin/vaadin-button": "2.4.0", |
|||
"@vaadin/vaadin-charts": "6.3.3", |
|||
"@vaadin/vaadin-checkbox": "2.5.1", |
|||
"@vaadin/vaadin-combo-box": "5.4.11", |
|||
"@vaadin/vaadin-confirm-dialog": "1.3.0", |
|||
"@vaadin/vaadin-context-menu": "4.6.0", |
|||
"@vaadin/vaadin-control-state-mixin": "2.2.4", |
|||
"@vaadin/vaadin-cookie-consent": "1.2.0", |
|||
"@vaadin/vaadin-core-shrinkwrap": "14.8.1", |
|||
"@vaadin/vaadin-crud": "1.3.1", |
|||
"@vaadin/vaadin-custom-field": "1.3.1", |
|||
"@vaadin/vaadin-date-picker": "4.4.1", |
|||
"@vaadin/vaadin-date-time-picker": "1.4.0", |
|||
"@vaadin/vaadin-details": "1.2.0", |
|||
"@vaadin/vaadin-development-mode-detector": "2.0.4", |
|||
"@vaadin/vaadin-dialog": "2.6.0", |
|||
"@vaadin/vaadin-element-mixin": "2.4.2", |
|||
"@vaadin/vaadin-form-layout": "2.3.0", |
|||
"@vaadin/vaadin-grid": "5.9.1", |
|||
"@vaadin/vaadin-grid-pro": "2.3.0", |
|||
"@vaadin/vaadin-icons": "4.3.2", |
|||
"@vaadin/vaadin-item": "2.3.0", |
|||
"@vaadin/vaadin-list-box": "1.4.0", |
|||
"@vaadin/vaadin-list-mixin": "2.5.1", |
|||
"@vaadin/vaadin-login": "1.2.0", |
|||
"@vaadin/vaadin-lumo-styles": "1.6.1", |
|||
"@vaadin/vaadin-material-styles": "1.3.2", |
|||
"@vaadin/vaadin-menu-bar": "1.3.0", |
|||
"@vaadin/vaadin-messages": "1.0.2", |
|||
"@vaadin/vaadin-notification": "1.6.1", |
|||
"@vaadin/vaadin-ordered-layout": "1.4.0", |
|||
"@vaadin/vaadin-overlay": "3.5.1", |
|||
"@vaadin/vaadin-progress-bar": "1.3.0", |
|||
"@vaadin/vaadin-radio-button": "1.5.4", |
|||
"@vaadin/vaadin-rich-text-editor": "1.3.1", |
|||
"@vaadin/vaadin-select": "2.4.1", |
|||
"@vaadin/vaadin-shrinkwrap": "14.8.1", |
|||
"@vaadin/vaadin-split-layout": "4.3.0", |
|||
"@vaadin/vaadin-tabs": "3.2.0", |
|||
"@vaadin/vaadin-text-field": "2.9.0", |
|||
"@vaadin/vaadin-themable-mixin": "1.6.2", |
|||
"@vaadin/vaadin-time-picker": "2.4.0", |
|||
"@vaadin/vaadin-upload": "4.4.3", |
|||
"@vaadin/vaadin-usage-statistics": "2.1.0", |
|||
"@webcomponents/shadycss": "1.8.0", |
|||
"@webcomponents/webcomponentsjs": "^2.2.10", |
|||
"construct-style-sheets-polyfill": "3.0.4", |
|||
"lit-element": "2.5.1", |
|||
"lit-html": "1.4.1" |
|||
}, |
|||
"devDependencies": { |
|||
"babel-loader": "8.2.2", |
|||
"chokidar": "^3.5.0", |
|||
"compression-webpack-plugin": "4.0.1", |
|||
"copy-webpack-plugin": "5.1.2", |
|||
"css-loader": "4.2.1", |
|||
"extra-watch-webpack-plugin": "1.0.3", |
|||
"extract-loader": "5.1.0", |
|||
"file-loader": "6.1.0", |
|||
"html-webpack-plugin": "4.5.2", |
|||
"lit-css-loader": "0.0.4", |
|||
"raw-loader": "3.1.0", |
|||
"ts-loader": "8.0.12", |
|||
"typescript": "4.0.3", |
|||
"webpack": "4.42.0", |
|||
"webpack-babel-multi-target-plugin": "2.5.0", |
|||
"webpack-cli": "3.3.11", |
|||
"webpack-dev-server": "3.11.0", |
|||
"webpack-merge": "4.2.2" |
|||
}, |
|||
"vaadin": { |
|||
"dependencies": { |
|||
"@polymer/iron-a11y-announcer": "3.0.2", |
|||
"@polymer/iron-a11y-keys-behavior": "3.0.1", |
|||
"@polymer/iron-fit-behavior": "3.0.2", |
|||
"@polymer/iron-flex-layout": "3.0.1", |
|||
"@polymer/iron-icon": "3.0.1", |
|||
"@polymer/iron-iconset-svg": "3.0.1", |
|||
"@polymer/iron-list": "3.1.0", |
|||
"@polymer/iron-media-query": "3.0.1", |
|||
"@polymer/iron-meta": "3.0.1", |
|||
"@polymer/iron-overlay-behavior": "3.0.3", |
|||
"@polymer/iron-resizable-behavior": "3.0.1", |
|||
"@polymer/iron-scroll-target-behavior": "3.0.1", |
|||
"@polymer/polymer": "3.2.0", |
|||
"@vaadin/vaadin-accordion": "1.2.0", |
|||
"@vaadin/vaadin-app-layout": "2.2.0", |
|||
"@vaadin/vaadin-avatar": "1.0.4", |
|||
"@vaadin/vaadin-board": "2.2.0", |
|||
"@vaadin/vaadin-button": "2.4.0", |
|||
"@vaadin/vaadin-charts": "6.3.3", |
|||
"@vaadin/vaadin-checkbox": "2.5.1", |
|||
"@vaadin/vaadin-combo-box": "5.4.11", |
|||
"@vaadin/vaadin-confirm-dialog": "1.3.0", |
|||
"@vaadin/vaadin-context-menu": "4.6.0", |
|||
"@vaadin/vaadin-control-state-mixin": "2.2.4", |
|||
"@vaadin/vaadin-cookie-consent": "1.2.0", |
|||
"@vaadin/vaadin-core-shrinkwrap": "14.8.1", |
|||
"@vaadin/vaadin-crud": "1.3.1", |
|||
"@vaadin/vaadin-custom-field": "1.3.1", |
|||
"@vaadin/vaadin-date-picker": "4.4.1", |
|||
"@vaadin/vaadin-date-time-picker": "1.4.0", |
|||
"@vaadin/vaadin-details": "1.2.0", |
|||
"@vaadin/vaadin-development-mode-detector": "2.0.4", |
|||
"@vaadin/vaadin-dialog": "2.6.0", |
|||
"@vaadin/vaadin-element-mixin": "2.4.2", |
|||
"@vaadin/vaadin-form-layout": "2.3.0", |
|||
"@vaadin/vaadin-grid": "5.9.1", |
|||
"@vaadin/vaadin-grid-pro": "2.3.0", |
|||
"@vaadin/vaadin-icons": "4.3.2", |
|||
"@vaadin/vaadin-item": "2.3.0", |
|||
"@vaadin/vaadin-list-box": "1.4.0", |
|||
"@vaadin/vaadin-list-mixin": "2.5.1", |
|||
"@vaadin/vaadin-login": "1.2.0", |
|||
"@vaadin/vaadin-lumo-styles": "1.6.1", |
|||
"@vaadin/vaadin-material-styles": "1.3.2", |
|||
"@vaadin/vaadin-menu-bar": "1.3.0", |
|||
"@vaadin/vaadin-messages": "1.0.2", |
|||
"@vaadin/vaadin-notification": "1.6.1", |
|||
"@vaadin/vaadin-ordered-layout": "1.4.0", |
|||
"@vaadin/vaadin-overlay": "3.5.1", |
|||
"@vaadin/vaadin-progress-bar": "1.3.0", |
|||
"@vaadin/vaadin-radio-button": "1.5.4", |
|||
"@vaadin/vaadin-rich-text-editor": "1.3.1", |
|||
"@vaadin/vaadin-select": "2.4.1", |
|||
"@vaadin/vaadin-shrinkwrap": "14.8.1", |
|||
"@vaadin/vaadin-split-layout": "4.3.0", |
|||
"@vaadin/vaadin-tabs": "3.2.0", |
|||
"@vaadin/vaadin-text-field": "2.9.0", |
|||
"@vaadin/vaadin-themable-mixin": "1.6.2", |
|||
"@vaadin/vaadin-time-picker": "2.4.0", |
|||
"@vaadin/vaadin-upload": "4.4.3", |
|||
"@vaadin/vaadin-usage-statistics": "2.1.0", |
|||
"@webcomponents/shadycss": "1.8.0", |
|||
"@webcomponents/webcomponentsjs": "^2.2.10", |
|||
"construct-style-sheets-polyfill": "3.0.4", |
|||
"lit-element": "2.5.1", |
|||
"lit-html": "1.4.1" |
|||
}, |
|||
"devDependencies": { |
|||
"babel-loader": "8.2.2", |
|||
"chokidar": "^3.5.0", |
|||
"compression-webpack-plugin": "4.0.1", |
|||
"copy-webpack-plugin": "5.1.2", |
|||
"css-loader": "4.2.1", |
|||
"extra-watch-webpack-plugin": "1.0.3", |
|||
"extract-loader": "5.1.0", |
|||
"file-loader": "6.1.0", |
|||
"html-webpack-plugin": "4.5.2", |
|||
"lit-css-loader": "0.0.4", |
|||
"raw-loader": "3.1.0", |
|||
"ts-loader": "8.0.12", |
|||
"typescript": "4.0.3", |
|||
"webpack": "4.42.0", |
|||
"webpack-babel-multi-target-plugin": "2.5.0", |
|||
"webpack-cli": "3.3.11", |
|||
"webpack-dev-server": "3.11.0", |
|||
"webpack-merge": "4.2.2" |
|||
}, |
|||
"hash": "26db63d7d7c059297aa1d4d8aee4fb2ebf860941902e95094c1eb8bf11b59024" |
|||
} |
|||
} |
@ -0,0 +1,258 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
|
|||
<parent> |
|||
<artifactId>issuetracker</artifactId> |
|||
<groupId>de.denisthiessen</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
|
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>plugin</artifactId> |
|||
|
|||
<repositories> |
|||
<!-- The order of definitions matters. Explicitly defining central here |
|||
to make sure it has the highest priority. --> |
|||
|
|||
<!-- Main Maven repository --> |
|||
<repository> |
|||
<id>central</id> |
|||
<url>https://repo.maven.apache.org/maven2</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</repository> |
|||
<!-- Repository used by many Vaadin add-ons --> |
|||
<repository> |
|||
<id>Vaadin Directory</id> |
|||
<url>https://maven.vaadin.com/vaadin-addons</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</repository> |
|||
</repositories> |
|||
|
|||
<pluginRepositories> |
|||
<!-- Main Maven repository --> |
|||
<pluginRepository> |
|||
<id>central</id> |
|||
<url>https://repo.maven.apache.org/maven2</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</pluginRepository> |
|||
</pluginRepositories> |
|||
|
|||
<dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-bom</artifactId> |
|||
<version>${vaadin.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
</dependencyManagement> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<!-- Replace artifactId with vaadin-core to use only free components --> |
|||
<artifactId>vaadin</artifactId> |
|||
<exclusions> |
|||
<!-- Webjars are only needed when running in Vaadin 13 compatibility |
|||
mode --> |
|||
<exclusion> |
|||
<groupId>com.vaadin.webjar</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.insites</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.polymer</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.polymerelements</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.vaadin</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.webcomponents</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-spring-boot-starter</artifactId> |
|||
<exclusions> |
|||
<!-- Excluding so that webjars are not included. --> |
|||
<exclusion> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-core</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.vaadin.artur</groupId> |
|||
<artifactId>a-vaadin-helper</artifactId> |
|||
<version>1.7.1</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-validation</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-devtools</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-testbench</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<!-- Include JUnit 4 support for TestBench and others --> |
|||
<dependency> |
|||
<groupId>org.junit.vintage</groupId> |
|||
<artifactId>junit-vintage-engine</artifactId> |
|||
<scope>test</scope> |
|||
<exclusions> |
|||
<exclusion> |
|||
<groupId>org.hamcrest</groupId> |
|||
<artifactId>hamcrest-core</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.github.bonigarcia</groupId> |
|||
<artifactId>webdrivermanager</artifactId> |
|||
<version>5.0.3</version> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<defaultGoal>spring-boot:run</defaultGoal> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<!-- Clean build and startup time for Vaadin apps sometimes may exceed |
|||
the default Spring Boot's 30sec timeout. --> |
|||
<configuration> |
|||
<wait>500</wait> |
|||
<maxAttempts>240</maxAttempts> |
|||
</configuration> |
|||
</plugin> |
|||
|
|||
<!-- Take care of synchronizing java dependencies and imports in package.json |
|||
and main.js files. It also creates webpack.config.js if not exists yet. --> |
|||
<plugin> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-maven-plugin</artifactId> |
|||
<version>${vaadin.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>prepare-frontend</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
<profiles> |
|||
<profile> |
|||
<!-- Production mode is activated using -Pproduction --> |
|||
<id>production</id> |
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-maven-plugin</artifactId> |
|||
<version>${vaadin.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>build-frontend</goal> |
|||
</goals> |
|||
<phase>compile</phase> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<productionMode>true</productionMode> |
|||
<pnpmEnable>false</pnpmEnable> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
</profile> |
|||
|
|||
<profile> |
|||
<id>it</id> |
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<executions> |
|||
<execution> |
|||
<id>start-spring-boot</id> |
|||
<phase>pre-integration-test</phase> |
|||
<goals> |
|||
<goal>start</goal> |
|||
</goals> |
|||
</execution> |
|||
<execution> |
|||
<id>stop-spring-boot</id> |
|||
<phase>post-integration-test</phase> |
|||
<goals> |
|||
<goal>stop</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
|
|||
<!-- Runs the integration tests (*IT) after the server is started --> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-failsafe-plugin</artifactId> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>integration-test</goal> |
|||
<goal>verify</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<trimStackTrace>false</trimStackTrace> |
|||
<enableAssertions>true</enableAssertions> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
</profile> |
|||
|
|||
</profiles> |
|||
|
|||
</project> |
@ -0,0 +1,12 @@ |
|||
package de.denisthiessen; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
|
|||
@SpringBootApplication |
|||
public class CleanProjectApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(CleanProjectApplication.class, args); |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
/** |
|||
* This file contains project specific customizations for the webpack build. |
|||
* It is autogenerated if it didn't exist or if it was made for an older |
|||
* incompatible version. |
|||
* |
|||
* Defaults are provided in an autogenerated webpack.generated.js file and used by this file. |
|||
* The webpack.generated.js file is overwritten on each build and no customization can be done there. |
|||
*/ |
|||
const merge = require('webpack-merge'); |
|||
const flowDefaults = require('./webpack.generated.js'); |
|||
|
|||
module.exports = merge(flowDefaults, { |
|||
|
|||
}); |
|||
|
|||
/** |
|||
* This file can be used to configure the flow plugin defaults. |
|||
* <code> |
|||
* // Add a custom plugin
|
|||
* flowDefaults.plugins.push(new MyPlugin()); |
|||
* |
|||
* // Update the rules to also transpile `.mjs` files
|
|||
* if (!flowDefaults.module.rules[0].test) { |
|||
* throw "Unexpected structure in generated webpack config"; |
|||
* } |
|||
* flowDefaults.module.rules[0].test = /\.m?js$/ |
|||
* |
|||
* // Include a custom JS in the entry point in addition to generated-flow-imports.js
|
|||
* if (typeof flowDefaults.entry.index != "string") { |
|||
* throw "Unexpected structure in generated webpack config"; |
|||
* } |
|||
* flowDefaults.entry.index = [flowDefaults.entry.index, "myCustomFile.js"]; |
|||
* </code> |
|||
* or add new configuration in the merge block. |
|||
* <code> |
|||
* module.exports = merge(flowDefaults, { |
|||
* mode: 'development', |
|||
* devtool: 'inline-source-map' |
|||
* }); |
|||
* </code> |
|||
*/ |
@ -1,264 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<groupId>de.denisthiessen.se</groupId> |
|||
<artifactId>issuetracker</artifactId> |
|||
<name>Basic Issue Tracker project created for the SE course</name> |
|||
<version>1.0-SNAPSHOT</version> |
|||
<packaging>war</packaging> |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<groupId>de.denisthiessen</groupId> |
|||
<artifactId>issuetracker</artifactId> |
|||
<name>Basic Issue Tracker project created for the SE course</name> |
|||
<version>1.0-SNAPSHOT</version> |
|||
<packaging>pom</packaging> |
|||
|
|||
<properties> |
|||
<java.version>8</java.version> |
|||
<vaadin.version>14.8.1</vaadin.version> |
|||
</properties> |
|||
|
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>2.5.8</version> |
|||
</parent> |
|||
|
|||
<modules> |
|||
<module>domain</module> |
|||
<module>plugin</module> |
|||
</modules> |
|||
|
|||
<properties> |
|||
<java.version>8</java.version> |
|||
<vaadin.version>14.8.1</vaadin.version> |
|||
</properties> |
|||
|
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>2.5.8</version> |
|||
</parent> |
|||
|
|||
<repositories> |
|||
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. --> |
|||
|
|||
<!-- Main Maven repository --> |
|||
<repository> |
|||
<id>central</id> |
|||
<url>https://repo.maven.apache.org/maven2</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</repository> |
|||
<!-- Repository used by many Vaadin add-ons --> |
|||
<repository> |
|||
<id>Vaadin Directory</id> |
|||
<url>https://maven.vaadin.com/vaadin-addons</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</repository> |
|||
</repositories> |
|||
|
|||
<pluginRepositories> |
|||
<!-- Main Maven repository --> |
|||
<pluginRepository> |
|||
<id>central</id> |
|||
<url>https://repo.maven.apache.org/maven2</url> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</pluginRepository> |
|||
</pluginRepositories> |
|||
|
|||
<dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-bom</artifactId> |
|||
<version>${vaadin.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
</dependencyManagement> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<!-- Replace artifactId with vaadin-core to use only free components --> |
|||
<artifactId>vaadin</artifactId> |
|||
<exclusions> |
|||
<!-- Webjars are only needed when running in Vaadin 13 compatibility mode --> |
|||
<exclusion> |
|||
<groupId>com.vaadin.webjar</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.insites</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.polymer</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.polymerelements</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.vaadin</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
<exclusion> |
|||
<groupId>org.webjars.bowergithub.webcomponents</groupId> |
|||
<artifactId>*</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-spring-boot-starter</artifactId> |
|||
<exclusions> |
|||
<!-- Excluding so that webjars are not included. --> |
|||
<exclusion> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-core</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.vaadin.artur</groupId> |
|||
<artifactId>a-vaadin-helper</artifactId> |
|||
<version>1.7.1</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-validation</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-devtools</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-testbench</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<!-- Include JUnit 4 support for TestBench and others --> |
|||
<dependency> |
|||
<groupId>org.junit.vintage</groupId> |
|||
<artifactId>junit-vintage-engine</artifactId> |
|||
<scope>test</scope> |
|||
<exclusions> |
|||
<exclusion> |
|||
<groupId>org.hamcrest</groupId> |
|||
<artifactId>hamcrest-core</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.github.bonigarcia</groupId> |
|||
<artifactId>webdrivermanager</artifactId> |
|||
<version>5.0.3</version> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<defaultGoal>spring-boot:run</defaultGoal> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<!-- Clean build and startup time for Vaadin apps sometimes may exceed |
|||
the default Spring Boot's 30sec timeout. --> |
|||
<configuration> |
|||
<wait>500</wait> |
|||
<maxAttempts>240</maxAttempts> |
|||
</configuration> |
|||
</plugin> |
|||
|
|||
<!-- |
|||
Take care of synchronizing java dependencies and imports in |
|||
package.json and main.js files. |
|||
It also creates webpack.config.js if not exists yet. |
|||
--> |
|||
<plugin> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-maven-plugin</artifactId> |
|||
<version>${vaadin.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>prepare-frontend</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
<profiles> |
|||
<profile> |
|||
<!-- Production mode is activated using -Pproduction --> |
|||
<id>production</id> |
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>com.vaadin</groupId> |
|||
<artifactId>vaadin-maven-plugin</artifactId> |
|||
<version>${vaadin.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>build-frontend</goal> |
|||
</goals> |
|||
<phase>compile</phase> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<productionMode>true</productionMode> |
|||
<pnpmEnable>false</pnpmEnable> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
</profile> |
|||
|
|||
<profile> |
|||
<id>it</id> |
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<executions> |
|||
<execution> |
|||
<id>start-spring-boot</id> |
|||
<phase>pre-integration-test</phase> |
|||
<goals> |
|||
<goal>start</goal> |
|||
</goals> |
|||
</execution> |
|||
<execution> |
|||
<id>stop-spring-boot</id> |
|||
<phase>post-integration-test</phase> |
|||
<goals> |
|||
<goal>stop</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
|
|||
<!-- Runs the integration tests (*IT) after the server is started --> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-failsafe-plugin</artifactId> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>integration-test</goal> |
|||
<goal>verify</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
<configuration> |
|||
<trimStackTrace>false</trimStackTrace> |
|||
<enableAssertions>true</enableAssertions> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
</profile> |
|||
|
|||
</profiles> |
|||
</project> |
@ -1,21 +0,0 @@ |
|||
package de.denisthiessen.se; |
|||
|
|||
import com.vaadin.flow.component.dependency.NpmPackage; |
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
|||
import org.vaadin.artur.helpers.LaunchUtil; |
|||
|
|||
/** |
|||
* The entry point of the Spring Boot application. |
|||
*/ |
|||
@SpringBootApplication |
|||
@NpmPackage(value = "lumo-css-framework", version = "^4.0.10") |
|||
@NpmPackage(value = "line-awesome", version = "1.3.0") |
|||
public class Application extends SpringBootServletInitializer { |
|||
|
|||
public static void main(String[] args) { |
|||
LaunchUtil.launchBrowserInDevelopmentMode(SpringApplication.run(Application.class, args)); |
|||
} |
|||
|
|||
} |
@ -1,6 +0,0 @@ |
|||
package de.denisthiessen.se.domain.domainServices; |
|||
|
|||
|
|||
public class IssueManager { |
|||
|
|||
} |
@ -1,6 +0,0 @@ |
|||
package de.denisthiessen.se.domain.domainServices; |
|||
|
|||
|
|||
public class ProjectManager { |
|||
|
|||
} |
@ -1,6 +0,0 @@ |
|||
package de.denisthiessen.se.domain.domainServices; |
|||
|
|||
|
|||
public class UserManager { |
|||
|
|||
} |
@ -1,6 +0,0 @@ |
|||
package de.denisthiessen.se.domain.entities; |
|||
|
|||
|
|||
public class User { |
|||
|
|||
} |
Before Width: 512 | Height: 512 | Size: 16 KiB |
Before Width: 336 | Height: 335 | Size: 69 KiB |
Before Width: 225 | Height: 225 | Size: 16 KiB |
@ -1,8 +0,0 @@ |
|||
server.port=${PORT:8080} |
|||
# Ensure application is run in Vaadin 14/npm mode |
|||
vaadin.compatibilityMode = false |
|||
logging.level.org.atmosphere = warn |
|||
# To improve the performance during development. |
|||
# For more information https://vaadin.com/docs/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters |
|||
vaadin.whitelisted-packages = com.vaadin,org.vaadin,de.denisthiessen.se |
|||
vaadin.pnpm.enable = false |
@ -1,7 +0,0 @@ |
|||
_____ _______ _ |
|||
|_ _| |__ __| | | |
|||
| | ___ ___ _ _ ___| |_ __ __ _ ___| | _____ _ __ |
|||
| | / __/ __| | | |/ _ \ | '__/ _` |/ __| |/ / _ \ '__| |
|||
_| |_\__ \__ \ |_| | __/ | | | (_| | (__| < __/ | |
|||
|_____|___/___/\__,_|\___|_|_| \__,_|\___|_|\_\___|_| |
|||
|
@ -1,96 +0,0 @@ |
|||
package de.denisthiessen.issuetracker; |
|||
|
|||
import static org.junit.Assert.assertTrue; |
|||
|
|||
import org.junit.Test; |
|||
|
|||
import de.denisthiessen.se.domain.aggregates.Issue; |
|||
import de.denisthiessen.se.domain.entities.IssueDetails; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueState; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueStates; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueUrgencies; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueUrgency; |
|||
|
|||
public class IssueCreationTest { |
|||
|
|||
@Test |
|||
public void testCorrectIssueCreation() { |
|||
|
|||
Issue issue = MockIssueFactory.getMockIssue(); |
|||
|
|||
assertTrue(issue.getIssueId() != null); |
|||
assertTrue(issue.getIssueDescription() != null); |
|||
assertTrue(issue.getIssueState() != null); |
|||
assertTrue(issue.getIssueState().getStateName() != null); |
|||
assertTrue(issue.getIssueStateSetDate() != null); |
|||
assertTrue(issue.getIssueTitle() != null); |
|||
assertTrue(issue.getIssueUrgency() != null); |
|||
assertTrue(issue.getIssueUrgency().getUrgencyName() != null); |
|||
assertTrue(issue.getIssueUrgencySetDate() != null); |
|||
} |
|||
|
|||
@Test |
|||
public void testIssueUserAssignment() { |
|||
|
|||
Issue issue = MockIssueFactory.getMockIssue(); |
|||
|
|||
assertTrue(!issue.getAssignedUser().isPresent()); |
|||
|
|||
issue.setAssignedUser(MockUserFactory.getMockUser()); |
|||
|
|||
assertTrue(issue.getAssignedUser().isPresent()); |
|||
} |
|||
|
|||
@Test |
|||
public void testIssueTimePendingParameter() { |
|||
|
|||
Issue issue = MockIssueFactory.getMockIssue(); |
|||
long issueTimePending = issue.getIssueTimePending(); |
|||
|
|||
try { |
|||
Thread.sleep(1000); |
|||
} catch (InterruptedException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
|
|||
long issueTimePendingAfterWait = issue.getIssueTimePending(); |
|||
|
|||
assertTrue((issueTimePendingAfterWait - issueTimePending) >= 1000); |
|||
} |
|||
|
|||
@Test(expected = NullPointerException.class) |
|||
public void testIncorrectIssueCreation() { |
|||
|
|||
// We test with a wrong issue detail value here... |
|||
IssueDetails details = null; |
|||
IssueUrgency urgency = new IssueUrgency(IssueUrgencies.NON_CRITICAL); |
|||
IssueState state = new IssueState(IssueStates.PENDING); |
|||
|
|||
Issue issue = new Issue(details, state, urgency); |
|||
assertTrue(issue.getIssueTitle() == null); |
|||
} |
|||
|
|||
@Test(expected = NullPointerException.class) |
|||
public void testIncorrectIssueDetailsCreation() { |
|||
|
|||
// We test with a wrong issue detail value here... |
|||
IssueDetails details = new IssueDetails(null, "Test Title", "This is just a little test description"); |
|||
assertTrue(!details.getAssignedUser().isPresent()); |
|||
} |
|||
|
|||
@Test(expected = NullPointerException.class) |
|||
public void testIncorrectIssueUrgencyCreation() { |
|||
|
|||
// We test with a wrong issue urgency value here... |
|||
IssueUrgency urgency = new IssueUrgency(null); |
|||
assertTrue(urgency.getIssueUrgencyValue() == null); |
|||
} |
|||
|
|||
@Test(expected = NullPointerException.class) |
|||
public void testIncorrectIssueStateCreation() { |
|||
|
|||
// We test with a wrong issue state value here... |
|||
IssueState state = new IssueState(null); |
|||
assertTrue(state.getIssueStateValue() == null); |
|||
} |
|||
} |
@ -1,28 +0,0 @@ |
|||
package de.denisthiessen.issuetracker; |
|||
|
|||
import de.denisthiessen.se.domain.aggregates.Issue; |
|||
import de.denisthiessen.se.domain.entities.IssueDetails; |
|||
import de.denisthiessen.se.domain.entities.User; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueState; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueStates; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueUrgencies; |
|||
import de.denisthiessen.se.domain.valueObjects.IssueUrgency; |
|||
|
|||
public class MockIssueFactory { |
|||
|
|||
private static Issue mockIssue; |
|||
|
|||
public static Issue getMockIssue() { |
|||
|
|||
if (mockIssue == null) { |
|||
|
|||
User user = MockUserFactory.getMockUser(); |
|||
IssueDetails details = new IssueDetails(user, "Test Issue", "Hello... This is just a test issue description."); |
|||
IssueUrgency urgency = new IssueUrgency(IssueUrgencies.NON_CRITICAL); |
|||
IssueState state = new IssueState(IssueStates.PENDING); |
|||
mockIssue = new Issue(details, state, urgency); |
|||
} |
|||
|
|||
return mockIssue; |
|||
} |
|||
} |
@ -1,17 +0,0 @@ |
|||
package de.denisthiessen.issuetracker; |
|||
|
|||
import de.denisthiessen.se.domain.entities.User; |
|||
|
|||
public class MockUserFactory { |
|||
|
|||
private static User mockUser; |
|||
|
|||
public static User getMockUser() { |
|||
|
|||
if (mockUser == null) { |
|||
mockUser = new User(); |
|||
} |
|||
|
|||
return mockUser; |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue