diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index d1342ab..c915f15 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -167,9 +167,6 @@
-
- uses
-
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60c9c15..4253ce4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,9 +4,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [v3.0.0-SNAPSHOT] - 2022-10-11
+## [v3.0.0-SNAPSHOT] - 2022-11-09
-- [#23940] Passed to CMS-UCD
+- [#23940] Passed to CMS-UCD
+- [#23941] Implemented and integrated the DTO Project/Document per UCD config and gCube Metadata Profiles
+- [#23953] Passed the 'Search facility' to CMS-UCD model
+- [#23954] Passed the 'Details Panel facility' to CMS-UCD model
+- [#23955] Implemented the Temporal facility to navigate temporal relations among (JSON) Projects
+- [#24028] Passed the spatial dimension to CMS-Project model
## [v2.4.1-SNAPSHOT] - 2022-09-28
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java
index 9315cbd..f6fbad2 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java
@@ -10,8 +10,6 @@ import org.gcube.application.geoportalcommon.shared.SearchingFilter;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDIViewerLayerDV;
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
-import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
-import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
import org.gcube.portlets.user.geoportaldataviewer.shared.ItemFieldsResponse;
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
@@ -51,20 +49,11 @@ public interface GeoportalDataViewerService extends RemoteService {
* @param maxWFSFeature the max WFS feature
* @param zoomLevel the zoom level
* @return the data result
- * @throws Exception
+ * @throws Exception
*/
List getDataResult(List layerObjects, String mapSrsName, BoundsMap mapBBOX,
int maxWFSFeature, double zoomLevel) throws Exception;
- /**
- * Gets the concessione for id.
- *
- * @param mongoId the mongo id
- * @return the concessione for id
- * @throws Exception the exception
- */
- ConcessioneDV getConcessioneForId(String mongoId) throws Exception;
-
/**
* Gets the my login.
*
@@ -89,16 +78,16 @@ public interface GeoportalDataViewerService extends RemoteService {
*/
GNADataViewerConfigProfile getGeoNaDataViewProfile() throws Exception;
- /**
- * Gets the uploaded images for id.
- *
- * @param itemType the item type
- * @param itemId the item id
- * @param maxImages the max images
- * @return the uploaded images for id
- * @throws Exception the exception
- */
- List getUploadedImagesForId(String itemType, String itemId, Integer maxImages) throws Exception;
+// /**
+// * Gets the uploaded images for id.
+// *
+// * @param itemType the item type
+// * @param itemId the item id
+// * @param maxImages the max images
+// * @return the uploaded images for id
+// * @throws Exception the exception
+// */
+// List getUploadedImagesForId(String itemType, String itemId, Integer maxImages) throws Exception;
/**
* Gets the public links for.
@@ -147,19 +136,6 @@ public interface GeoportalDataViewerService extends RemoteService {
*/
List getConfigListOfFieldsForSearching() throws Exception;
-// /**
-// * Gets the list concessioni.
-// *
-// * @param start the start
-// * @param limit the limit
-// * @param filter the filter
-// * @param reloadFromService the reload from service
-// * @return the list concessioni
-// * @throws Exception the exception
-// */
-// ResultSetPaginatedData getListConcessioni(Integer start, Integer limit, SearchingFilter filter,
-// boolean reloadFromService) throws Exception;
-
/**
* Gets the project view for id.
*
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java
index f99b18b..f3d1a9e 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java
@@ -10,8 +10,6 @@ import org.gcube.application.geoportalcommon.shared.SearchingFilter;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDIViewerLayerDV;
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
-import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
-import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaSpatialQueryResult;
import org.gcube.portlets.user.geoportaldataviewer.shared.ItemFieldsResponse;
import org.gcube.portlets.user.geoportaldataviewer.shared.ViewerConfiguration;
@@ -46,20 +44,16 @@ public interface GeoportalDataViewerServiceAsync {
void getDataResult(List layerObjects, String mapSrsName, BoundsMap mapBBOX, int maxWFSFeature,
double zoomLevel, AsyncCallback> callback);
- void getConcessioneForId(String mongoId, AsyncCallback callback);
-
void getMyLogin(AsyncCallback callback);
void getLayerForType(String layerType, AsyncCallback callback);
void getGeoNaDataViewProfile(AsyncCallback callback);
- void getUploadedImagesForId(String itemType, String itemId, Integer maxImages,
- AsyncCallback> callback);
-
void getPublicLinksFor(GeoportalItemReferences item, AsyncCallback asyncCallback);
- void getLayersForId(String theProfileID, String theProductID, AsyncCallback> asyncCallback);
+ void getLayersForId(String theProfileID, String theProductID,
+ AsyncCallback> asyncCallback);
void getWFSFeatures(List layerObjects, String mapSrsName, BoundsMap selectBBOX, int maxWFSFeature,
double zoomLevel, AsyncCallback> callback);
@@ -68,9 +62,6 @@ public interface GeoportalDataViewerServiceAsync {
void getConfigListOfFieldsForSearching(AsyncCallback> callback);
-// void getListConcessioni(Integer start, Integer limit, SearchingFilter filter, boolean reloadFromService,
-// AsyncCallback callback);
-
void getProjectViewForId(String profileID, String projectID, AsyncCallback callback);
void getListProjects(String theProfileID, Integer start, Integer limit, SearchingFilter filter,
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ImageView.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ImageView.java
deleted file mode 100644
index 237fbea..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ImageView.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.gcube.portlets.user.geoportaldataviewer.client.ui.images;
-
-import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV;
-import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
-import org.gcube.portlets.user.geoportaldataviewer.client.ui.ModalWindow;
-import org.gcube.portlets.user.geoportaldataviewer.client.util.NewBrowserWindow;
-import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
-
-import com.github.gwtbootstrap.client.ui.Button;
-import com.github.gwtbootstrap.client.ui.Heading;
-import com.github.gwtbootstrap.client.ui.Image;
-import com.github.gwtbootstrap.client.ui.Paragraph;
-import com.github.gwtbootstrap.client.ui.constants.ButtonType;
-import com.github.gwtbootstrap.client.ui.constants.IconType;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Style.TextAlign;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Widget;
-
-public class ImageView extends Composite {
-
- private static ImageViewUiBinder uiBinder = GWT.create(ImageViewUiBinder.class);
-
- interface ImageViewUiBinder extends UiBinder {
- }
-
- public ImageView() {
- initWidget(uiBinder.createAndBindUi(this));
- }
-
- @UiField
- Image imageURL;
-
- @UiField
- Heading heading;
-
- @UiField
- Paragraph paragraph1;
-
- @UiField
- Paragraph paragraph2;
-
- @UiField
- Button openImage;
-
- @UiField
- Button viewImage;
-
- private WorkspaceContentDV latest;
-
-
- public ImageView(UploadedImageDV imageDV, final boolean showView, final boolean showOpen) {
- initWidget(uiBinder.createAndBindUi(this));
-
- if(imageDV.getTitolo()!=null && !imageDV.getTitolo().isEmpty()) {
- heading.setText(imageDV.getTitolo());
- }
- paragraph1.setText(imageDV.getDidascalia());
- paragraph1.getElement().getStyle().setTextAlign(TextAlign.LEFT);
-
- if(!showView && imageDV.getLicenseID()!=null) {
- paragraph2.setVisible(true);
- paragraph2.setText("ID Licenza: "+imageDV.getLicenseID());
- }
-
- if(imageDV.getListWsContent()!=null && imageDV.getListWsContent().size()>0) {
- latest = imageDV.getListWsContent().get(imageDV.getListWsContent().size()-1);
- openImage.setVisible(true);
- viewImage.setVisible(true);
- imageURL.setVisible(true);
- imageURL.setUrl(latest.getLink());
- }
-
- openImage.setType(ButtonType.LINK);
- openImage.setIcon(IconType.EXTERNAL_LINK);
- openImage.setTitle("Open Image in New Browser Window");
- openImage.setVisible(showOpen);
-
- openImage.addClickHandler(new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
-
- if(latest!=null) {
- NewBrowserWindow.open(latest.getLink()+"?content-disposition=inline", "_blank", null);
- }
- }
- });
-
- viewImage.setVisible(false);
- viewImage.setType(ButtonType.LINK);
- viewImage.setIcon(IconType.EXPAND);
- viewImage.setTitle("View Image in New Dialog");
- viewImage.setVisible(showView);
-
-
- viewImage.addClickHandler(new ClickHandler() {
-
- @Override
- public void onClick(ClickEvent event) {
-
- if(latest!=null) {
-
- ModalWindow mw = new ModalWindow(StringUtil.ellipsize(imageDV.getDidascalia(), 50), 900, 600);
- mw.add(new ImageView(imageDV, false, true));
- mw.setCaller(ImageView.this);
- //mw.setWidth(900);
- mw.show();
- }
-
- }
- });
- }
-
-
- /**
- * Sets the heading.
- *
- * @param title the new heading
- */
- protected void setHeading(String title) {
- heading.setText(title);
- }
-
- protected void setParagraph(String text) {
- paragraph1.setText(text);
- }
-
-}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ImageView.ui.xml b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ImageView.ui.xml
deleted file mode 100644
index a28f0c2..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ImageView.ui.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- .max-width-400 {
- max-width: 400px;
- }
-
- .float-right {
- float: right;
- }
-
- .margin-top-10 {
- margin-top: 10px;
- }
-
-
-
- View
- Open
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ThumbnailImageView.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ThumbnailImageView.java
deleted file mode 100644
index 1ccd877..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ThumbnailImageView.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.gcube.portlets.user.geoportaldataviewer.client.ui.images;
-
-import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
-import org.gcube.portlets.user.geoportaldataviewer.client.util.StringUtil;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-
-/**
- * The Class ThumbnailImageView.
- *
- * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
- *
- * Nov 20, 2020
- */
-public class ThumbnailImageView extends Composite {
-
- private static ThumbnailImageViewUiBinder uiBinder = GWT.create(ThumbnailImageViewUiBinder.class);
-
- @UiField
- HTMLPanel thumbnailContainer;
- /**
- * The Interface ThumbnailImageViewUiBinder.
- *
- * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
- *
- * Nov 20, 2020
- */
- interface ThumbnailImageViewUiBinder extends UiBinder {
- }
-
- /**
- * Instantiates a new thumbnail image view.
- *
- * @param imageDV the image DV
- * @param showView the show view
- * @param showOpen the show open
- */
- public ThumbnailImageView(UploadedImageDV imageDV, final boolean showView, final boolean showOpen) {
- initWidget(uiBinder.createAndBindUi(this));
-
- ImageView imageView = new ImageView(imageDV, showView, showOpen);
- String title = StringUtil.ellipsize(imageDV.getTitolo(), 25);
- imageView.setHeading(title);
-
- String didascalia = StringUtil.ellipsize(imageDV.getDidascalia(), 50);
- imageView.setParagraph(didascalia);
-
-// imageView.setViewImageVisible(true);
-
- thumbnailContainer.add(imageView);
-
- }
-
-
-}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ThumbnailImageView.ui.xml b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ThumbnailImageView.ui.xml
deleted file mode 100644
index 5e5cd07..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/images/ThumbnailImageView.ui.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- .max-width-400 {
- max-width: 400px;
- }
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/RecordView.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/RecordView.java
deleted file mode 100644
index 92765fe..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/RecordView.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.gcube.portlets.user.geoportaldataviewer.client.ui.products;
-
-import org.gcube.application.geoportalcommon.shared.products.model.RecordDV;
-import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
-import org.gcube.portlets.user.geoportaldataviewer.client.ui.util.CustomFlexTable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Style.Unit;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-public class RecordView extends Composite {
-
- private static RecordViewUiBinder uiBinder = GWT.create(RecordViewUiBinder.class);
-
- interface RecordViewUiBinder extends UiBinder {
- }
-
- @UiField
- HTMLPanel recordDVPanel;
-
- private CustomFlexTable customTable = new CustomFlexTable();
-
- public RecordView() {
- initWidget(uiBinder.createAndBindUi(this));
- }
-
- public RecordView(RecordDV record) {
- initWidget(uiBinder.createAndBindUi(this));
-
- customTable.addNextKeyValue("Created", GeoportalDataViewerConstants.DT_FORMAT.format(record.getCreationTime()));
- customTable.addNextKeyValue("Last Updated", GeoportalDataViewerConstants.DT_FORMAT.format(record.getLastUpdateTime()));
- customTable.addNextKeyValue("Updated by", record.getLastUpdateUser());
- recordDVPanel.add(customTable);
- }
-
- public void addLabel(FlowPanel w, String labelValue){
- com.google.gwt.user.client.ui.Label label = new com.google.gwt.user.client.ui.Label(labelValue);
- label.getElement().getStyle().setMarginRight(5, Unit.PX);
- w.add(label);
- }
-
-
-
-
-}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/RecordView.ui.xml b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/RecordView.ui.xml
deleted file mode 100644
index 01f5816..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/ui/products/RecordView.ui.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/util/OGCUtils.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/util/OGCUtils.java
deleted file mode 100644
index 054d74e..0000000
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/util/OGCUtils.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.gcube.portlets.user.geoportaldataviewer.client.util;
-
-import org.gcube.application.geoportalcommon.shared.products.model.RecordDV;
-
-import com.google.gwt.core.client.GWT;
-
-public class OGCUtils {
-
- public static void performWFSQueryOnCentroid(RecordDV record) {
- GWT.log("WFS Query for : "+record);
-
- if (record != null) {
-// GWT.log("record instanceof ConcessioneDV: " + (record instanceof ConcessioneDV) + " with mongo item id: "
-// + record.getItemId());
- // GeoportalDataViewerConstants.print("record instanceof ConcessioneDV: "
- // +(record instanceof ConcessioneDV));
-// if (record instanceof ConcessioneDV) {
-// ConcessioneDV concessioneDV = (ConcessioneDV) record;
-// Double x = concessioneDV.getCentroidLong();
-// Double y = concessioneDV.getCentroidLat();
-// GWT.log("X: " + x + ", Y:" + y);
-// if (x != null && y != null) {
-// Coordinate transfCoord = MapUtils.transformCoordiante(new Coordinate(x, y),
-// GeoportalDataViewerConstants.MAP_PROJECTION.EPSG_4326.getName(), GeoportalDataViewerConstants.MAP_PROJECTION.EPSG_3857.getName());
-// GeoQuery select = olMapMng.toDataPointQuery(transfCoord, false);
-// GWT.log("GeoQuery: " + select);
-// // GeoportalDataViewerConstants.print("fireEvent QueryDataEvent");
-// ExtentWrapped toExt = new ExtentWrapped(transfCoord.getX(), transfCoord.getY(), transfCoord.getX(),
-// transfCoord.getY());
-// layerManager.getLayerManagerBus().fireEvent(new QueryDataEvent(select, toExt, record.getItemId(),
-// true, GeoportalDataViewerConstants.MapEventType.ADDED_CENTROID_LAYER_TO_MAP));
-// } else {
-// GeoportalDataViewerConstants.printJs(
-// "I cannot select the point one or both coordiantes are null. X: " + x + ", Y:" + y);
-// }
-// }
- }
- }
-
-
-
-
-}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GcubeProfilesPerUCDIdCache.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GcubeProfilesPerUCDIdCache.java
index b08232a..524a69f 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GcubeProfilesPerUCDIdCache.java
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GcubeProfilesPerUCDIdCache.java
@@ -62,7 +62,7 @@ public class GcubeProfilesPerUCDIdCache {
};
gCubeProfilesPerProfileIDCache = CacheBuilder.newBuilder().maximumSize(1000)
- .expireAfterWrite(15, TimeUnit.MINUTES).removalListener(removalListener).build(loader);
+ .expireAfterWrite(30, TimeUnit.MINUTES).removalListener(removalListener).build(loader);
LOG.info("cache instancied");
}
diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java
index 535a25a..d493dd4 100644
--- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java
@@ -52,8 +52,6 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclara
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
import org.gcube.application.geoportalcommon.shared.gis.BoundsMap;
-import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
-import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV;
import org.gcube.application.geoportalcommon.util.URLParserUtil;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerService;
@@ -241,125 +239,6 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
}
}
- /**
- * Gets the uploaded images for id.
- *
- * @param itemType the item type
- * @param itemId the item id. It is the mongoId
- * @param maxImages the max images
- * @return the uploaded images for id
- * @throws Exception the exception
- */
- @Override
- public List getUploadedImagesForId(String itemType, String itemId, Integer maxImages)
- throws Exception {
- LOG.info("getUploadedImagesForId [itemId: " + itemId + ", itemType: " + itemType + "] called");
-
- throw new Exception("getUploadedImagesForId must be removed!");
- }
-
- /**
- * Gets the concessione for id.
- *
- * @param mongoId the mongo id
- * @return the concessione for id
- * @throws Exception the exception
- */
- @Override
- public ConcessioneDV getConcessioneForId(String mongoId) throws Exception {
- LOG.info("getConcessioneForId " + mongoId + " called");
-
- throw new Exception("getConcessioneForId must be removed!");
- /*
- * ConcessioneDV concessionDV = null;
- *
- * if (mongoId == null) throw new
- * Exception("Invalid parameter. The itemId is null");
- *
- * try { LOG.info("Trying to get record for id " + mongoId);
- *
- * GeoportalServiceIdentityProxy cms = new
- * GeoportalServiceIdentityProxy(this.getThreadLocalRequest()); Concessione
- * concessione = cms.getItemById(mongoId);
- *
- * LOG.info("Got concessione for mongoId: " + mongoId); if (concessione != null)
- * { concessionDV = ConvertToDataViewModel.toConcessione(concessione);
- *
- * String userName = null; try { userName =
- * SessionUtil.getCurrentUser(this.getThreadLocalRequest()).getUsername();
- *
- * } catch (Exception e) {
- * LOG.info("User not found in session, so going to apply the acess policies");
- * }
- *
- * // TODO THIS IS A WORKAROUND WAITING FOR ADOPTING OF USER ROLES. AT THE
- * MOMENT, // A USER AUTHENTICATED CAN ACCESS EVERYTHING // I CAN CHECK THE
- * ACCCESS POLICIES IF AND ONLY IF THE USER IS NOT LOGGED IN. if (userName ==
- * null) {
- *
- * // CHECKING ACCESS POLICY
- * LOG.info("Applying access policies for concessione " + mongoId +
- * " returned by service"); LayerConcessioneDV layerPosizionamento =
- * concessionDV.getPosizionamentoScavo(); if (layerPosizionamento != null) { if
- * (!GeoNACheckAccessPolicy.isAccessible(layerPosizionamento.getPolicy(),
- * userName)) { concessionDV.setPosizionamentoScavo(null);
- * LOG.info("Posizionamento di Scavo is not accessible by current user: " +
- * userName); } }
- *
- * List listLayersDV = concessionDV.getPianteFineScavo(); if
- * (listLayersDV != null) { List accessibleListLayersDV =
- * new ArrayList(); for (LayerConcessioneDV layerDV :
- * listLayersDV) { if (GeoNACheckAccessPolicy.isAccessible(layerDV.getPolicy(),
- * userName)) { accessibleListLayersDV.add(layerDV); } else {
- * LOG.info("(Pianta) Layer " + layerDV.getLayerName() +
- * " is not accessible by current user: " + userName); } }
- * concessionDV.setPianteFineScavo(accessibleListLayersDV); }
- *
- * AbstractRelazioneScavoDV abstractRS =
- * concessionDV.getAbstractRelazioneScavo(); if (abstractRS != null) { if
- * (!GeoNACheckAccessPolicy.isAccessible(abstractRS.getPolicy(), userName)) {
- * concessionDV.setAbstractRelazioneScavo(null);
- * LOG.info("Abstract relazione is not accessible by current user: " +
- * userName); } }
- *
- * RelazioneScavoDV relazioneScavo = concessionDV.getRelazioneScavo(); if
- * (relazioneScavo != null) { if
- * (!GeoNACheckAccessPolicy.isAccessible(relazioneScavo.getPolicy(), userName))
- * { concessionDV.setRelazioneScavo(null);
- * LOG.info("Relazione scavo is not accessible by current user: " + userName); }
- * }
- *
- * List immagini = concessionDV.getImmaginiRappresentative();
- * if (immagini != null && immagini.size() > 0) { List
- * accessibleListImages = new ArrayList();
- *
- * // SHOWING ACESSIBLE IMAGES for (UploadedImageDV uploadedImageDV : immagini)
- * {
- *
- * if (GeoNACheckAccessPolicy.isAccessible(uploadedImageDV.getPolicy(),
- * userName)) { accessibleListImages.add(uploadedImageDV); } else {
- * LOG.info("Immagine " + uploadedImageDV.getTitolo() +
- * " is not accessible by current user: " + userName); }
- *
- * } concessionDV.setImmaginiRappresentative(accessibleListImages);
- *
- * }
- *
- * // END CHECKING ACCESS POLICY LOG.info("Access policies applied"); } }
- *
- * if (concessionDV == null) throw new Exception("Concessione with id '" +
- * mongoId + "' not available");
- *
- * LOG.debug("For id " + mongoId + " returning " +
- * ConcessioneDV.class.getSimpleName() + ": " + concessionDV); return
- * concessionDV;
- *
- * } catch (Exception e) { String erroMsg = Concessione.class.getSimpleName() +
- * " with id '" + mongoId + "' not available"; LOG.error(erroMsg, e); throw new
- * Exception(erroMsg); }
- */
- }
-
/**
* Gets the parameters from URL.
*