refactor
This commit is contained in:
parent
42baf0633c
commit
192c0098e2
|
@ -6,7 +6,7 @@ import java.util.Arrays;
|
|||
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.PublicLink;
|
||||
import org.gcube.portlets.user.urlshortener.UrlShortener;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -49,7 +49,7 @@ public class GeoportalCommon {
|
|||
* @return the public links for
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item, boolean createShortURL) throws Exception {
|
||||
public GeoportalItemReferences getPublicLinksFor(GeoportalItemReferences item, boolean createShortURL) throws Exception {
|
||||
LOG.info("getPublicLinksFor called for: " + item);
|
||||
|
||||
try {
|
||||
|
|
|
@ -3,13 +3,13 @@ package org.gcube.application.geoportalcommon.shared;
|
|||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* The Class GeoNaItemRef.
|
||||
* The Class GeoportalItemReferences.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Jul 30, 2021
|
||||
* Oct 18, 2022
|
||||
*/
|
||||
public class GeoNaItemRef implements Serializable {
|
||||
public class GeoportalItemReferences implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ public class GeoNaItemRef implements Serializable {
|
|||
|
||||
// this is the mongoID
|
||||
private String projectID;
|
||||
private String profileID; // this is the profileID
|
||||
private String profileID; // this is the profileID - UCD
|
||||
private String itemName;
|
||||
|
||||
private PublicLink restrictedLink;
|
||||
|
@ -29,7 +29,7 @@ public class GeoNaItemRef implements Serializable {
|
|||
/**
|
||||
* Instantiates a new geo na object.
|
||||
*/
|
||||
public GeoNaItemRef() {
|
||||
public GeoportalItemReferences() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class GeoNaItemRef implements Serializable {
|
|||
* @param projectID the project ID
|
||||
* @param profileID the profile ID
|
||||
*/
|
||||
public GeoNaItemRef(String projectID, String profileID) {
|
||||
public GeoportalItemReferences(String projectID, String profileID) {
|
||||
super();
|
||||
this.projectID = projectID;
|
||||
this.profileID = profileID;
|
||||
|
@ -52,7 +52,7 @@ public class GeoNaItemRef implements Serializable {
|
|||
* @param profileID the profile ID
|
||||
* @param layerObjectType the layer object type
|
||||
*/
|
||||
public GeoNaItemRef(String projectID, String profileID, String layerObjectType) {
|
||||
public GeoportalItemReferences(String projectID, String profileID, String layerObjectType) {
|
||||
super();
|
||||
this.projectID = projectID;
|
||||
this.profileID = profileID;
|
||||
|
@ -140,10 +140,15 @@ public class GeoNaItemRef implements Serializable {
|
|||
this.openLink = openLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* To string.
|
||||
*
|
||||
* @return the string
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("GeoNaItemRef [projectID=");
|
||||
builder.append("GeoportalItemReferences [projectID=");
|
||||
builder.append(projectID);
|
||||
builder.append(", profileID=");
|
||||
builder.append(profileID);
|
|
@ -3,7 +3,7 @@ package org.gcube.application;
|
|||
import org.gcube.application.geoportalcommon.GeoportalCommon;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.config.RoleRights;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
|
@ -33,13 +33,13 @@ public class TestGNACommon {
|
|||
}
|
||||
|
||||
// @Test
|
||||
public GeoNaItemRef getLinks() throws Exception {
|
||||
public GeoportalItemReferences getLinks() throws Exception {
|
||||
System.out.println("getGeoNaDataViewProfile called");
|
||||
|
||||
ScopeProvider.instance.set(CONTEXT);
|
||||
GeoportalCommon gc = new GeoportalCommon();
|
||||
GeoNaItemRef item = new GeoNaItemRef("", "concessione");
|
||||
GeoNaItemRef links = gc.getPublicLinksFor(item, true);
|
||||
GeoportalItemReferences item = new GeoportalItemReferences("", "concessione");
|
||||
GeoportalItemReferences links = gc.getPublicLinksFor(item, true);
|
||||
return links;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue