Skip to content

Commit 3258f14

Browse files
mnonnenmachernnobelis
authored andcommitted
feat: Add severity enums
Add severity enums to the `api` and `model` modules. The enum will be taken into use in the following commits. Signed-off-by: Martin Nonnenmacher <[email protected]>
1 parent c372dca commit 3258f14

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (C) 2024 The ORT Server Authors (See <https://github.com/eclipse-apoapsis/ort-server/blob/main/NOTICE>)
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+
* https://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+
* SPDX-License-Identifier: Apache-2.0
17+
* License-Filename: LICENSE
18+
*/
19+
20+
package org.eclipse.apoapsis.ortserver.api.v1.model
21+
22+
/**
23+
* An enum for severities of [Issue]s and other similar objects.
24+
*/
25+
enum class Severity {
26+
/** Used for issues that provide information only. */
27+
HINT,
28+
29+
/** Used for issues that could lead to problems. */
30+
WARNING,
31+
32+
/** Used for issues that must be addressed. */
33+
ERROR
34+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (C) 2024 The ORT Server Authors (See <https://github.com/eclipse-apoapsis/ort-server/blob/main/NOTICE>)
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+
* https://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+
* SPDX-License-Identifier: Apache-2.0
17+
* License-Filename: LICENSE
18+
*/
19+
20+
package org.eclipse.apoapsis.ortserver.model
21+
22+
import org.eclipse.apoapsis.ortserver.model.runs.Issue
23+
24+
/**
25+
* An enum for severities of [Issue]s and other similar objects.
26+
*/
27+
enum class Severity {
28+
/** Used for issues that provide information only. */
29+
HINT,
30+
31+
/** Used for issues that could lead to problems. */
32+
WARNING,
33+
34+
/** Used for issues that must be addressed. */
35+
ERROR
36+
}

0 commit comments

Comments
 (0)