feature_22286 #6

Merged
francesco.mangiacrapa merged 16 commits from feature_22286 into master 2022-01-13 17:02:39 +01:00
3 changed files with 54 additions and 22 deletions
Showing only changes of commit 2bcebc758d - Show all commits

View File

@ -252,9 +252,9 @@ public class GeoPortalDataEntryApp implements EntryPoint {
@Override @Override
public void onSuccess(GeonaISConfig result) { public void onSuccess(GeonaISConfig result) {
if (result != null && result.getgRSecondaryType() != null if (result != null && result.getGenericResourceSecondaryType() != null
&& result.getScope() != null) { && result.getScope() != null) {
callGetMetadataProfiles(result.getScope(), result.getgRSecondaryType()); callGetMetadataProfiles(result.getScope(), result.getGenericResourceSecondaryType());
} else } else
Window.alert( Window.alert(
"Sorry, no configuration found in the context. Please, contact the support"); "Sorry, no configuration found in the context. Please, contact the support");

View File

@ -17,7 +17,6 @@ import org.gcube.application.geoportal.common.rest.MongoConcessioni;
import org.gcube.application.geoportal.common.rest.TempFile; import org.gcube.application.geoportal.common.rest.TempFile;
import org.gcube.application.geoportalcommon.ConvertToDataViewModel; import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
import org.gcube.application.geoportalcommon.GeoportalCommon; import org.gcube.application.geoportalcommon.GeoportalCommon;
//import org.gcube.application.geoportalcommon.GeoportalCommon;
import org.gcube.application.geoportalcommon.MongoServiceCommon; import org.gcube.application.geoportalcommon.MongoServiceCommon;
import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile; import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile;
import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile; import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile;
@ -396,8 +395,9 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
try { try {
theSecondaryType = this.getServletContext().getInitParameter(GEONA_GENERIC_RESOURCE_SECONDARY_TYPE); theSecondaryType = this.getServletContext().getInitParameter(GEONA_GENERIC_RESOURCE_SECONDARY_TYPE);
} catch (Exception e) { } catch (Exception e) {
LOG.error("I cannot read the init parameter for: " + GEONA_GENERIC_RESOURCE_SECONDARY_TYPE, e); LOG.warn("I cannot read the init parameter for: " + GEONA_GENERIC_RESOURCE_SECONDARY_TYPE, e);
theSecondaryType = "GeoNaMetadata"; theSecondaryType = "GeoNaMetadata";
LOG.warn("Using default SecondaryType: " + theSecondaryType);
} }
// LOG.warn("\n\n\nHARD-CABLING THE SCOPE, PLEASE REMOTE IT!!!!\n\n\n"); // LOG.warn("\n\n\nHARD-CABLING THE SCOPE, PLEASE REMOTE IT!!!!\n\n\n");

View File

@ -2,39 +2,73 @@ package org.gcube.portlets.user.geoportaldataentry.shared;
import java.io.Serializable; import java.io.Serializable;
public class GeonaISConfig implements Serializable{ /**
* The Class GeonaISConfig.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Dec 22, 2021
*/
public class GeonaISConfig implements Serializable {
/** /**
* *
*/ */
private static final long serialVersionUID = -6700506811708315617L; private static final long serialVersionUID = 4187839053354198268L;
private String genericResSecondaryType;
String gRSecondaryType; private String scope;
String scope;
/**
* Instantiates a new geona IS config.
*/
public GeonaISConfig() { public GeonaISConfig() {
} }
/**
* Instantiates a new geona IS config.
*
* @param gRSecondaryType the g R secondary type
* @param scope the scope
*/
public GeonaISConfig(String gRSecondaryType, String scope) { public GeonaISConfig(String gRSecondaryType, String scope) {
super(); super();
this.gRSecondaryType = gRSecondaryType; this.genericResSecondaryType = gRSecondaryType;
this.scope = scope; this.scope = scope;
} }
/**
public String getgRSecondaryType() { * Gets the generic resource secondary type.
return gRSecondaryType; *
* @return the generic resource secondary type
*/
public String getGenericResourceSecondaryType() {
return genericResSecondaryType;
} }
public void setgRSecondaryType(String gRSecondaryType) { /**
this.gRSecondaryType = gRSecondaryType; * Sets the generic resource secondary type.
*
* @param gRSecondaryType the new generic resource secondary type
*/
public void setGenericResourceSecondaryType(String gRSecondaryType) {
this.genericResSecondaryType = gRSecondaryType;
} }
/**
* Gets the scope.
*
* @return the scope
*/
public String getScope() { public String getScope() {
return scope; return scope;
} }
/**
* Sets the scope.
*
* @param scope the new scope
*/
public void setScope(String scope) { public void setScope(String scope) {
this.scope = scope; this.scope = scope;
} }
@ -42,14 +76,12 @@ public class GeonaISConfig implements Serializable{
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("GeonaISConfig [gRSecondaryType="); builder.append("GeonaISConfig [genericResSecondaryType=");
builder.append(gRSecondaryType); builder.append(genericResSecondaryType);
builder.append(", scope="); builder.append(", scope=");
builder.append(scope); builder.append(scope);
builder.append("]"); builder.append("]");
return builder.toString(); return builder.toString();
} }
} }