Skip to content

Commit a0b1c79

Browse files
committed
#178: add license header to new files
1 parent 58366d7 commit a0b1c79

File tree

15 files changed

+228
-50
lines changed

15 files changed

+228
-50
lines changed

src/main/java/de/doubleslash/keeptime/controller/HeimatController.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.controller;
218

319
import com.fasterxml.jackson.core.JsonProcessingException;

src/main/java/de/doubleslash/keeptime/model/Setting.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.model;
218

319
import jakarta.persistence.*;

src/main/java/de/doubleslash/keeptime/model/repos/ExternalProjectsMappingsRepository.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 doubleSlash Net Business GmbH
1+
// Copyright 2025 doubleSlash Net Business GmbH
22
//
33
// This file is part of KeepTime.
44
// KeepTime is free software: you can redistribute it and/or modify
@@ -14,19 +14,16 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
1817
package de.doubleslash.keeptime.model.repos;
1918

2019
import de.doubleslash.keeptime.model.ExternalProjectMapping;
2120
import de.doubleslash.keeptime.model.ExternalSystem;
22-
import de.doubleslash.keeptime.model.Project;
2321
import org.springframework.data.jpa.repository.JpaRepository;
2422
import org.springframework.stereotype.Repository;
2523

2624
import java.util.List;
2725

2826
@Repository
2927
public interface ExternalProjectsMappingsRepository extends JpaRepository<ExternalProjectMapping, Long> {
30-
3128
List<ExternalProjectMapping> findByExternalSystemId(ExternalSystem externalSystem);
3229
}

src/main/java/de/doubleslash/keeptime/model/settings/HeimatSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 doubleSlash Net Business GmbH
1+
// Copyright 2025 doubleSlash Net Business GmbH
22
//
33
// This file is part of KeepTime.
44
// KeepTime is free software: you can redistribute it and/or modify

src/main/java/de/doubleslash/keeptime/model/settings/SettingsBase.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.model.settings;
218

319
import de.doubleslash.keeptime.model.Setting;

src/main/java/de/doubleslash/keeptime/rest/controller/FXUtils.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.rest.controller;
218

319
import javafx.application.Platform;

src/main/java/de/doubleslash/keeptime/rest/integration/heimat/HeimatAPI.java

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.rest.integration.heimat;
218

319
import de.doubleslash.keeptime.rest.integration.heimat.model.HeimatTask;
420
import de.doubleslash.keeptime.rest.integration.heimat.model.HeimatTime;
521
import org.springframework.core.ParameterizedTypeReference;
622
import org.springframework.http.HttpStatus;
7-
import org.springframework.http.ResponseEntity;
823
import org.springframework.web.client.RestClient;
924
import org.springframework.web.util.UriBuilder;
1025

@@ -66,34 +81,27 @@ public List<HeimatTime> getMyTimes(final LocalDate forDate) {
6681

6782
// POST /my/times
6883
public void addMyTime(final HeimatTime heimatTime) {
69-
final ResponseEntity<String> responseEntity = restClient.post()
70-
.uri(uriBuilder -> {
71-
UriBuilder builder = uriBuilder.path("/my/times");
72-
return builder.build();
73-
})
74-
.header("Content-Type", "application/json")
75-
.body(heimatTime)
76-
.retrieve()
77-
.onStatus(HttpStatus.UNAUTHORIZED::equals,
78-
(request, response) -> {
79-
throw new UnauthorizedException();
80-
})
81-
.toEntity(String.class);
82-
83-
System.out.println("Status Code: " + responseEntity.getStatusCode());
84-
System.out.println("Response Body: " + responseEntity.getBody());
84+
restClient.post()
85+
.uri(uriBuilder -> {
86+
UriBuilder builder = uriBuilder.path("/my/times");
87+
return builder.build();
88+
})
89+
.header("Content-Type", "application/json")
90+
.body(heimatTime)
91+
.retrieve()
92+
.onStatus(HttpStatus.UNAUTHORIZED::equals, (request, response) -> {
93+
throw new UnauthorizedException();
94+
})
95+
.toEntity(String.class);
8596
}
8697

8798
// DELETE /my/times/{id}
8899
public void deleteMyTime(final long timeId) {
89-
final ResponseEntity<String> responseEntity = restClient.delete().uri(uriBuilder -> {
100+
restClient.delete().uri(uriBuilder -> {
90101
UriBuilder builder = uriBuilder.path("/my/times/" + timeId);
91102
return builder.build();
92103
}).retrieve().onStatus(HttpStatus.UNAUTHORIZED::equals, (request, response) -> {
93104
throw new UnauthorizedException();
94105
}).toEntity(String.class);
95-
96-
System.out.println("Status Code: " + responseEntity.getStatusCode());
97-
System.out.println("Response Body: " + responseEntity.getBody());
98106
}
99107
}

src/main/java/de/doubleslash/keeptime/rest/integration/heimat/JwtDecoder.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.rest.integration.heimat;
218

319
import com.fasterxml.jackson.core.JsonProcessingException;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.rest.integration.heimat;
218

319
public class UnauthorizedException extends RuntimeException {}

src/main/java/de/doubleslash/keeptime/rest/integration/heimat/model/ExistingAndInvalidMappings.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2025 doubleSlash Net Business GmbH
2+
//
3+
// This file is part of KeepTime.
4+
// KeepTime is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
package de.doubleslash.keeptime.rest.integration.heimat.model;
218

319
import de.doubleslash.keeptime.controller.HeimatController;

0 commit comments

Comments
 (0)