-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial 1.0.0 commit * fixed conformance * Added CORS config * tiny typo (#17) Saw a tiny typo and wanted to get on the board. Great stuff * Removed properties from collections Co-authored-by: zachrouseFE <39569018+zachrouseFE@users.noreply.github.com>
- Loading branch information
1 parent
29f64f1
commit 95e69c7
Showing
30 changed files
with
127 additions
and
213 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
12 changes: 0 additions & 12 deletions
12
staccato-application/src/main/java/com/planet/staccato/config/StacWebFluxConfig.java
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
staccato-application/src/main/java/com/planet/staccato/filters/VersionFilter.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,40 @@ | ||
package com.planet.staccato.filters; | ||
|
||
import com.planet.staccato.config.LinksConfigProps; | ||
import com.planet.staccato.config.StacConfigProps; | ||
import com.planet.staccato.config.StaccatoMediaType; | ||
import com.planet.staccato.dto.api.SearchRequest; | ||
import com.planet.staccato.model.Item; | ||
import com.planet.staccato.model.Link; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.Arrays; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* We do not want to store links in the database, as the deployed hostname/DNS is subject to change. This class will | ||
* dynamically build links using the configured protocol/host/port. | ||
* | ||
* @author joshfix | ||
* Created on 2/12/18 | ||
*/ | ||
@Component | ||
@RequiredArgsConstructor | ||
public class VersionFilter implements ItemSearchFilter { | ||
|
||
private final StacConfigProps stacConfigProps; | ||
private final static Set<String> types = new HashSet<>(Arrays.asList("*")); | ||
|
||
@Override | ||
public Set<String> types() { | ||
return types; | ||
} | ||
|
||
@Override | ||
public Item doFilter(Item item, SearchRequest request) { | ||
return item.stacVersion(stacConfigProps.getVersion()); | ||
} | ||
} |
Oops, something went wrong.