Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow duplicate resource url #113

Merged
merged 2 commits into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ public boolean execute() throws SQLException {

rs = st.executeQuery();

return rs.next();
/* if "AllowDuplicateResourceURL" exists and is "true", then it is possibile to register web resources with same url */
if ((getRequestContext().getCatalogConfiguration().getParameters().containsKey("AllowDuplicateResourceURL")) &&
(getRequestContext().getCatalogConfiguration().getParameters().getValue("AllowDuplicateResourceURL").equals("true")) )
return(false);
else
return rs.next();

} finally {
closeResultSet(rs);
Expand Down
3 changes: 2 additions & 1 deletion geoportal/src/gpt/config/gpt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@
<parameter key="httpClientRequest.connectionTimeout" value="2[MINUTE]"/>
<parameter key="httpClientRequest.responseTimeout" value="2[MINUTE]"/>
<parameter key="httpClient.alwaysClose" value="false"/>

<!-- If set to true it allows the registration of web resources with same URL -->
<parameter key="AllowDuplicateResourceURL" value="true"/>

<!-- Resource Link Builder
- resourceLinkBuilder.preview.filter: regular expression disabling ‘preview’ link on search result
Expand Down