Skip to content

Commit

Permalink
fix: fixing test and Checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Sep 19, 2023
1 parent 8d9e4bc commit 5aa7f94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ public class FormatterConfigurationImpl implements FormatterConfiguration {
String legacyUrl;

/**
* Used to override link to metadata in rss response. It takes precedence over legacyUrl if both enabled.
* By default, the customMetadataUrl will redirect to host url with a trailing slash and followed by the metadata uuid. e.g: http://geonetwork.org/uuid
* You can customize it by redirect to another service (always followed by metadata uuid). e.g: http://my-other-service.com/uuid
* Used to override link to metadata in rss response BUT not source home page link.
* It takes precedence over legacyUrl if both enabled.
* By default, it will redirect to host url with a trailing slash
* and followed by the metadata uuid.
* e.g: http://geonetwork.org/uuid
* You can customize it by redirect to another service (always followed by metadata uuid).
* e.g: http://my-other-service.com/uuid
*/
@Value("${gn.customMetadataUrl:}")
String customMetadataUrl;
Expand All @@ -39,9 +43,6 @@ public class FormatterConfigurationImpl implements FormatterConfiguration {

@Override
public String getSourceHomePage() {
if (linkToCustomMetadataUrl) {
return customMetadataUrl;
}
if (linkToLegacyGN4) {
return legacyUrl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class RssResponseProcessorImplTest {
@Test
public void channelLinkPointToGnServer() throws Exception {
formatterConfiguration.setLinkToLegacyGN4(false);
formatterConfiguration.setLinkToCustomUrl(false);

InputStream is = new ByteArrayInputStream("{}".getBytes(UTF_8));
ByteArrayOutputStream os = new ByteArrayOutputStream();
Expand Down

0 comments on commit 5aa7f94

Please sign in to comment.