fixed main test
This commit is contained in:
parent
0c0163e8e4
commit
2af2059735
|
@ -45,11 +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
|
* @param createShortURL creates and returns the short URL also.
|
||||||
* @return the public links for
|
* @return the public links for
|
||||||
* @throws Exception the exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item, boolean alsoShortURL) throws Exception {
|
public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item, boolean createShortURL) throws Exception {
|
||||||
LOG.info("getPublicLinksFor called for: " + item);
|
LOG.info("getPublicLinksFor called for: " + item);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -73,7 +73,7 @@ public class GeoportalCommon {
|
||||||
|
|
||||||
String shortUrl = link;
|
String shortUrl = link;
|
||||||
try {
|
try {
|
||||||
if(alsoShortURL)
|
if(createShortURL)
|
||||||
shortUrl = getShortUrl(link);
|
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);
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class TestGeonaReader {
|
||||||
ScopeProvider.instance.set(scope);
|
ScopeProvider.instance.set(scope);
|
||||||
GeoportalCommon gc = new GeoportalCommon();
|
GeoportalCommon gc = new GeoportalCommon();
|
||||||
GeoNaItemRef item = new GeoNaItemRef("", "concessione");
|
GeoNaItemRef item = new GeoNaItemRef("", "concessione");
|
||||||
GeoNaItemRef links = gc.getPublicLinksFor(item);
|
GeoNaItemRef links = gc.getPublicLinksFor(item,true);
|
||||||
return links;
|
return links;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue