feature_22286 #6
|
@ -252,9 +252,9 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
@Override
|
||||
public void onSuccess(GeonaISConfig result) {
|
||||
|
||||
if (result != null && result.getgRSecondaryType() != null
|
||||
if (result != null && result.getGenericResourceSecondaryType() != null
|
||||
&& result.getScope() != null) {
|
||||
callGetMetadataProfiles(result.getScope(), result.getgRSecondaryType());
|
||||
callGetMetadataProfiles(result.getScope(), result.getGenericResourceSecondaryType());
|
||||
} else
|
||||
Window.alert(
|
||||
"Sorry, no configuration found in the context. Please, contact the support");
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.gcube.application.geoportal.common.rest.MongoConcessioni;
|
|||
import org.gcube.application.geoportal.common.rest.TempFile;
|
||||
import org.gcube.application.geoportalcommon.ConvertToDataViewModel;
|
||||
import org.gcube.application.geoportalcommon.GeoportalCommon;
|
||||
//import org.gcube.application.geoportalcommon.GeoportalCommon;
|
||||
import org.gcube.application.geoportalcommon.MongoServiceCommon;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataEntryConfigProfile;
|
||||
import org.gcube.application.geoportalcommon.shared.GNADataViewerConfigProfile;
|
||||
|
@ -396,8 +395,9 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
try {
|
||||
theSecondaryType = this.getServletContext().getInitParameter(GEONA_GENERIC_RESOURCE_SECONDARY_TYPE);
|
||||
} 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";
|
||||
LOG.warn("Using default SecondaryType: " + theSecondaryType);
|
||||
}
|
||||
|
||||
// LOG.warn("\n\n\nHARD-CABLING THE SCOPE, PLEASE REMOTE IT!!!!\n\n\n");
|
||||
|
|
|
@ -2,39 +2,73 @@ package org.gcube.portlets.user.geoportaldataentry.shared;
|
|||
|
||||
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;
|
||||
|
||||
String gRSecondaryType;
|
||||
String scope;
|
||||
|
||||
private static final long serialVersionUID = 4187839053354198268L;
|
||||
private String genericResSecondaryType;
|
||||
private String scope;
|
||||
|
||||
/**
|
||||
* Instantiates a new geona IS config.
|
||||
*/
|
||||
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) {
|
||||
super();
|
||||
this.gRSecondaryType = gRSecondaryType;
|
||||
this.genericResSecondaryType = gRSecondaryType;
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
|
||||
public String getgRSecondaryType() {
|
||||
return gRSecondaryType;
|
||||
/**
|
||||
* Gets the generic resource secondary type.
|
||||
*
|
||||
* @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() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scope.
|
||||
*
|
||||
* @param scope the new scope
|
||||
*/
|
||||
public void setScope(String scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
@ -42,14 +76,12 @@ public class GeonaISConfig implements Serializable{
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("GeonaISConfig [gRSecondaryType=");
|
||||
builder.append(gRSecondaryType);
|
||||
builder.append("GeonaISConfig [genericResSecondaryType=");
|
||||
builder.append(genericResSecondaryType);
|
||||
builder.append(", scope=");
|
||||
builder.append(scope);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue