generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/403-entfernung-von-unnötigen-lee…
…rzeilen-zu-beginn-einer-methode' into 403-entfernung-von-unnötigen-leerzeilen-zu-beginn-einer-methode # Conflicts: # wls-wahlvorbereitung-service/src/main/java/de/muenchen/oss/wahllokalsystem/wahlvorbereitungservice/rest/urnenwahlschliessungsuhrzeit/UrnenwahlSchliessungsUhrzeitWriteDTO.java
- Loading branch information
Showing
61 changed files
with
1,608 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+112 KB
docs/src/public/vorfaelleundvorkommnisse/fachliches_datenmodell_ereignisse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
stack/keycloak/migration/add-authorities-vorfaelleundvorkommnisse.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
id: add authorities vorfaelleundvorkommnisse | ||
author: vjohnslhm | ||
realm: ${SSO_REALM} | ||
changes: | ||
- addRole: | ||
name: VorfaelleUndVorkommnisse_BUSINESSACTION_GetEreignisse | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
role: VorfaelleUndVorkommnisse_BUSINESSACTION_GetEreignisse | ||
clientId: ${SSO_CLIENT_ID} | ||
|
||
- addRole: | ||
name: VorfaelleUndVorkommnisse_BUSINESSACTION_PostEreignisse | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
role: VorfaelleUndVorkommnisse_BUSINESSACTION_PostEreignisse | ||
clientId: ${SSO_CLIENT_ID} | ||
|
||
- addRole: | ||
name: VorfaelleUndVorkommnisse_READ_Ereignisse | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
role: VorfaelleUndVorkommnisse_READ_Ereignisse | ||
clientId: ${SSO_CLIENT_ID} | ||
|
||
- addRole: | ||
name: VorfaelleUndVorkommnisse_WRITE_Ereignisse | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
role: VorfaelleUndVorkommnisse_WRITE_Ereignisse | ||
clientId: ${SSO_CLIENT_ID} | ||
|
||
- addRole: | ||
name: VorfaelleUndVorkommnisse_DELETE_Ereignisse | ||
clientRole: true | ||
clientId: ${SSO_CLIENT_ID} | ||
- assignRoleToGroup: | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
role: VorfaelleUndVorkommnisse_DELETE_Ereignisse | ||
clientId: ${SSO_CLIENT_ID} |
15 changes: 15 additions & 0 deletions
15
stack/keycloak/migration/create-group-all-vorfaelleundvorkommnisse-authorities.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
id: create group allVorfaelleUndVorkommnisseAuthorities and link wls_all* | ||
author: vjohnslhm | ||
realm: ${SSO_REALM} | ||
changes: | ||
- addGroup: | ||
name: allVorfaelleUndVorkommnisseAuthorities | ||
- assignGroup: | ||
user: wls_all | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
- assignGroup: | ||
user: wls_all_uwb | ||
group: allVorfaelleUndVorkommnisseAuthorities | ||
- assignGroup: | ||
user: wls_all_bwb | ||
group: allVorfaelleUndVorkommnisseAuthorities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local" | ||
mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local, dummy.nobezirkid.check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local" | ||
mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local, dummy.nobezirkid.check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...uenchen/oss/wahllokalsystem/vorfaelleundvorkommnisseservice/domain/ereignis/Ereignis.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package de.muenchen.oss.wahllokalsystem.vorfaelleundvorkommnisseservice.domain.ereignis; | ||
|
||
import de.muenchen.oss.wahllokalsystem.vorfaelleundvorkommnisseservice.domain.BaseEntity; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import java.time.LocalDateTime; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@EqualsAndHashCode(callSuper = true) | ||
public class Ereignis extends BaseEntity { | ||
|
||
@NotNull | ||
@Size(max = 1024) | ||
private String wahlbezirkID; | ||
|
||
@Size(max = 1024) | ||
private String beschreibung; | ||
|
||
private LocalDateTime uhrzeit; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@NotNull | ||
private Ereignisart ereignisart; | ||
} |
57 changes: 57 additions & 0 deletions
57
...s/wahllokalsystem/vorfaelleundvorkommnisseservice/domain/ereignis/EreignisRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package de.muenchen.oss.wahllokalsystem.vorfaelleundvorkommnisseservice.domain.ereignis; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import org.springframework.cache.annotation.CacheEvict; | ||
import org.springframework.cache.annotation.CachePut; | ||
import org.springframework.cache.annotation.Cacheable; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_READ_Ereignisse')") | ||
public interface EreignisRepository extends CrudRepository<Ereignis, UUID> { | ||
|
||
String CACHE = "EreignisCACHE"; | ||
|
||
@Override | ||
Iterable<Ereignis> findAll(); | ||
|
||
@Cacheable(value = CACHE, key = "#p0") | ||
List<Ereignis> findByWahlbezirkID(String wahlbezirkID); | ||
|
||
@Override | ||
@CachePut(value = CACHE, key = "#p0.wahlbezirkID") | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_WRITE_Ereignisse')") | ||
<S extends Ereignis> S save(S ereignis); | ||
|
||
@Override | ||
@CachePut(value = CACHE, key = "#p0.wahlbezirkID") | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_WRITE_Ereignisse')") | ||
<S extends Ereignis> Iterable<S> saveAll(Iterable<S> iterable); | ||
|
||
@Override | ||
@CacheEvict(value = CACHE, key = "#p0") | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_DELETE_Ereignisse')") | ||
void deleteById(UUID id); | ||
|
||
@Override | ||
@CacheEvict(value = CACHE, key = "#p0.wahlbezirkID") | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_DELETE_Ereignisse')") | ||
void delete(Ereignis entity); | ||
|
||
@Override | ||
@CacheEvict(value = CACHE, allEntries = true) | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_DELETE_Ereignisse')") | ||
void deleteAll(Iterable<? extends Ereignis> entities); | ||
|
||
@Override | ||
@CacheEvict(value = CACHE, allEntries = true) | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_DELETE_Ereignisse')") | ||
void deleteAll(); | ||
|
||
@CacheEvict(value = CACHE, allEntries = true) | ||
@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_DELETE_Ereignisse')") | ||
@Transactional | ||
void deleteByWahlbezirkID(String wahlbezirkID); | ||
} |
5 changes: 5 additions & 0 deletions
5
...chen/oss/wahllokalsystem/vorfaelleundvorkommnisseservice/domain/ereignis/Ereignisart.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package de.muenchen.oss.wahllokalsystem.vorfaelleundvorkommnisseservice.domain.ereignis; | ||
|
||
public enum Ereignisart { | ||
VORFALL, VORKOMMNIS | ||
} |
13 changes: 13 additions & 0 deletions
13
...hen/oss/wahllokalsystem/vorfaelleundvorkommnisseservice/exception/ExceptionConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package de.muenchen.oss.wahllokalsystem.vorfaelleundvorkommnisseservice.exception; | ||
|
||
import de.muenchen.oss.wahllokalsystem.wls.common.exception.util.ExceptionDataWrapper; | ||
|
||
public class ExceptionConstants { | ||
|
||
public static final ExceptionDataWrapper GETEREIGNIS_SUCHKRITERIEN_UNVOLLSTAENDIG = new ExceptionDataWrapper("100", | ||
"Fehler in getEreignis(): Suchkriterien unvollständig."); | ||
public static final ExceptionDataWrapper POSTEREIGNIS_PARAMS_UNVOLLSTAENDIG = new ExceptionDataWrapper("102", | ||
"Fehler in postEreignis(): Parameter unvollständig."); | ||
public static final ExceptionDataWrapper SAVEEREIGNIS_UNSAVABLE = new ExceptionDataWrapper("103", | ||
"Fehler in postEreignis(): Ereignis konnte nicht gespeichert werden."); | ||
} |
Oops, something went wrong.