Skip to content

Commit b544fbb

Browse files
authored
WebDav harvester / update database change date when updating a metadata. (#8788)
1 parent 3b9ee3e commit b544fbb

File tree

1 file changed

+10
-10
lines changed
  • harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav

1 file changed

+10
-10
lines changed

harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/webdav/Harvester.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
//=== Copyright (C) 2001-2024 Food and Agriculture Organization of the
2+
//=== Copyright (C) 2001-2025 Food and Agriculture Organization of the
33
//=== United Nations (FAO-UN), United Nations World Food Programme (WFP)
44
//=== and United Nations Environment Programme (UNEP)
55
//===
@@ -50,23 +50,23 @@
5050
//=============================================================================
5151

5252
interface RemoteRetriever {
53-
public void init(AtomicBoolean cancelMonitor, Logger log, ServiceContext context, WebDavParams params);
53+
void init(AtomicBoolean cancelMonitor, Logger log, ServiceContext context, WebDavParams params);
5454

55-
public List<RemoteFile> retrieve() throws Exception;
55+
List<RemoteFile> retrieve() throws Exception;
5656

57-
public void destroy();
57+
void destroy();
5858
}
5959

6060
//=============================================================================
6161

6262
interface RemoteFile {
63-
public String getPath();
63+
String getPath();
6464

65-
public ISODate getChangeDate();
65+
ISODate getChangeDate();
6666

67-
public Element getMetadata(SchemaManager schemaMan) throws Exception;
67+
Element getMetadata(SchemaManager schemaMan) throws Exception;
6868

69-
public boolean isMoreRecentThan(String localDate);
69+
boolean isMoreRecentThan(String localDate);
7070
}
7171

7272
//=============================================================================
@@ -117,7 +117,7 @@ public HarvestResult harvest(Logger log) throws Exception {
117117
this.log = log;
118118
if (log.isDebugEnabled())
119119
log.debug("Retrieving remote metadata information for : " + params.getName());
120-
RemoteRetriever rr = null;
120+
RemoteRetriever rr;
121121
if (params.subtype.equals("webdav")) {
122122
rr = new WebDavRetriever();
123123
} else if (params.subtype.equals("waf")) {
@@ -502,7 +502,7 @@ private void updateMetadata(RemoteFile rf, RecordInfo recordInfo, boolean force)
502502
String language = context.getLanguage();
503503

504504
final AbstractMetadata metadata = metadataManager.updateMetadata(context, recordInfo.id, md, validate, ufo, language,
505-
date, false, IndexingMode.none);
505+
date, true, IndexingMode.none);
506506

507507
if(force) {
508508
//change ownership of metadata to new harvester

0 commit comments

Comments
 (0)