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

Bump commons-net:commons-net from 3.9.0 to 3.10.0 #246

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
a480657
[gn]: hibernate troubles with jeeves and persistance manager (harvest…
cmangeat Nov 18, 2022
55600b8
[gn]: camel tests, avoid side effects
cmangeat Feb 3, 2023
e282c7a
[gn]: fix mdview mdLanguages
fgravin Jun 8, 2022
d3dafc1
[geocat]: SQL migration to v4.
fxprunayre May 18, 2021
6a2bc93
[geocat]: virtual CSW to portal rewrite rule.
fxprunayre May 19, 2021
17fb168
[geocat]: add thesaurus.
fxprunayre May 20, 2021
c1c74bd
[geocat]: build geocat gn4 as geocat gn3.10 was built
cmangeat Jun 19, 2021
815cee0
[geocat]: default conf. for ehcache (eviction policy)
cmangeat Jul 7, 2021
f45f0db
[geocat]: map / add map.geo.admin.ch background layer config option.
fxprunayre Jul 6, 2021
3d9a612
[geocat]: map / configuration.
fxprunayre Jul 19, 2021
6cb18b7
[geocat]: no status in search results. Add group logo. Relates to htt…
fxprunayre Jul 19, 2021
4b22080
[geocat]: search results / add harvested badge.
fxprunayre Jul 19, 2021
aa832b5
[geocat]: search results / grid mode only.
cmangeat Feb 14, 2023
cb2814c
[geocat]: facet on catalogue. Includes https://github.com/geonetwork/…
fxprunayre Jul 19, 2021
30d9aac
[geocat]: custom label.
cmangeat Feb 14, 2023
2d8e5df
[geocat]: restore geoshop.
fxprunayre Jul 20, 2021
e3fc23e
[geocat]: facet config and info icon only when you can edit.
fxprunayre Jul 21, 2021
da444de
[geocat]: editor board facet config.
fxprunayre Jul 23, 2021
6c5cebe
[geocat]: editor board facet and INSPIRE validation.
fxprunayre Jul 23, 2021
e8c308e
[geocat]: ISO19139.che plugin.
fxprunayre May 19, 2021
ace8269
[geocat]: ui, add projection 21187 projs definition
fgravin Mar 9, 2022
9ddc594
[geocat]: ui, editor map takes chtopo context
fgravin Mar 9, 2022
9ef03da
[geocat]: ui, set default geoadmin WMTS as https
fgravin Mar 9, 2022
02fcbfa
[geocat]: ugly patch as don't want 'fre' or 'deu' to be displayed dur…
cmangeat Mar 10, 2022
71a12f6
[geocat]: Map service / Avoid error when adding geoadmin bg layer
jahow Mar 18, 2022
df68b50
[geocat]: search / Fix search results layout
jahow Mar 18, 2022
9ea3b5c
[geocat]: let gn-popover-content pop freely
cmangeat Mar 19, 2022
fae9394
[geocat]: geocat.ch / API / GMO3 export and formatter config.
cmangeat Apr 1, 2022
2bcc358
[geocat]: missing link from top tool bar to documentation
cmangeat Apr 29, 2022
22177a7
[geocat]: add a rewrite rule for md.viewer
fgravin Jul 12, 2022
88f9c4e
[geocat]: remove tags-input directive for topic category .che
fgravin Jul 12, 2022
f48c0d1
[geocat]: avoid first iso topic category code to be ignored (rogaton …
cmangeat Aug 26, 2022
67a484c
[geocat]: registry, restrict validation to admin
fgravin Nov 2, 2022
97ccc81
[geocat]: add geocat logo in the home page
fgravin Nov 23, 2022
23b1834
[geocat]: fix URL validation
fgravin Jun 8, 2022
620f4de
[geocat]: set default schema iso19139.che
cmangeat Jun 27, 2022
94aea7b
[geocat]: perform validation upon md whose subtemplate have been subs…
cmangeat Aug 5, 2022
3d2989c
[geocat]: v4 and Nutzungsbedingungen
cmangeat Aug 8, 2022
da1d532
[geocat]: unpublish metadata job
cmangeat Aug 29, 2022
b8ac63b
[geocat]: desactivate url check when unpublish invalid metadata job
cmangeat Aug 30, 2022
d398ff4
[geocat]: CSP allowing iframe from '*.admin.ch' '*.cartoriviera.ch' '…
cmangeat Oct 30, 2022
5e772f1
seems there is a trouble with regex filter and clause or empty duncti…
cmangeat Mar 19, 2022
7a1a15d
Harvester / Local folder / Allow known scripts.
fxprunayre Jul 27, 2021
03affae
gc: add che contact translation in directories
fgravin Jul 6, 2022
551ab40
translations
fgravin Jul 6, 2022
6364938
legal constraints translations
cmangeat Jan 24, 2023
9499938
ellipsis for long group name in result cards
cmangeat Oct 30, 2022
aa9a9ab
Fix build when empty m2 repo is used.
cmangeat Jan 25, 2023
fc5321b
sort thematic facet by translation
cmangeat Apr 29, 2022
3e5fe28
gc: increase size of facets for tag and topic
fgravin Jul 13, 2022
9b0b296
[geocat]: don't let socket connection troubles make idle connections …
cmangeat Nov 28, 2020
50983a3
container with 'embedded' mail.smtp.ssl.protocols def (as 'xml' bean)
cmangeat Feb 8, 2023
fb5bffd
trigger build
cmangeat Feb 14, 2023
72ae60f
facets def. in catController, seems that cl_geodataType.key is not re…
cmangeat Feb 15, 2023
04ce71f
|gn]: last facet displayed with first ones ???
cmangeat May 5, 2022
4453fe9
try a 'hard' fix for log4j2 trouble
cmangeat Mar 1, 2023
6dbd434
add log4j-web for tomcat
cmangeat Mar 1, 2023
2d264a0
test with no log4j-slf4j18-impl and no messaging
cmangeat Mar 1, 2023
40eb6af
try to update maven git id plugin so to esae wro4j startup...
cmangeat Mar 7, 2023
b588096
avoid race condition, resize map once target size ok
cmangeat Mar 21, 2023
a5a7e68
[geocat], simple view, update frequency in metadata section
cmangeat Mar 28, 2023
b465966
[gn] Support negative dates for temporal extents
sebr72 Mar 15, 2023
f70804c
Less aggressive housekeeping in update-fixed-info.xsl
cmangeat Mar 31, 2023
b1e54fd
Revert "Record view / Display bounding polygon if set"
cmangeat Apr 6, 2023
107e3b7
INSPIRE conformity improvement (#234)
fgravin Apr 11, 2023
99ed5ab
hack: disable 'cache at thesaurus level' when looking for keyword giv…
cmangeat Apr 17, 2023
216161a
[geocat] Make harvesting/geocat_banner.png configurable by Swisstopo
sebr72 Jun 20, 2023
daef1e5
Apply prettier to changed files
sebr72 Jun 20, 2023
74ce332
API / CSV export / Add support for custom export. (#7132)
fxprunayre Aug 24, 2023
9d4c480
[geocat] New source to CSP frame-ancestors for city of Fribourg
cmangeat Oct 22, 2023
0553c64
[geocat] Set XSRF cookie path to /
fgravin Dec 14, 2023
a23faca
[geocat] Gnui lang package: add che topic category
fgravin Dec 15, 2023
4503de8
While using the filesystem harvester: Delete datadir when deleting me…
sebr72 Jan 8, 2024
541b692
[geocat] Add link to https://www.geocat.ch/datahub/search/ (datahub) …
Dec 4, 2023
e403a5b
Maintenance Swagger API to clean data dir of orphaned metadata absent…
sebr72 Jan 17, 2024
ae19a31
Use Java 21 for Sonarcloud plugin (#7622)
juanluisrp Jan 16, 2024
229aff8
SEO / Set HTML head title and description
fxprunayre May 15, 2023
f5a0710
[geocat] Add Google Analytics Tag to html pages, only in production
Jan 26, 2023
3718541
on subtemplate's update, trigger indexation for every md referencing it
cmangeat Jan 29, 2024
407c537
trigger build
cmangeat Feb 16, 2024
974d8b5
change basemap to greyscale swisstopo in EPSG:3857
Jan 16, 2024
e95f551
set global CRS to EPSG:3857 and add support for EPSG:2056 (LV95)
Jan 16, 2024
77237bc
Bump commons-net:commons-net from 3.9.0 to 3.10.0
dependabot[bot] Feb 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .github/workflows/geonetwork-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches:
- geocat_v4.2.3_report_custom*

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:

- name: "Checking out"
uses: actions/checkout@v2
with:
submodules: recursive

- name: "Setting up JDK 1.8"
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: "Cache Maven packages"
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: "Update maven dependencies"
run: mvn -Pdocker de.qaware.maven:go-offline-maven-plugin:resolve-dependencies

- name: Increase system limits
run: sudo sysctl -w vm.max_map_count=262144

- name: run tests
run: |
mvn resources:resources@copy-index-schema-to-source -f web
mvn clean verify -Pit
- name: "Installing"
run: mvn -B clean -DskipTests install -Ddb.username=db_username -Ddb.name=db_name -Ddb.type=postgres-postgis -Ddb.host=db_host -Ddb.password=db_password -Ddb.pool.maxActive=50 -Ddb.port=5432

- name: "Setting image tag"
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)

- name: "Building docker image"
run: mvn -pl web -Pdocker docker:build -DdockerImageName=docker.pkg.github.com/geoadmin/geocat/geocat:${{ steps.version.outputs.VERSION }}-${{ github.run_number }}

- name: "Login to docker.pkg.github.com"
run: docker login -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} docker.pkg.github.com

- name: "Push to GitHub Packages"
run: docker push docker.pkg.github.com/geoadmin/geocat/geocat:${{ steps.version.outputs.VERSION }}-${{ github.run_number }}
21 changes: 9 additions & 12 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: SonarCloud QA
on:
push:
branches:
- main
- 4.0.x
- 3.12.x
- geocat_v4.2.3_report_custom
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand All @@ -19,12 +17,9 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: 'recursive'
# For building GeoNetwork, JDK8 is necessary, but for running
# the SonarQube plugin, JDK11 is necessary.
# So, first install JDK 8, build GeoNetwork, then install JDK11
# and run SonarQube:
- name: Set up JDK 8
uses: actions/[email protected]
show-progress: 'false'
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: 8
distribution: 'temurin'
Expand All @@ -37,11 +32,13 @@ jobs:
restore-keys: ${{ runner.os }}-sonar
- name: Build GN
run: mvn -B package -DskipTests
- name: Set up JDK 11
uses: actions/[email protected]

- name: Set up JDK 21 # Sonarcloud analyzer needs at least JDK 17
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
cache: 'maven'
- name: Analyze with Sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
34 changes: 34 additions & 0 deletions common/src/main/java/org/fao/geonet/exceptions/GNException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//=============================================================================
//=== Copyright (C) 2001-2023 Food and Agriculture Organization of the
//=== United Nations (FAO-UN), United Nations World Food Programme (WFP)
//=== and United Nations Environment Programme (UNEP)
//===
//=== This program is free software; you can redistribute it and/or modify
//=== it under the terms of the GNU General Public License as published by
//=== the Free Software Foundation; either version 2 of the License, or (at
//=== your option) any later version.
//===
//=== This program is distributed in the hope that it will be useful, but
//=== WITHOUT ANY WARRANTY; without even the implied warranty of
//=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//=== General Public License for more details.
//===
//=== You should have received a copy of the GNU General Public License
//=== along with this program; if not, write to the Free Software
//=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
//===
//=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
//=== Rome - Italy. email: [email protected]
//==============================================================================
package org.fao.geonet.exceptions;

public class GNException extends RuntimeException {

public GNException(String msg) {
super(msg);
}

public GNException(String msg, Throwable cause) {
super(msg, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
*/
package org.fao.geonet.kernel;

import org.fao.geonet.NodeInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
Expand All @@ -43,16 +41,19 @@

public class SpringLocalServiceInvoker {

@Autowired
public RequestMappingHandlerMapping requestMappingHandlerMapping;
public final RequestMappingHandlerMapping requestMappingHandlerMapping;

@Autowired
public RequestMappingHandlerAdapter requestMappingHandlerAdapter;
public final RequestMappingHandlerAdapter requestMappingHandlerAdapter;

private HandlerMethodArgumentResolverComposite argumentResolvers;
private HandlerMethodReturnValueHandlerComposite returnValueHandlers;
private DefaultDataBinderFactory webDataBinderFactory;

public SpringLocalServiceInvoker(RequestMappingHandlerMapping requestMappingHandlerMapping, RequestMappingHandlerAdapter requestMappingHandlerAdapter) {
this.requestMappingHandlerMapping = requestMappingHandlerMapping;
this.requestMappingHandlerAdapter = requestMappingHandlerAdapter;
}

public void init() {
argumentResolvers = new HandlerMethodArgumentResolverComposite().addResolvers(requestMappingHandlerAdapter.getArgumentResolvers());
returnValueHandlers = new HandlerMethodReturnValueHandlerComposite().addHandlers(requestMappingHandlerAdapter.getReturnValueHandlers());
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/fao/geonet/kernel/Thesaurus.java
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ public KeywordBean getKeyword(String uri, String... languages) {
String cacheKey = "getKeyword" + uri + Arrays.stream(languages).collect(Collectors.joining(""));
Object cacheValue = THESAURUS_SEARCH_CACHE.getIfPresent(cacheKey);
if (cacheValue != null) {
return (KeywordBean) cacheValue;
//return (KeywordBean) cacheValue;
}

List<KeywordBean> keywords;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package org.fao.geonet.kernel.datamanager.base;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
Expand All @@ -33,19 +34,20 @@
import jeeves.transaction.TransactionTask;
import jeeves.xlink.Processor;
import org.apache.commons.lang.StringUtils;
import org.elasticsearch.action.search.SearchResponse;
import org.fao.geonet.ApplicationContextHolder;
import org.fao.geonet.constants.Edit;
import org.fao.geonet.constants.Geonet;
import org.fao.geonet.constants.Params;
import org.fao.geonet.domain.*;
import org.fao.geonet.exceptions.GNException;
import org.fao.geonet.exceptions.UnAuthorizedException;
import org.fao.geonet.kernel.*;
import org.fao.geonet.kernel.datamanager.*;
import org.fao.geonet.kernel.schema.MetadataSchema;
import org.fao.geonet.kernel.schema.SchemaPlugin;
import org.fao.geonet.kernel.search.EsSearchManager;
import org.fao.geonet.kernel.search.IndexingMode;
import org.fao.geonet.kernel.search.MetaSearcher;
import org.fao.geonet.kernel.search.index.BatchOpsMetadataReindexer;
import org.fao.geonet.kernel.setting.SettingManager;
import org.fao.geonet.kernel.setting.Settings;
Expand Down Expand Up @@ -104,8 +106,6 @@ public class BaseMetadataManager implements IMetadataManager {
@Autowired
private GroupRepository groupRepository;
@Autowired
private MetadataStatusRepository metadataStatusRepository;
@Autowired
private MetadataValidationRepository metadataValidationRepository;
@Autowired
private MetadataRepository metadataRepository;
Expand Down Expand Up @@ -141,6 +141,10 @@ public class BaseMetadataManager implements IMetadataManager {

@Autowired
private ApplicationContext _applicationContext;

@VisibleForTesting
public int maxMdsReferencingSubTemplate = 10000;

@PersistenceContext
private EntityManager _entityManager;

Expand Down Expand Up @@ -747,6 +751,9 @@ public synchronized AbstractMetadata updateMetadata(final ServiceContext context
getSearchManager().delete(String.format("+uuid:\"%s\"", uuidBeforeUfo));
}
metadataIndexer.indexMetadata(metadataId, true, indexingMode);
if (metadata.getDataInfo().getType() == MetadataType.SUB_TEMPLATE) {
indexMdsReferencingSubTemplate(context, metadata);
}
}
}

Expand Down Expand Up @@ -1314,4 +1321,26 @@ boolean hasReferencingMetadata(ServiceContext context, AbstractMetadata metadata
return this.searchManager.query(query.toString(), null, 0, 0).getHits().getTotalHits().value > 0;
}

private void indexMdsReferencingSubTemplate(ServiceContext context, AbstractMetadata subTemplate) throws Exception {
StringBuilder query = new StringBuilder(String.format("xlink:*%s*", subTemplate.getUuid()));
SearchResponse response = this.searchManager.query(query.toString(), null, 0, maxMdsReferencingSubTemplate);
if (response.getHits().getTotalHits().value > maxMdsReferencingSubTemplate) {
throw new GNException("Not implemented");
}
ArrayList<String> toIndex = new ArrayList<>();
response.getHits().forEach(consumer -> {
String consumerUuid = consumer.getId();
try {
String consumerId = this.metadataUtils.getMetadataId(consumerUuid);
if (consumerId != null) {
toIndex.add(consumerId);
}
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
});
metadataIndexer.batchIndexInThreadPool(context, toIndex);
}
}
2 changes: 2 additions & 0 deletions core/src/main/java/org/fao/geonet/kernel/mef/Importer.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ public static void importRecord(String uuid, MEFLib.UuidAction uuidAction, List<
if (Log.isDebugEnabled(Geonet.MEF)) {
Log.debug(Geonet.MEF, "Deleting existing metadata with UUID : " + uuid);
}
Store store = context.getBean("resourceStore", Store.class);
store.delResources(context, uuid, true);
metadataManager.deleteMetadata(context, dm.getMetadataId(uuid));
metadataManager.flush();
}
Expand Down
Loading
Loading