optional shorting for URL

This commit is contained in:
Francesco Mangiacrapa 2021-09-14 13:08:24 +02:00
parent a96ee1f8be
commit dde561df2a
2 changed files with 5 additions and 3 deletions

View File

@ -45,10 +45,11 @@ public class GeoportalCommon {
* Gets the public links for.
*
* @param item the item
* @param alsoShort the also short
* @return the public links for
* @throws Exception the exception
*/
public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item) throws Exception {
public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item, boolean alsoShortURL) throws Exception {
LOG.info("getPublicLinksFor called for: " + item);
try {
@ -72,7 +73,8 @@ public class GeoportalCommon {
String shortUrl = link;
try {
shortUrl = getShortUrl(link);
if(alsoShortURL)
shortUrl = getShortUrl(link);
} catch (Exception e) {
LOG.warn("Error on shortening the URL: ", e);
}

View File

@ -26,7 +26,7 @@ public class ValidationReportDV implements Serializable {
* Sep 13, 2021
*/
public static enum ValidationStatus {
PASSED("OK"), ERROR("Error"), WARNING("Warning");
PASSED("Success"), ERROR("Error"), WARNING("Warning");
private String label;