-
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.
chore: new mock data structure (#461)
- Loading branch information
1 parent
151f24e
commit 6cdb7d7
Showing
28 changed files
with
58 additions
and
21 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
23 changes: 23 additions & 0 deletions
23
sfera-mock/src/main/java/ch/sbb/sferamock/messages/TrainsActuator.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,23 @@ | ||
package ch.sbb.sferamock.messages; | ||
|
||
import ch.sbb.sferamock.messages.services.JourneyProfileRepository; | ||
import java.util.Set; | ||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint; | ||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Endpoint(id = "trains") | ||
public class TrainsActuator { | ||
|
||
private final JourneyProfileRepository journeyProfileRepository; | ||
|
||
public TrainsActuator(JourneyProfileRepository journeyProfileRepository) { | ||
this.journeyProfileRepository = journeyProfileRepository; | ||
} | ||
|
||
@ReadOperation | ||
public Set<String> getJps() { | ||
return journeyProfileRepository.getAvailableJourneyProfiles(); | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -102,4 +102,4 @@ | |
</KilometreReferencePoint> | ||
|
||
</SP_ContextInformation> | ||
</SegmentProfile> | ||
</SegmentProfile> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.