optional shorting for URL
This commit is contained in:
parent
a96ee1f8be
commit
dde561df2a
|
@ -45,10 +45,11 @@ public class GeoportalCommon {
|
||||||
* Gets the public links for.
|
* Gets the public links for.
|
||||||
*
|
*
|
||||||
* @param item the item
|
* @param item the item
|
||||||
|
* @param alsoShort the also short
|
||||||
* @return the public links for
|
* @return the public links for
|
||||||
* @throws Exception the exception
|
* @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);
|
LOG.info("getPublicLinksFor called for: " + item);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -72,7 +73,8 @@ public class GeoportalCommon {
|
||||||
|
|
||||||
String shortUrl = link;
|
String shortUrl = link;
|
||||||
try {
|
try {
|
||||||
shortUrl = getShortUrl(link);
|
if(alsoShortURL)
|
||||||
|
shortUrl = getShortUrl(link);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.warn("Error on shortening the URL: ", e);
|
LOG.warn("Error on shortening the URL: ", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ValidationReportDV implements Serializable {
|
||||||
* Sep 13, 2021
|
* Sep 13, 2021
|
||||||
*/
|
*/
|
||||||
public static enum ValidationStatus {
|
public static enum ValidationStatus {
|
||||||
PASSED("OK"), ERROR("Error"), WARNING("Warning");
|
PASSED("Success"), ERROR("Error"), WARNING("Warning");
|
||||||
|
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue