Skip to content

Commit fde9251

Browse files
committed
Minor improvements
1 parent a6da108 commit fde9251

14 files changed

+71
-35
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
# If the Autobuild fails above, remove it and uncomment the following three lines.
7373
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
7474

75-
# - run: |
75+
# # - run: |
7676
# echo "Run, Build Application using script"
7777
# ./location_of_script_within_repo/buildscript.sh
7878

src/main/java/edu/kit/datamanager/mappingservice/configuration/ApplicationProperties.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Karlsruhe Institute of Technology.
2+
* Copyright 2022 Karlsruhe Institute of Technology.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,10 @@
2626
import java.net.URL;
2727

2828
/**
29+
* This class is used to configure the application.
30+
* It reads the values from the application.properties file.
2931
*
32+
* @author maximilianiKIT
3033
*/
3134
@ConfigurationProperties(prefix = "mapping-service")
3235
@Component

src/main/java/edu/kit/datamanager/mappingservice/configuration/JPAPersistenceConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Karlsruhe Institute of Technology.
2+
* Copyright 2022 Karlsruhe Institute of Technology.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,9 @@
2121
import org.springframework.transaction.annotation.EnableTransactionManagement;
2222

2323
/**
24+
* Configuration class for JPA persistence.
2425
*
26+
* @author maximilianiKIT
2527
*/
2628
@Configuration
2729
@EnableTransactionManagement

src/main/java/edu/kit/datamanager/mappingservice/configuration/OpenApiDefinitions.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 Karlsruhe Institute of Technology.
2+
* Copyright 2022 Karlsruhe Institute of Technology.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,11 +24,12 @@
2424
import org.springframework.context.annotation.Configuration;
2525

2626
/**
27-
* @author jejkal
27+
* This class provides the OpenAPI definition for the mapping-service.
28+
*
29+
* @author maximilianiKIT
2830
*/
2931
@Configuration
3032
public class OpenApiDefinitions {
31-
3233
@Bean
3334
public OpenAPI customOpenAPI() {
3435
return new OpenAPI()

src/main/java/edu/kit/datamanager/mappingservice/configuration/StaticResourcesConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Karlsruhe Institute of Technology.
2+
* Copyright 2022 Karlsruhe Institute of Technology.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/edu/kit/datamanager/mappingservice/configuration/WebSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Karlsruhe Institute of Technology.
2+
* Copyright 2022 Karlsruhe Institute of Technology.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
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.
515
*/
16+
617
package edu.kit.datamanager.mappingservice.dao;
718

819
import edu.kit.datamanager.mappingservice.domain.acl.AclEntry;
920
import org.springframework.data.jpa.repository.JpaRepository;
1021
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
1122

1223
/**
24+
* This interface provides methods to access AclEntry objects in the database.
1325
*
26+
* @author maximilianiKIT
1427
*/
1528
public interface IAclEntryDao extends JpaRepository<AclEntry, String>, JpaSpecificationExecutor<AclEntry> {
1629
}

src/main/java/edu/kit/datamanager/mappingservice/dao/IMappingRecordDao.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
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.
515
*/
16+
617
package edu.kit.datamanager.mappingservice.dao;
718

819
import edu.kit.datamanager.mappingservice.domain.MappingRecord;
@@ -16,9 +27,13 @@
1627
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
1728

1829
/**
30+
* This interface defines the methods for accessing the database for the MappingRecords.
1931
*
32+
* @author maximilianiKIT
2033
*/
2134
public interface IMappingRecordDao extends JpaRepository<MappingRecord, String>, JpaSpecificationExecutor<MappingRecord> {
35+
Optional<MappingRecord> findByMappingId(String mappingId);
36+
2237
Optional<MappingRecord> findByMappingIdAndMappingType(String mappingId, String mappingType);
2338

2439
Iterable<MappingRecord> findByMappingIdInOrMappingTypeIn(List<String> mappingId, List<String> mappingType);

src/main/java/edu/kit/datamanager/mappingservice/domain/CompositeKey.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 hartmann-v.
2+
* Copyright 2022 hartmann-v.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,6 +20,8 @@
2020

2121
/**
2222
* Composite key for MappingRecord
23+
*
24+
* @author hartmann-v
2325
*/
2426
public class CompositeKey implements Serializable {
2527
String mappingId;

src/main/java/edu/kit/datamanager/mappingservice/domain/acl/AclEntry.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Karlsruhe Institute of Technology.
2+
* Copyright 2022 Karlsruhe Institute of Technology.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@
3131
import lombok.Data;
3232

3333
/**
34+
* This class represents an entry in an access control list (ACL.
3435
* @author jejkal
3536
*/
3637
@Entity

0 commit comments

Comments
 (0)