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