Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

AYS-523 | Architecture Has Been Refactored and Sonar Issuses Have Been Fixed #391

Merged
merged 28 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e3ab6e6
AYS-523 | `emergency_application.util.exception` Package Has Been Mov…
agitrubard Oct 20, 2024
e2c6a1e
AYS-523 | `institution.util.exception` Package Has Been Moved to `ins…
agitrubard Oct 20, 2024
3301279
AYS-523 | `parameter.util.exception` Package Has Been Moved to `param…
agitrubard Oct 20, 2024
9bd888a
AYS-523 | `common.util.exception` Package Has Been Moved to `common` …
agitrubard Oct 20, 2024
1d835aa
AYS-523 | `EmergencyEvacuationApplicationEndpointNotActiveException` …
agitrubard Oct 20, 2024
2ea33a0
AYS-523 | `AysConflictException` Class Has Been Renamed as `AysConfli…
agitrubard Oct 20, 2024
1e45385
AYS-523 | `auth.util.exception` Package Has Been Moved to `auth` Package
agitrubard Oct 20, 2024
0a11f62
AYS-523 | `common.util.exception` Package Has Been Moved to `common` …
agitrubard Oct 20, 2024
fda14f5
AYS-523 | User and Role List Filters Have Been Refactored
agitrubard Oct 20, 2024
c9cbc51
AYS-523 | `AdminRegistrationApplicationNotExistException` Class Has B…
agitrubard Oct 20, 2024
17ef29c
AYS-523 | `AdminRegistrationApplicationNotExistByIdException` Class H…
agitrubard Oct 20, 2024
26d098b
AYS-523 | `AysAdminRegistrationApplicationNotExistAuthException` Clas…
agitrubard Oct 20, 2024
31aab18
AYS-523 | `serialVersionUID` of `AysAdminRegistrationApplicationNotEx…
agitrubard Oct 20, 2024
4901ba4
AYS-523 | `serialVersionUID` of `AysAdminRegistrationApplicationNotEx…
agitrubard Oct 20, 2024
1e5bd6d
AYS-523 | Missing `final` Keywords Have Been Added to Sub Exception C…
agitrubard Oct 20, 2024
168c6f1
AYS-523 | `java:S4551` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
7cce2d3
AYS-523 | `java:S5612` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
3291254
AYS-523 | `java:S1774` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
21dc725
AYS-523 | `java:S1774` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
f097b5a
AYS-523 | `java:S1132` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
f8d80a2
AYS-523 | `java:S2148` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
fa239c5
AYS-523 | `java:S4551` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
ffcced8
AYS-523 | `java:S5977` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
b1172ec
AYS-523 | `java:S4551` Sonar Issue Has Been Fixed
agitrubard Oct 20, 2024
f8f36fb
AYS-523 | Javadoc Has Been Added to `EmergencyEvacuationApplicationSe…
agitrubard Oct 20, 2024
c997437
AYS-523 | `AysPhoneNumberUtil` Class Has Been Created and Class Has B…
agitrubard Oct 20, 2024
e48f83a
AYS-523 | HexaLayered Architecture Has Been Defined to `README.md` File
agitrubard Oct 20, 2024
ed67de5
AYS-523 | Javadoc of `AysConflictException` Class Has Been Fixed
agitrubard Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,14 @@ at org.eclipse.angus.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTran
> details: https://www.jetbrains.com/help/idea/run-debug-configuration-spring-boot.html#spring-boot
---

# Project Infrastucture
# Project Infrastructure

## 🏛️ Layer Architecture
## 🏛️ HexaLayered Architecture

![](/documents/architecture/ays-architecture.png?raw=true)

> **Reference: [HexaLayered Architecture](https://github.com/agitrubard/hexalayered-architecture)**

## 📦 Package Architecture

![](/documents/architecture/package-architecture-example.png?raw=true)
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.auth.model.enums.AdminRegistrationApplicationStatus;
import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception indicating that an admin registration application is already approved.
* This exception is a subclass of {@link AysAlreadyException}, which is typically used to indicate that an entity or
* This exception is a subclass of {@link AysConflictException}, which is typically used to indicate that an entity or
* resource already exists with expected behaviour.
* Typically, this exception is thrown when an approval operation is performed on an admin register application
* entity to an already approved or rejected admin register application.
*/
public class AysAdminRegistrationApplicationAlreadyApprovedException extends AysAlreadyException {
public final class AysAdminRegistrationApplicationAlreadyApprovedException extends AysConflictException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception indicating that an admin registration application is already rejected.
* This exception is a subclass of {@link AysAlreadyException}, which is typically used to indicate that an entity or
* This exception is a subclass of {@link AysConflictException}, which is typically used to indicate that an entity or
* resource already exists with expected behaviour.
* Typically, this exception is thrown when a rejection operation is performed on an admin register application
* entity to an already rejected admin register application.
*/
public class AysAdminRegistrationApplicationAlreadyRejectedException extends AysAlreadyException {
public final class AysAdminRegistrationApplicationAlreadyRejectedException extends AysConflictException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.auth.model.enums.AdminRegistrationApplicationStatus;
import org.ays.common.util.exception.AysBadRequestException;
import org.ays.common.exception.AysBadRequestException;

import java.io.Serial;

Expand All @@ -12,7 +12,7 @@
* Typically, this exception is thrown when a rejection operation is performed on an admin register application
* entity to an incomplete application, where its status is not set to 'COMPLETE'.
*/
public class AysAdminRegistrationApplicationInCompleteException extends AysBadRequestException {
public final class AysAdminRegistrationApplicationInCompleteException extends AysBadRequestException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand All @@ -10,20 +10,20 @@
* Typically, this exception is thrown when an operation or query is performed on an admin register application
* entity using an ID that does not correspond to an existing admin register application.
*/
public final class AdminRegistrationApplicationNotExistException extends AysAuthException {
public final class AysAdminRegistrationApplicationNotExistByIdAuthException extends AysAuthException {

/**
* Unique identifier for serialization.
*/
@Serial
private static final long serialVersionUID = 8875043711494901525L;
private static final long serialVersionUID = -6284753696808049193L;

/**
* Constructs a new {@link AdminRegistrationApplicationNotExistException} with the specified ID.
* Constructs a new {@link AysAdminRegistrationApplicationNotExistByIdAuthException} with the specified ID.
*
* @param id The ID of the admin registration application that does not exist.
*/
public AdminRegistrationApplicationNotExistException(String id) {
public AysAdminRegistrationApplicationNotExistByIdAuthException(String id) {
super("admin registration application does not exist! id:" + id);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;

Expand All @@ -11,20 +11,20 @@
* Typically, this exception is thrown when an operation or query is performed on an admin register application
* entity using an ID that does not correspond to an existing admin register application.
*/
public final class AdminRegistrationApplicationNotExistByIdException extends AysNotExistException {
public final class AysAdminRegistrationApplicationNotExistByIdException extends AysNotExistException {

/**
* Unique identifier for serialization.
*/
@Serial
private static final long serialVersionUID = 8416712253227498925L;
private static final long serialVersionUID = -2626144009258745267L;

/**
* Constructs a new {@link AdminRegistrationApplicationNotExistByIdException} with the specified ID.
* Constructs a new {@link AysAdminRegistrationApplicationNotExistByIdException} with the specified ID.
*
* @param id The ID of the admin registration application that does not exist.
*/
public AdminRegistrationApplicationNotExistByIdException(String id) {
public AysAdminRegistrationApplicationNotExistByIdException(String id) {
super("admin registration application not exist! id:" + id);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.auth.model.enums.AysRoleStatus;
import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception thrown when a role is deleted and attempting to perform an action that requires a deleted role.
*/
public final class AysRoleAlreadyDeletedException extends AysAlreadyException {
public final class AysRoleAlreadyDeletedException extends AysConflictException {

/**
* Unique serial version ID.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception to be thrown when a role with a given name already exists.
*/
public final class AysRoleAlreadyExistsByNameException extends AysAlreadyException {
public final class AysRoleAlreadyExistsByNameException extends AysConflictException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception thrown when a role is deleted and attempting to perform an action that requires a deleted role.
*/
public class AysRoleAssignedToUserException extends AysAlreadyException {
public class AysRoleAssignedToUserException extends AysConflictException {

/**
* Unique serial version ID.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception thrown when a user is deleted and attempting to perform an action that requires a deleted user.
*/
public final class AysUserAlreadyDeletedException extends AysAlreadyException {
public final class AysUserAlreadyDeletedException extends AysConflictException {

/**
* Unique serial version ID.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception indicating that an user already exists with the specified email address.
* This exception is a subclass of {@link AysAlreadyException}.
* This exception is a subclass of {@link AysConflictException}.
*/
public final class AysUserAlreadyExistsByEmailAddressException extends AysAlreadyException {
public final class AysUserAlreadyExistsByEmailAddressException extends AysConflictException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.exception.AysConflictException;
import org.ays.common.model.AysPhoneNumber;
import org.ays.common.util.exception.AysAlreadyException;

import java.io.Serial;

/**
* This exception is thrown when attempting to create a user with a phone number that already exists in the system.
*/
public final class AysUserAlreadyExistsByPhoneNumberException extends AysAlreadyException {
public final class AysUserAlreadyExistsByPhoneNumberException extends AysConflictException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.auth.model.enums.AysSourcePage;
import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAlreadyException;
import org.ays.common.exception.AysConflictException;

import java.io.Serial;

/**
* Exception to be thrown when a user has a status which is not active or passive.
*/
public final class AysUserIsNotActiveOrPassiveException extends AysAlreadyException {
public final class AysUserIsNotActiveOrPassiveException extends AysConflictException {

/**
* Unique identifier for serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysAuthException;
import org.ays.common.exception.AysAuthException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ays.auth.util.exception;
package org.ays.auth.exception;

import org.ays.auth.model.enums.AysUserStatus;
import org.ays.common.util.exception.AysNotExistException;
import org.ays.common.exception.AysNotExistException;

import java.io.Serial;

Expand Down
Loading
Loading