Skip to content

Commit fad8eb6

Browse files
committed
Added logging, fixed minor issues, removed unneeded code
1 parent ec090d2 commit fad8eb6

File tree

5 files changed

+656
-503
lines changed

5 files changed

+656
-503
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright 2022 Karlsruhe Institute of Technology.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package edu.kit.datamanager.mappingservice.exception;
17+
18+
import org.springframework.http.HttpStatus;
19+
import org.springframework.web.bind.annotation.ResponseStatus;
20+
21+
/**
22+
* Invalid json format of data.
23+
*/
24+
@ResponseStatus(value = HttpStatus.CONFLICT)
25+
public class DuplicateMappingException extends RuntimeException {
26+
27+
/**
28+
* Default constructor.
29+
*/
30+
public DuplicateMappingException() {
31+
super();
32+
}
33+
34+
/**
35+
* Constructor with given message and cause.
36+
*
37+
* @param message Message.
38+
* @param cause Cause.
39+
*/
40+
public DuplicateMappingException(String message, Throwable cause) {
41+
super(message, cause);
42+
}
43+
44+
/**
45+
* Constructor with given message.
46+
*
47+
* @param message Message.
48+
*/
49+
public DuplicateMappingException(String message) {
50+
super(message);
51+
}
52+
53+
/**
54+
* Constructor with given message and cause.
55+
*
56+
* @param cause Cause.
57+
*/
58+
public DuplicateMappingException(Throwable cause) {
59+
super(cause);
60+
}
61+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright 2022 Karlsruhe Institute of Technology.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package edu.kit.datamanager.mappingservice.exception;
17+
18+
import org.springframework.http.HttpStatus;
19+
import org.springframework.web.bind.annotation.ResponseStatus;
20+
21+
/**
22+
* Invalid json format of data.
23+
*/
24+
@ResponseStatus(value = HttpStatus.NOT_FOUND)
25+
public class MappingNotFoundException extends RuntimeException {
26+
27+
/**
28+
* Default constructor.
29+
*/
30+
public MappingNotFoundException() {
31+
super();
32+
}
33+
34+
/**
35+
* Constructor with given message and cause.
36+
*
37+
* @param message Message.
38+
* @param cause Cause.
39+
*/
40+
public MappingNotFoundException(String message, Throwable cause) {
41+
super(message, cause);
42+
}
43+
44+
/**
45+
* Constructor with given message.
46+
*
47+
* @param message Message.
48+
*/
49+
public MappingNotFoundException(String message) {
50+
super(message);
51+
}
52+
53+
/**
54+
* Constructor with given message and cause.
55+
*
56+
* @param cause Cause.
57+
*/
58+
public MappingNotFoundException(Throwable cause) {
59+
super(cause);
60+
}
61+
}

0 commit comments

Comments
 (0)