Re-Activated "Edit the Project" facility.

This commit is contained in:
Francesco Mangiacrapa 2022-09-12 15:09:43 +02:00
parent e350a4b9d8
commit 6fc0af0192
11 changed files with 190 additions and 168 deletions

12
pom.xml
View File

@ -61,12 +61,12 @@
<dependencies>
<!-- needed to compile with gwt > 2.7 -->
<!-- <dependency> -->
<!-- <groupId>javax.servlet</groupId> -->
<!-- <artifactId>javax.servlet-api</artifactId> -->
<!-- <version>3.1.0</version> -->
<!-- <scope>provided</scope> -->
<!-- </dependency> -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- needed to compile with gwt > 2.7 -->
<!-- <dependency> -->

View File

@ -28,6 +28,8 @@ public class ConstantsGeoPortalDataEntryApp {
public static final int MAX_COLUMN_DISPLAYED_IN_THE_TABLE = 5;
public static final int PAGINATION_SIZE = 20;
public static final String DEFAULT_DOCUMENT_PROJECTION_NAME = "_theDocument";
/**
* The Enum RECORD_TYPE.

View File

@ -99,9 +99,9 @@ public class GeoPortalClientCaches {
if (itemField.isDisplayAsResult()) {
searchingFilterParameters.addDisplayField(itemField);
// adding to projection for filtering
for (String jsonField : itemField.getJsonFields()) {
String mongoProjection = itemField.getProjection() + "." + jsonField;
searchingFilterParameters.putMongoProjection(mongoProjection, 1);
for (String jsonFieldPath : itemField.getJsonFields()) {
//String mongoProjection = itemField.getProjection() + "." + jsonField;
searchingFilterParameters.putMongoProjection(jsonFieldPath, 1);
}
}

View File

@ -22,6 +22,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.project.LifecycleI
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclarationDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.ACTION_PERFORMED_ON_ITEM;
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalClientCaches.CacheSearchingFilterParametersFromConfig;
import org.gcube.portlets.user.geoportaldataentry.client.events.ActionOnItemEvent;
import org.gcube.portlets.user.geoportaldataentry.client.events.ActionOnItemEventHandler;
@ -40,6 +41,7 @@ import org.gcube.portlets.user.geoportaldataentry.client.ui.GeonaMainTabPanel;
import org.gcube.portlets.user.geoportaldataentry.client.ui.GeonaRecordsPaginatedView;
import org.gcube.portlets.user.geoportaldataentry.client.ui.ModalWindow;
import org.gcube.portlets.user.geoportaldataentry.client.ui.card.GeoNaFormCardModel;
import org.gcube.portlets.user.geoportaldataentry.client.ui.edit.EditModeRecord;
import org.gcube.portlets.user.geoportaldataentry.client.ui.form.GeonaDataEntryMainForm;
import org.gcube.portlets.user.geoportaldataentry.client.ui.report.LifecycleInformationPanel;
import org.gcube.portlets.user.geoportaldataentry.client.ui.report.ReportTemplateToHTML;
@ -232,7 +234,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
@Override
public void onSuccess(GNADataEntryExtConfigProfile gNADataEntryConfig) {
GWT.log(GNADataEntryExtConfigProfile.class.getSimpleName() + " loaded: " + gNADataEntryConfig);
try {
RootPanel.get(DIV_PORTLET_ID).remove(loaderApplication);
} catch (Exception e) {
@ -261,7 +263,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
mainTabPanel.removeTab(0);
// activating Tab "List of Project"
mainTabPanel.setTabActive(0);
//mainTabPanel.instanceAndShowListOfProjects();
// mainTabPanel.instanceAndShowListOfProjects();
}
}
});
@ -316,7 +318,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
}
initDataEntryAppForListUseCaseDescriptors(result);
//After loading of UCD I can instance the "List of Project" view
// After loading of UCD I can instance the "List of Project" view
mainTabPanel.instanceAndShowListOfProjects();
try {
RootPanel.get(DIV_PORTLET_ID).remove(loaderConfigurations);
@ -709,7 +711,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
@Override
public void onClick(ClickEvent event) {
confirm.hide();
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
newProjectEvent.getListGcubeProfiles());
}
@ -732,7 +734,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
@Override
public void onClick(ClickEvent event) {
confirm.hide();
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
newProjectEvent.getListGcubeProfiles());
@ -979,21 +981,22 @@ public class GeoPortalDataEntryApp implements EntryPoint {
break;
}
// case EDIT_PROJECT:
// final Modal modal3 = new Modal(true, true);
// modal3.setTitle(
// "<span style='font-size:20px;'>Edit: <span style='color:#555; font-size:20px;'>"
// + concessione.getNome() + "</span></span>");
// modal3.setWidth(950);
// modal3.setHeight("700px");
// modal3.setCloseVisible(true);
// ((Element) modal3.getElement().getChildNodes().getItem(1))
// .addClassName("modal-body-custom");
// EditModeRecord emr = new EditModeRecord(appManagerBus, concessione,
// RECORD_TYPE.CONCESSIONE);
// modal3.add(emr);
// modal3.show();
// break;
case EDIT_PROJECT: {
final Modal modal3 = new Modal(true, true);
modal3.setTitle(
"<span style='font-size:20px;'>Edit: <span style='color:#555; font-size:20px;'>"
+ resultDocumentDV.getId() + "</span></span>");
modal3.setWidth(950);
modal3.setHeight("700px");
modal3.setCloseVisible(true);
((Element) modal3.getElement().getChildNodes().getItem(1))
.addClassName("modal-body-custom");
EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV,
RECORD_TYPE.CONCESSIONE);
modal3.add(emr);
modal3.show();
break;
}
// case UPDATED_PROJECT:
// appManagerBus.fireEvent(new GetListOfRecordsEvent(RECORD_TYPE.CONCESSIONE,
@ -1034,8 +1037,11 @@ public class GeoPortalDataEntryApp implements EntryPoint {
public void onFailure(Throwable caught) {
hp.clear();
modal.setTitle("Error");
Alert alert = new Alert("Sorry, I cannot delete the Project with id '"
+ resultDocumentDV.getId() + "' Refresh an try again. Error: "+caught.getMessage(),
Alert alert = new Alert(
"Sorry, I cannot delete the Project with id '"
+ resultDocumentDV.getId()
+ "' Refresh an try again. Error: "
+ caught.getMessage(),
AlertType.ERROR);
alert.setClose(false);
hp.add(alert);
@ -1056,10 +1062,12 @@ public class GeoPortalDataEntryApp implements EntryPoint {
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, null,
resultDocumentDV.getProfileID(),
mainTabPanel.getCurrentSearchingFilter(), false));
}else {
} else {
modal.setTitle("Error");
Alert alert = new Alert("Sorry, I cannot delete the Project with id '"
+ resultDocumentDV.getId() + "' Refresh an try again",
Alert alert = new Alert(
"Sorry, I cannot delete the Project with id '"
+ resultDocumentDV.getId()
+ "' Refresh an try again",
AlertType.ERROR);
alert.setClose(false);
hp.add(alert);

View File

@ -51,7 +51,7 @@ public interface GeoportalDataEntryService extends RemoteService {
/**
* Gets the links for.
*
* @param itemId the item id
* @param itemId the item id
* @param profileID the profile ID
* @return the links for
* @throws Exception the exception
@ -75,12 +75,12 @@ public interface GeoportalDataEntryService extends RemoteService {
/**
* Gets the JSON record.
*
* @param itemId the item id
* @param recordType the record type
* @param profileID the profile ID
* @param projectID the project ID
* @return the JSON record
* @throws Exception the exception
*/
String getJSONRecord(String itemId, RECORD_TYPE recordType) throws Exception;
String getJSONDocumentInTheProject(String profileID, String projectID) throws Exception;
/**
* Update record.
@ -153,7 +153,6 @@ public interface GeoportalDataEntryService extends RemoteService {
*/
LifecycleInformationDV getLifecycleInfoForProjectId(String profileID, String projectID) throws Exception;
/**
* Delete project.
*

View File

@ -59,7 +59,7 @@ public interface GeoportalDataEntryServiceAsync {
void deleteProject(String profileID, String projectID, AsyncCallback<Boolean> callback);
void getJSONRecord(String itemId, RECORD_TYPE recordType, AsyncCallback<String> callback);
void getJSONDocumentInTheProject(String profileID, String projectID, AsyncCallback<String> callback);
void updateRecord(String itemId, String jsonUpdate, RECORD_TYPE recordType, AsyncCallback<ConcessioneDV> callback);

View File

@ -545,7 +545,7 @@ public class GeonaMainTabPanel extends Composite {
for (ItemFieldDV recordField : cacheSearchingFilterParameters.getSearchByFields()) {
if (recordField.getDisplayName().equals(alertSearchFor.getText())) {
searchForField = recordField.getProjection() + "." + recordField.getJsonFields().get(0);
searchForField = recordField.getJsonFields().get(0);
continue;
}
}

View File

@ -1,8 +1,9 @@
package org.gcube.portlets.user.geoportaldataentry.client.ui.edit;
import org.gcube.application.geoportalcommon.shared.geoportal.DocumentDV;
import org.gcube.application.geoportalcommon.shared.products.BaseConcessioneDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp.RECORD_TYPE;
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalDataEntryApp;
import org.gcube.portlets.user.geoportaldataentry.client.events.ActionPerformedOnItemEvent;
import org.gcube.portlets.user.geoportaldataentry.client.events.ActionPerformedOnItemEventHandler;
import org.gcube.portlets.user.geoportaldataentry.client.ui.edit.jseditor.JSONEditorWrapper;
@ -11,13 +12,18 @@ import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.Tab;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Style.Visibility;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Random;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
@ -49,7 +55,7 @@ public class EditModeRecord extends Composite {
@UiField
Button buttonJSONUpdate;
private BaseConcessioneDV selectedConcessione;
private ResultDocumentDV selectedProject;
private RECORD_TYPE recordType;
@ -69,45 +75,41 @@ public class EditModeRecord extends Composite {
interface EditModeRecordUiBinder extends UiBinder<Widget, EditModeRecord> {
}
/**
* Instantiates a new edits the mode record.
*
* @param appManagerBus the app manager bus
* @param selectedConcessione the selected concessione
* @param type the type
*/
public EditModeRecord(HandlerManager appManagerBus, BaseConcessioneDV selectedConcessione, RECORD_TYPE type) {
public EditModeRecord(HandlerManager appManagerBus, ResultDocumentDV selectedProject, RECORD_TYPE type) {
initWidget(uiBinder.createAndBindUi(this));
this.selectedConcessione = selectedConcessione;
this.selectedProject = selectedProject;
this.recordType = type;
this.appManagerBus = appManagerBus;
this.filesUpdatePanel.setHeight("490px");
// filesUpdatePanel.getElement().getStyle().setProperty("maxHeight", "550px");
//TODO Must be instanceUpdateFilesetEditor
tabUploadFiles.asWidget().getElement().getStyle().setVisibility(Visibility.HIDDEN);
instanceJSONEditor();
instanceUpdateFilesetEditor();
bindEvents();
}
private void instanceUpdateFilesetEditor() {
Window.alert("instanceJSONEditor must be revisited");
//Window.alert("instanceUpdateFilesetEditor must be revisited");
/*
GeoPortalDataEntryApp.geoportalDataEntryService.readFileSetPaths(new AsyncCallback<FileSetPathsDV>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(FileSetPathsDV fileSetPaths) {
UpdateFileset updateFileset = new UpdateFileset(editorManagerBus, selectedConcessione, recordType,
fileSetPaths.getFileSetPaths());
filesUpdatePanel.add(updateFileset);
}
});*/
* GeoPortalDataEntryApp.geoportalDataEntryService.readFileSetPaths(new
* AsyncCallback<FileSetPathsDV>() {
*
* @Override public void onFailure(Throwable caught) { // TODO Auto-generated
* method stub
*
* }
*
* @Override public void onSuccess(FileSetPathsDV fileSetPaths) { UpdateFileset
* updateFileset = new UpdateFileset(editorManagerBus, selectedProject,
* recordType, fileSetPaths.getFileSetPaths());
* filesUpdatePanel.add(updateFileset); } });
*/
}
@ -118,37 +120,40 @@ public class EditModeRecord extends Composite {
fp.getElement().setId("jsoneditor" + Random.nextInt());
fp.setHeight("410px");
rawUpdatePanel.add(fp);
Window.alert("instanceJSONEditor must be revisited");
/*
GeoPortalDataEntryApp.geoportalDataEntryService.getJSONRecord(selectedConcessione.getItemId(), recordType,
new AsyncCallback<String>() {
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
public void execute() {
@Override
public void onSuccess(String jsonData) {
GWT.log("Instance JSON Editor with: " + jsonData);
jsEditor = JSONEditorWrapper.init(fp.getElement().getId());
jsEditor.setName(selectedConcessione.getNome());
jsEditor.set(jsonData);
new Timer() {
GeoPortalDataEntryApp.geoportalDataEntryService.getJSONDocumentInTheProject(
selectedProject.getProfileID(), selectedProject.getId(), new AsyncCallback<String>() {
@Override
public void run() {
jsEditor.setMode("tree");
public void onSuccess(String jsonData) {
GWT.log("Instance JSON Editor with: " + jsonData);
jsEditor = JSONEditorWrapper.init(fp.getElement().getId());
jsEditor.setName(selectedProject.getId());
jsEditor.set(jsonData);
new Timer() {
@Override
public void run() {
jsEditor.setMode("tree");
}
}.schedule(200);
}
}.schedule(200);
}
@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
}
});
};
});
}
});*/
}
/**
@ -164,53 +169,44 @@ public class EditModeRecord extends Composite {
buttonJSONUpdate.setEnabled(false);
final LoaderIcon loader = new LoaderIcon("Updating the project...");
tabRawUpdate.add(loader);
Window.alert("buttonJSONUpdate addClickHandler must be revisited");
/*
GeoPortalDataEntryApp.geoportalDataEntryService.updateRecord(selectedConcessione.getItemId(),
jsEditor.getText(), recordType, new AsyncCallback<ConcessioneDV>() {
@Override
public void onFailure(Throwable caught) {
buttonJSONUpdate.setEnabled(true);
try {
rawUpdatePanel.getElement().removeClassName("disable-div");
tabRawUpdate.remove(loader);
} catch (Exception e) {
// TODO: handle exception
}
Window.alert("buttonJSONUpdate must be revisited");
editorManagerBus.fireEvent(new
ActionPerformedOnItemEvent<ConcessioneDV>(null,
ACTION_PERFORMED_ON_ITEM.UPDATED_PROJECT));
}
@Override
public void onSuccess(ConcessioneDV result) {
buttonJSONUpdate.setEnabled(true);
try {
rawUpdatePanel.getElement().removeClassName("disable-div");
tabRawUpdate.remove(loader);
} catch (Exception e) {
// TODO: handle exception
}
DialogInform di = new DialogInform(null, "Project updated!",
"Project '" + result.getNome() + "' updated correctly");
di.setZIndex(100000);
di.center();
Window.alert("buttonJSONUpdate ConcessioneDV must be revisited");
editorManagerBus.fireEvent(new ActionPerformedOnItemEvent<ConcessioneDV>(
Arrays.asList(result), ACTION_PERFORMED_ON_ITEM.UPDATED_PROJECT));
}
});*/
* GeoPortalDataEntryApp.geoportalDataEntryService.updateRecord(selectedProject.
* getItemId(), jsEditor.getText(), recordType, new
* AsyncCallback<ConcessioneDV>() {
*
* @Override public void onFailure(Throwable caught) {
* buttonJSONUpdate.setEnabled(true); try {
* rawUpdatePanel.getElement().removeClassName("disable-div");
* tabRawUpdate.remove(loader); } catch (Exception e) { // TODO: handle
* exception }
*
* Window.alert("buttonJSONUpdate must be revisited");
*
* editorManagerBus.fireEvent(new
* ActionPerformedOnItemEvent<ConcessioneDV>(null,
* ACTION_PERFORMED_ON_ITEM.UPDATED_PROJECT));
*
*
* }
*
* @Override public void onSuccess(ConcessioneDV result) {
* buttonJSONUpdate.setEnabled(true); try {
* rawUpdatePanel.getElement().removeClassName("disable-div");
* tabRawUpdate.remove(loader); } catch (Exception e) { // TODO: handle
* exception }
*
* DialogInform di = new DialogInform(null, "Project updated!", "Project '" +
* result.getNome() + "' updated correctly"); di.setZIndex(100000); di.center();
*
* Window.alert("buttonJSONUpdate ConcessioneDV must be revisited");
*
* editorManagerBus.fireEvent(new ActionPerformedOnItemEvent<ConcessioneDV>(
* Arrays.asList(result), ACTION_PERFORMED_ON_ITEM.UPDATED_PROJECT));
*
* } });
*/
}
});
@ -227,7 +223,7 @@ public class EditModeRecord extends Composite {
* ACTION_PERFORMED_ON_ITEM action = actionPerformedOnItemEvent.getAction();
* List<T> items = actionPerformedOnItemEvent.getSelectItems();
*
* if (items != null) { selectedConcessione = (BaseConcessioneDV) items.get(0);
* if (items != null) { selectedProject = (BaseConcessioneDV) items.get(0);
* instanceJSONEditor();
*
* if (action.equals(ACTION_PERFORMED_ON_ITEM.UPDATED_PROJECT)) {

View File

@ -95,7 +95,7 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
int i = 0;
for (ItemFieldDV itemField : displayFields) {
if (i > ConstantsGeoPortalDataEntryApp.MAX_COLUMN_DISPLAYED_IN_THE_TABLE) {
break;
}
@ -112,7 +112,9 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
DocumentDV documentDV = (DocumentDV) object;
try {
return documentDV.getDocumentAsMap().get(itemField.getJsonFields().get(0)).toString();
//removing the '_theDocument.' prefix for searching in the Document Map
String key = itemField.getJsonFields().get(0).replace(ConstantsGeoPortalDataEntryApp.DEFAULT_DOCUMENT_PROJECTION_NAME+".", "");
return documentDV.getDocumentAsMap().get(key).toString();
} catch (Exception e) {
GWT.log("Error e: " + e);
}
@ -245,10 +247,10 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
};
sortedCellTable.addColumn(colPublisher, "Publisher", true);
sortedCellTable.addColumn(colPublisher, "Created by", true);
// COL PUBLICATION PHASE/STATUS
TextColumn<T> colPublicationPhaseStatus = new TextColumn<T>() {
// COL PUBLICATION PHASE
TextColumn<T> colPublicationPhase = new TextColumn<T>() {
@Override
public String getValue(T object) {
@ -262,6 +264,22 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
} catch (Exception e) {
// TODO: handle exception
}
return phase;
}
};
sortedCellTable.addColumn(colPublicationPhase, "Phase", true);
// COL OPERTION STATUS
TextColumn<T> colOperationStatus = new TextColumn<T>() {
@Override
public String getValue(T object) {
if (object == null)
return "";
ResultDocumentDV documentDV = (ResultDocumentDV) object;
String status = "N.A.";
try {
status = documentDV.getLifecycleInfo().getLastOperationStatus().toString();
@ -269,17 +287,17 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
// TODO: handle exception
}
return phase + " / " + status;
return status;
}
@Override
public void render(com.google.gwt.cell.client.Cell.Context context, T object, SafeHtmlBuilder sb) {
if (object == null)
return;
ResultDocumentDV documentDV = (ResultDocumentDV) object;
Status status = null;
try {
try {
status = documentDV.getLifecycleInfo().getLastOperationStatus();
} catch (Exception e) {
@ -301,7 +319,7 @@ public class ItemsTable<T extends DocumentDV> extends AbstractItemsCellTable<T>
};
sortedCellTable.addColumn(colPublicationPhaseStatus, "Publ. Phase / Status", true);
sortedCellTable.addColumn(colOperationStatus, "Status", true);
}

View File

@ -486,7 +486,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
SessionUtil.getCurrentContext(getThreadLocalRequest(), true);
client.deleteProject(profileID, projectID, false);
//Updating count of Documents in session per profileID
// Updating count of Documents in session per profileID
Integer totalProjectForProfile = client.getTotalDocument(profileID);
SessionUtil.setTotalDocumentForProfileID(getThreadLocalRequest(), profileID, totalProjectForProfile);
return true;
@ -537,35 +537,34 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
}
/**
* Gets the JSON record.
* Gets the JSON document in the project.
*
* @param itemId the item id
* @param recordType the record type
* @return the JSON record representing the itemId
* @param profileID the profile ID
* @param projectID the project ID
* @return the JSON document in the project
* @throws Exception the exception
*/
@Override
public String getJSONRecord(String itemId, RECORD_TYPE recordType) throws Exception {
LOG.info("getJSONRecord called with itemId: " + itemId + ", recordType: " + recordType);
public String getJSONDocumentInTheProject(String profileID, String projectID) throws Exception {
LOG.info("getJSONDocumentInTheProject called with profileID: " + profileID + ", projectID: " + projectID);
try {
if (itemId == null)
throw new Exception("Item id is null");
if (projectID == null)
throw new Exception("projectID is null");
if (recordType.equals(RECORD_TYPE.CONCESSIONE)) {
SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
MongoServiceUtil serviceUtil = new MongoServiceUtil();
MongoConcessioni clientMongo = serviceUtil.getInstanceMongoConcessioni();
Concessione concessione = clientMongo.getById(itemId);
return serviceUtil.toJSON(concessione);
}
if (profileID == null)
throw new Exception("profileID is null");
return null;
ProjectsCaller client = GeoportalClientCaller.projects();
SessionUtil.getCurrentContext(getThreadLocalRequest(), true);
Project project = client.getProjectByID(profileID, projectID);
return project.getTheDocument().toJson();
} catch (Exception e) {
LOG.error("Error on reading the JSON project with item id: " + itemId, e);
throw new Exception(
"Error occurred on reading the JSON project with id: " + itemId + ". Error: " + e.getMessage());
LOG.error("Error occurred on reading the JSON document in the project with ID: " + projectID, e);
throw new Exception("Error occurred on reading the JSON document in the project with ID: " + projectID
+ ". Error: " + e.getMessage());
}
}
@ -746,7 +745,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
// DEV MODE
if (!SessionUtil.isIntoPortal()) {
LOG.warn("OUT OF PORTAL - DEV MODE detected");
GcubeUserRole myRole = GcubeUserRole.DATA_MEMBER;
GcubeUserRole myRole = GcubeUserRole.DATA_MANAGER;
for (RoleRights roleRight : listUserRightsForRole) {
if (roleRight.getUserRole().equals(myRole)) {

View File

@ -70,7 +70,7 @@ h1 {
overflow: hidden !important;
}
.table-glor td:nth-last-child(-n+3) {
.table-glor td:nth-last-child(-n+4) {
background-color: #d9edf7 !important;
}