- Java Bug Tracker API is a Java backend project that utilizes REST API to manage a range of entities. This project consists of a total of 8 entities, namely role, user, project, issue, status, severity, priority, and issue comment. It is built using the Spring Boot framework, adhering to the MVC design pattern for effective separation of concerns. It also incorporates custom exceptions with a global exception handler to ensure robust error handling. Besides that, it features custom annotations and validators, including date format validator, date range validator, and uppercase validator to enhance the data integrity and validation capabilities of the application.
- A role has more than one user, a user belongs to only one role (roles to users, 1 to M)
- A user (admin or manager) can create more than one project, a project can be created by only one user (users to projects, 1 to M)
- A user can involve in more than one project, a project can be involved by more than one user (users to projects, M to M)
- A project has more than one issue, an issue belongs to only one project (projects to issues, 1 to M)
- A status can be in more than one issue, an issue can only have one status (statuses to issues, 1 to M)
- A severity can be in more than one issue, an issue can only have one severity (severities to issues, 1 to M)
- A priority can be in more than one issue, an issue can only have one priority (priorities to issues, 1 to M)
- A user can report more than one issue, an issue can only be reported by one user (users to issues, 1 to M)
- A user can be assigned to more than one issue, an issue can assign to more than one user (users to issues, M to M)
- An issue has more than one issue comment, an issue comment belongs to only one issue (issues to issue comments, 1 to M)
- A user can create more than one issue comment, an issue comment can only be created by one user (users to issue comments, 1 to M)
- Create role
POSTrequest- API endpoint:
/api/v1/role/create
- Get all roles
GETrequest- API endpoint:
/api/v1/role
- Get role by role id
GETrequest- API endpoint:
/api/v1/role/{roleId}
- Update role by role id
PUTrequest- API endpoint:
/api/v1/role/{roleId}/update
- Delete role by role id
DELETErequest- API endpoint:
/api/v1/role/{roleId}/delete
- ADMIN
- MANAGER
- DEVELOPER
- TESTER
- MEMBER
UNIQUENOT NULL
@NotBlank
RoleNotFoundException
@ValidateBlankAndUppercase
BlankAndUppercaseValidator
- Create user
POSTrequest- API endpoint:
/api/v1/user/create
- Get all users
GETrequest- API endpoint:
/api/v1/user
- Get user by user id
GETrequest- API endpoint:
/api/v1/user/{userId}
- Update user partial by user id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/update-partial
- Delete user by user id
DELETErequest- API endpoint:
/api/v1/user/{userId}/delete
- Update role by user id by role name
PATCHrequest- API endpoint:
/api/v1/user/{userId}/update-role
- Revoke role by user id
PUTrequest- API endpoint:
/api/v1/user/{userId}/revoke-role
UNIQUENOT NULL
@NotBlank@Email
UserNotFoundExceptionRoleNotFoundException
- Create project by user id
POSTrequest- API endpoint:
/api/v1/user/{userId}/project/create
- Get all projects created by user id
GETrequest- API endpoint:
/api/v1/user/{userId}/project
- Get project created by user id by project id
GETrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}
- Update project partial by user id by project id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/update-partial
- Delete project by user id by project id
DELETErequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/delete
- Add user into project by user creator id by project id by user id
PUTrequest- API endpoint:
/api/v1/user/{userCreatorId}/project/{projectId}/add-user/user/{userIdToAdd}
- Remove user from project by user creator id by project id by user id
DELETErequest- API endpoint:
/api/v1/user/{userCreatorId}/project/{projectId}/remove-user/user/{userIdToRemove}
- Get all projects
GETrequest- API endpoint:
/api/v1/project
- Get project by project id
GETrequest- API endpoint:
/api/v1/project/{projectId}
- Update project partial by project id
PATCHrequest- API endpoint:
/api/v1/project/{projectId}/update-partial
- Delete project by project id
DELETErequest- API endpoint:
/api/v1/project/{projectId}/delete
- Add user into project by project id by user id
PUTrequest- API endpoint:
/api/v1/project/{projectId}/add-user/user/{userId}
- Remove user from project by project id by user id
DELETErequest- API endpoint:
/api/v1/project/{projectId}/remove-user/user/{userId}
UNIQUENOT NULL
@NotBlank
ProjectNotFoundExceptionProjectNotCreatedByThisUserExceptionUserNotFoundExceptionUserNotInProjectExceptionDuplicateUserInProjectException
@ValidateProjectDate
ProjectDateValidator
- Create issue by user id by project id
POSTrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/create
- Get all issues by user id by project id
GETrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue
- Get all issues assigned by user id
GETrequest- API endpoint:
/api/v1/user/{userId}/issue
- Get issue by user id by project id by issue id
GETrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}
- Update issue partial by user id by project id by issue id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-partial
- Delete issue by user id by project id by issue id
DELETErequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/delete
- Update updated date by user id by project id by issue id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-updated-date
- Update resolved date by user id by project id by issue id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-resolved-date
- Update closed date by user id by project id by issue id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-closed-date
- Update status by user id by project id by issue id by status name
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-status
- Update severity by user id by project id by issue id by status name
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-severity
- Update priority by user id by project id by issue id by status name
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/update-priority
- Get all issues
GETrequest- API endpoint:
/api/v1/issue
- Get issue by issue id
GETrequest- API endpoint:
/api/v1/issue/{issueId}
- Update issue partial by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-partial
- Delete issue by issue id
DELETErequest- API endpoint:
/api/v1/issue/{issueId}/delete
- Update updated date by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-updated-date
- Update resolved date by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-resolved-date
- Update closed date by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-closed-date
- Update status by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-status
- Update severity by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-severity
- Update priority by issue id
PATCHrequest- API endpoint:
/api/v1/issue/{issueId}/update-priority
- Assign user to issue by project id by issue id by user to add id
PUTrequest- API endpoint:
/api/v1/project/{projectId}/issue/{issueId}/add-user/user/{userToAddId}
- Remove user from issue by project id by issue id by user to remove id
DELETErequest- API endpoint:
/api/v1/project/{projectId}/issue/{issueId}/remove-user/user/{userToRemoveId}
UNIQUENOT NULL
@NotBlank
- UserNotFoundException
- ProjectNotFoundException
- StatusNotFoundException
- SeverityNotFoundException
- PriorityNotFoundException
- IssueNotFoundException
- UserNotInProjectException
- UserNotInIssueException
- DuplicateUserInIssueException
- ProjectNotCreatedByThisUserException
- IssueNotAssignedToUserException
- IssueNotInThisProjectException
@ValidateBlankAndUppercase
BlankAndUppercaseValidator
- Create status
POSTrequest- API endpoint:
/api/v1/status/create
- Get all statuses
GETrequest- API endpoint:
/api/v1/status
- Get status by status id
GETrequest- API endpoint:
/api/v1/status/{statusId}
- Update status by status id
PUTrequest- API endpoint:
/api/v1/status/{statusId}/update
- Delete status by status id
DELETErequest- API endpoint:
/api/v1/status/{statusId}/delete
- OPEN
- ASSIGNED
- IN PROGRESS
- RESOLVED
- CLOSED
- REOPENED
- DEFERRED
- DUPLICATE
- CANNOT REPRODUCE
- NOT A BUG
UNIQUENOT NULL
@NotBlank
StatusNotFoundException
@ValidateBlankAndUppercase
@BlankAndUppercaseValidator
- Create severity
POSTrequest- API endpoint:
/api/v1/severity/create
- Get all severities
GETrequest- API endpoint:
/api/v1/severity
- Get severity by severity id
GETrequest- API endpoint:
/api/v1/severity/{severityId}
- Update severity by severity id
PUTrequest- API endpoint:
/api/v1/severity/{severityId}/update
- Delete severity by severity id
DELETErequest- API endpoint:
/api/v1/severity/{severityId}/delete
- CRITICAL
- HIGH
- MEDIUM
- LOW
UNIQUENOT NULL
@NotBlank
SeverityNotFoundException
@ValidateBlankAndUppercase
@BlankAndUppercaseValidator
- Create priority
POSTrequest- API endpoint:
/api/v1/priority/create
- Get all priorities
GETrequest- API endpoint:
/api/v1/priority
- Get priority by priority id
GETrequest- API endpoint:
/api/v1/priority/{priorityId}
- Update priority by priority id
PUTrequest- API endpoint:
/api/v1/priority/{priorityId}/update
- Delete priority by priority id
DELETErequest- API endpoint:
/api/v1/priority/{priorityId}/delete
- HIGHEST
- HIGH
- MEDIUM
- LOW
- LOWEST
UNIQUENOT NULL
@NotBlank
PriorityNotFoundException
@ValidateBlankAndUppercase
@BlankAndUppercaseValidator
- Create issue comment by user id by project id by issue id
POSTrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/issue-comment/create
- Get all issue comments by user id by project id by issue id
GETrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/issue-comment
- Get all issue comments by user id
GETrequest- API endpoint:
/api/v1/user/{userId}/issue-comment
- Get issue comment by user id by project id by issue id by issue comment id
GETrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/issue-comment/{issueCommentId}
- Update issue comment by user id by project id by issue id by issue comment id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/issue-comment/{issueCommentId}/update
- Delete issue comment by user id by project id by issue id by issue comment id
DELETErequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/issue-comment/{issueCommentId}/delete
- Update updated date by user id by project id by issue id by issue comment id
PATCHrequest- API endpoint:
/api/v1/user/{userId}/project/{projectId}/issue/{issueId}/issue-comment/{issueCommentId}/update-updated-date
- Get all issue comments
GETrequest- API endpoint:
/api/v1/issue-comment
- Get issue comment by issue comment id
GETrequest- API endpoint:
/api/v1/issue-comment/{issueCommentId}
- Update issue comment by issue comment id
PATCHrequest- API endpoint:
/api/v1/issue-comment/{issueCommentId}/update
- Delete issue comment by issue comment id
DELETErequest- API endpoint:
/api/v1/issue-comment/{issueCommentId}/delete
- Update updated date by issue comment id
PATCHrequest- API endpoint:
/api/v1/issue-comment/{issueCommentId}/update-updated-date
NOT NULL
@NotBlank
UserNotFoundExceptionProjectNotFoundExceptionIssueNotFoundExceptionIssueCommentNotFoundExceptionIssueNotAssignedToUserExceptionIssueNotInThisProjectExceptionUserNotInProjectExceptionIssueCommentNotCreatedByThisUserExceptionIssueCommentNotInThisIssueException
