forked from geonetwork/core-geonetwork
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INSPIRE Validator - exception handling improvements and Sonalint fixes
- Loading branch information
Showing
10 changed files
with
260 additions
and
171 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
26 changes: 24 additions & 2 deletions
26
...pi/records/InspireValidationRunnable.java → .../validator/InspireValidationRunnable.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 |
---|---|---|
@@ -1,10 +1,32 @@ | ||
package org.fao.geonet.api.records; | ||
/* | ||
* 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.inspire.validator; | ||
|
||
import jeeves.server.context.ServiceContext; | ||
import jeeves.transaction.TransactionManager; | ||
import jeeves.transaction.TransactionTask; | ||
import org.fao.geonet.ApplicationContextHolder; | ||
import org.fao.geonet.api.records.editing.InspireValidatorUtils; | ||
import org.fao.geonet.inspire.validator.InspireValidatorUtils; | ||
import org.fao.geonet.domain.MetadataValidation; | ||
import org.fao.geonet.domain.MetadataValidationId; | ||
import org.fao.geonet.domain.MetadataValidationStatus; | ||
|
80 changes: 80 additions & 0 deletions
80
services/src/main/java/org/fao/geonet/inspire/validator/InspireValidatorException.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,80 @@ | ||
/* | ||
* 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.inspire.validator; | ||
|
||
import org.fao.geonet.exceptions.LocalizedException; | ||
|
||
import java.util.Locale; | ||
|
||
public class InspireValidatorException extends LocalizedException { | ||
public InspireValidatorException() { | ||
super(); | ||
} | ||
|
||
public InspireValidatorException(String message) { | ||
super(message); | ||
} | ||
|
||
public InspireValidatorException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public InspireValidatorException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
protected String getResourceBundleBeanQualifier() { | ||
return "apiMessages"; | ||
} | ||
|
||
@Override | ||
public InspireValidatorException withMessageKey(String messageKey) { | ||
super.withMessageKey(messageKey); | ||
return this; | ||
} | ||
|
||
@Override | ||
public InspireValidatorException withMessageKey(String messageKey, Object[] messageKeyArgs) { | ||
super.withMessageKey(messageKey, messageKeyArgs); | ||
return this; | ||
} | ||
|
||
@Override | ||
public InspireValidatorException withDescriptionKey(String descriptionKey) { | ||
super.withDescriptionKey(descriptionKey); | ||
return this; | ||
} | ||
|
||
@Override | ||
public InspireValidatorException withDescriptionKey(String descriptionKey, Object[] descriptionKeyArgs) { | ||
super.withDescriptionKey(descriptionKey, descriptionKeyArgs); | ||
return this; | ||
} | ||
|
||
@Override | ||
public InspireValidatorException withLocale(Locale locale) { | ||
super.withLocale(locale); | ||
return this; | ||
} | ||
} |
Oops, something went wrong.