-
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.
Merged in merge/shibui-2584 (pull request #662)
Merge/shibui 2584 Approved-by: Doug Sonaty
- Loading branch information
Showing
23 changed files
with
363 additions
and
43 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
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
30 changes: 30 additions & 0 deletions
30
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/beacon/BeaconEvent.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,30 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui.domain.beacon; | ||
|
|
||
| import jakarta.persistence.Entity; | ||
| import jakarta.persistence.GeneratedValue; | ||
| import jakarta.persistence.GenerationType; | ||
| import jakarta.persistence.Id; | ||
| import lombok.Data; | ||
|
|
||
| import java.util.Date; | ||
|
|
||
| @Entity | ||
| @Data | ||
| public class BeaconEvent { | ||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.SEQUENCE) | ||
| private Long id; | ||
|
|
||
| private Date eventTime; | ||
|
|
||
| private String eventName; | ||
|
|
||
| public BeaconEvent() { | ||
| eventTime = new Date(); | ||
| } | ||
|
|
||
| public BeaconEvent(BeaconEventType eventType) { | ||
| eventTime = new Date(); | ||
| this.eventName = eventType.name(); | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
...d/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/beacon/BeaconEventType.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,7 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui.domain.beacon; | ||
|
|
||
| public enum BeaconEventType { | ||
| METADATA_SOURCE_MODIFIED, METADATA_SOURCE_REMOVED, METADATA_SOURCE_ENABLED, METADATA_SOURCE_CREATED, | ||
| METADATA_PROVIDER_MODIFIED, METADATA_PROVIDER_ENABLED, METADATA_PROVIDER_CREATED, | ||
| METADATA_FILTER_MODIFIED, METADATA_FILTER_REMOVED, METADATA_FILTER_ENABLED, METADATA_FILTER_CREATED | ||
| } |
16 changes: 16 additions & 0 deletions
16
...rc/main/java/edu/internet2/tier/shibboleth/admin/ui/repository/BeaconEventRepository.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,16 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui.repository; | ||
|
|
||
| import edu.internet2.tier.shibboleth.admin.ui.domain.beacon.BeaconEvent; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import org.springframework.data.jpa.repository.Query; | ||
| import org.springframework.data.repository.query.Param; | ||
|
|
||
| import java.util.Date; | ||
| import java.util.List; | ||
|
|
||
| public interface BeaconEventRepository extends JpaRepository<BeaconEvent, Long> { | ||
|
|
||
| @Query(value = "SELECT be FROM BeaconEvent be WHERE be.eventTime >= :sinceDate") | ||
| List<BeaconEvent> getEventsSince(@Param("sinceDate") Date sinceDate); | ||
|
|
||
| } |
Oops, something went wrong.