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

WIP Move base exceptions to exception libs #452

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
id 'edu.sc.seis.launch4j' version '2.4.8'
id 'checkstyle'
id 'java'
id 'maven-publish'
id 'maven'
}

group = 'com.reckue'
Expand All @@ -16,10 +18,22 @@ targetCompatibility = JavaVersion.VERSION_11
def profile = "develop"

repositories {
maven {
name = "Reckue exception libs"
url = uri("https://maven.pkg.github.com/Reckue/exception-libs")
credentials {
username = "Hardelele"
password = "66a2201aa996af6a7ad62e839b8ce489965e3159"
}
}
mavenCentral()
}

dependencies {

/* Reckue Commons */
implementation 'com.reckue:exception-libs:1.0.3'

/* properties */
implementation 'org.springframework.boot:spring-boot-configuration-processor'

Expand Down
Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reckue.post.controller;

import com.reckue.libs.exception.ReckueUnauthorizedException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the ReckueException to BaseException.
Because the name of the service may change in the future.

import com.reckue.post.controller.api.CommentApi;
import com.reckue.post.exception.ReckueUnauthorizedException;
import com.reckue.post.model.Comment;
import com.reckue.post.service.CommentService;
import com.reckue.post.service.SecurityService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reckue.post.controller;

import com.reckue.libs.exception.ReckueUnauthorizedException;
import com.reckue.post.controller.api.NodeApi;
import com.reckue.post.exception.ReckueUnauthorizedException;
import com.reckue.post.model.Node;
import com.reckue.post.service.NodeService;
import com.reckue.post.service.SecurityService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reckue.post.controller;

import com.reckue.libs.exception.ReckueUnauthorizedException;
import com.reckue.post.controller.api.PostApi;
import com.reckue.post.exception.ReckueUnauthorizedException;
import com.reckue.post.model.Post;
import com.reckue.post.service.PostService;
import com.reckue.post.service.SecurityService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.reckue.post.controller;

import com.reckue.libs.exception.ReckueUnauthorizedException;
import com.reckue.post.controller.api.RatingApi;
import com.reckue.post.exception.ReckueUnauthorizedException;
import com.reckue.post.model.Rating;
import com.reckue.post.service.RatingService;
import com.reckue.post.service.SecurityService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.reckue.post.exception;

import com.reckue.libs.exception.ReckueAccessDeniedException;
import com.reckue.libs.exception.ReckueException;
import com.reckue.libs.exception.ReckueIllegalArgumentException;
import com.reckue.libs.exception.ReckueUnauthorizedException;
import com.reckue.post.exception.model.comment.CommentAlreadyExistsException;
import com.reckue.post.exception.model.comment.CommentNotFoundException;
import com.reckue.post.exception.model.node.NodeAlreadyExistsException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.reckue.post.exception;

import com.reckue.libs.exception.ReckueAccessDeniedException;
import com.reckue.libs.exception.ReckueException;
import com.reckue.libs.exception.ReckueIllegalArgumentException;
import com.reckue.libs.exception.ReckueUnauthorizedException;
import com.reckue.post.exception.model.comment.CommentAlreadyExistsException;
import com.reckue.post.exception.model.comment.CommentNotFoundException;
import com.reckue.post.exception.model.node.NodeAlreadyExistsException;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions src/main/java/com/reckue/post/exception/ReckueException.java

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.comment;

import com.reckue.post.exception.ModelAlreadyExistsException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class CommentAlreadyExistsException extends ModelAlreadyExistsException {
public class CommentAlreadyExistsException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.comment;

import com.reckue.post.exception.ModelNotFoundException;
import com.reckue.libs.exception.ReckueException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove the plural everywhere

import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class CommentNotFoundException extends ModelNotFoundException {
public class CommentNotFoundException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.node;

import com.reckue.post.exception.ModelAlreadyExistsException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class NodeAlreadyExistsException extends ModelAlreadyExistsException {
public class NodeAlreadyExistsException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.node;

import com.reckue.post.exception.ModelNotFoundException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class NodeNotFoundException extends ModelNotFoundException {
public class NodeNotFoundException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.node.pollnode;

import com.reckue.post.exception.ModelAlreadyExistsException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class PollNodeAlreadyExistsException extends ModelAlreadyExistsException {
public class PollNodeAlreadyExistsException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.node.pollnode;

import com.reckue.post.exception.ModelNotFoundException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class PollNodeNotFoundException extends ModelNotFoundException {
public class PollNodeNotFoundException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.post;

import com.reckue.post.exception.ModelAlreadyExistsException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class PostAlreadyExistsException extends ModelAlreadyExistsException {
public class PostAlreadyExistsException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.post;

import com.reckue.post.exception.ModelNotFoundException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -10,7 +10,7 @@
* @author Artur Magomedov
*/
@Getter
public class PostNotFoundException extends ModelNotFoundException {
public class PostNotFoundException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.rating;

import com.reckue.post.exception.ModelAlreadyExistsException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class RatingAlreadyExistsException extends ModelAlreadyExistsException {
public class RatingAlreadyExistsException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.rating;

import com.reckue.post.exception.ModelNotFoundException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class RatingNotFoundException extends ModelNotFoundException {
public class RatingNotFoundException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.tag;

import com.reckue.post.exception.ModelAlreadyExistsException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class TagAlreadyExistsException extends ModelAlreadyExistsException {
public class TagAlreadyExistsException extends ReckueException {

private final String message;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reckue.post.exception.model.tag;

import com.reckue.post.exception.ModelNotFoundException;
import com.reckue.libs.exception.ReckueException;
import lombok.Getter;

/**
Expand All @@ -11,7 +11,7 @@
*/
@Getter
@SuppressWarnings("unused")
public class TagNotFoundException extends ModelNotFoundException {
public class TagNotFoundException extends ReckueException {

private final String message;

Expand Down
Loading