refactored
This commit is contained in:
parent
a3c10d1b18
commit
9b0d36f232
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
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.geoportal.DocumentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayerDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
|
@ -225,7 +225,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
+ paramGeonaItemID);
|
||||
return;
|
||||
}
|
||||
GeoNaItemRef gir = new GeoNaItemRef(paramGeonaItemID, paramGeonaItemType);
|
||||
GeoportalItemReferences gir = new GeoportalItemReferences(paramGeonaItemID, paramGeonaItemType);
|
||||
applicationBus.fireEvent(new ShowDetailsEvent(gir, null, null));
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.gcube.portlets.user.geoportaldataviewer.client;
|
|||
import java.util.List;
|
||||
|
||||
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.ResultSetPaginatedData;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDIViewerLayerDV;
|
||||
|
@ -105,7 +105,7 @@ public interface GeoportalDataViewerService extends RemoteService {
|
|||
* @return the public links for
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
GeoNaItemRef getPublicLinksFor(GeoNaItemRef item) throws Exception;
|
||||
GeoportalItemReferences getPublicLinksFor(GeoportalItemReferences item) throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the layers for id.
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.gcube.portlets.user.geoportaldataviewer.client;
|
|||
import java.util.List;
|
||||
|
||||
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.ResultSetPaginatedData;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDIViewerLayerDV;
|
||||
|
@ -56,7 +56,7 @@ public interface GeoportalDataViewerServiceAsync {
|
|||
void getUploadedImagesForId(String itemType, String itemId, Integer maxImages,
|
||||
AsyncCallback<List<UploadedImageDV>> callback);
|
||||
|
||||
void getPublicLinksFor(GeoNaItemRef item, AsyncCallback<GeoNaItemRef> asyncCallback);
|
||||
void getPublicLinksFor(GeoportalItemReferences item, AsyncCallback<GeoportalItemReferences> asyncCallback);
|
||||
|
||||
void getLayersForId(String theProfileID, String theProductID, AsyncCallback<List<GCubeSDIViewerLayerDV>> asyncCallback);
|
||||
|
||||
|
|
|
@ -331,7 +331,8 @@ public class LayerManager {
|
|||
List<GCubeSDIViewerLayerDV> result) {
|
||||
|
||||
for (GCubeSDIViewerLayerDV layer : result) {
|
||||
GWT.log("Adding layer: " + layer.getLayerName());
|
||||
GWT.log("Adding layer: "
|
||||
+ layer.getLayerName());
|
||||
addLayer(LayerObjectType.PROJECT_LAYER,
|
||||
layer.getLayerName(),
|
||||
layer.getLayerName(),
|
||||
|
@ -455,10 +456,6 @@ public class LayerManager {
|
|||
GWT.log("Layers management : Add layer " + object);
|
||||
|
||||
switch (object.getType()) {
|
||||
case BASE_LAYER: {
|
||||
GWT.log("ERROR : cannot add base layers ");
|
||||
break;
|
||||
}
|
||||
case GENERIC_LAYER: {
|
||||
GWT.log("SUPPORT TO EXTERNAL LAYERS TO BE IMPLEMENTED");
|
||||
break;
|
||||
|
@ -541,6 +538,15 @@ public class LayerManager {
|
|||
lo.setType(lot);
|
||||
lo.setProjectId(projectID);
|
||||
|
||||
switch (lot) {
|
||||
case INDEX_LAYER:
|
||||
|
||||
break;
|
||||
case PROJECT_LAYER:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
String key = layerItem.getName(); // should be unique //
|
||||
// layerObjects.put(key, lo);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.client.events;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wfs.FeatureRow;
|
||||
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
@ -45,7 +45,7 @@ public class ShowDetailsEvent extends GwtEvent<ShowDetailsEventHandler> {
|
|||
* @param itemName the item name
|
||||
* @param featureRow the feature row
|
||||
*/
|
||||
public ShowDetailsEvent(GeoNaItemRef gir, String itemName, FeatureRow featureRow) {
|
||||
public ShowDetailsEvent(GeoportalItemReferences gir, String itemName, FeatureRow featureRow) {
|
||||
this.layerObjectType = gir.getLayerObjectType();
|
||||
this.profileID = gir.getProfileID();
|
||||
this.projectID = gir.getProjectID();
|
||||
|
@ -122,8 +122,8 @@ public class ShowDetailsEvent extends GwtEvent<ShowDetailsEventHandler> {
|
|||
*
|
||||
* @return the geona item ref
|
||||
*/
|
||||
public GeoNaItemRef getGeonaItemRef() {
|
||||
return new GeoNaItemRef(projectID, profileID, layerObjectType);
|
||||
public GeoportalItemReferences getGeonaItemRef() {
|
||||
return new GeoportalItemReferences(projectID, profileID, layerObjectType);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.client.ui;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.events.ClosedViewDetailsEvent;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.ProjectViewer;
|
||||
|
@ -62,7 +62,7 @@ public class DetailsPanel extends Composite {
|
|||
}
|
||||
|
||||
|
||||
public void showDetailsFor(ProjectView result, GeoNaItemRef geonaItemRef) {
|
||||
public void showDetailsFor(ProjectView result, GeoportalItemReferences geonaItemRef) {
|
||||
this.displayedProject = result;
|
||||
datailsContainerPanel.clear();
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter.ORDER;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
|
||||
|
@ -379,7 +379,7 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
* @param result the result
|
||||
* @param geonaItemRef the geona item ref
|
||||
*/
|
||||
public void showAsDetails(ProjectView result, GeoNaItemRef geonaItemRef) {
|
||||
public void showAsDetails(ProjectView result, GeoportalItemReferences geonaItemRef) {
|
||||
detailsPanel.showDetailsFor(result, geonaItemRef);
|
||||
|
||||
}
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
//
|
||||
// @Override
|
||||
// public void onClick(ClickEvent event) {
|
||||
// GeoNaItemRef gir = new GeoNaItemRef(concessione.getItemId(), GeoportalDataViewerConstants.RECORD_TYPE.CONCESSIONE.toString());
|
||||
// GeoportalItemReferences gir = new GeoportalItemReferences(concessione.getItemId(), GeoportalDataViewerConstants.RECORD_TYPE.CONCESSIONE.toString());
|
||||
// appManagerBus.fireEvent(new ShowDetailsEvent(gir, null, null));
|
||||
// appManagerBus.fireEvent(new ShowPopupOnCentroiEvent(concessione));
|
||||
//
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.RelationshipDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.view.SectionView;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerConstants;
|
||||
|
@ -53,12 +56,15 @@ public class ProjectViewer extends Composite {
|
|||
|
||||
@UiField
|
||||
Button expandButton;
|
||||
|
||||
@UiField
|
||||
Button relationshipsButton;
|
||||
|
||||
private ProjectView theProjectView;
|
||||
|
||||
private CustomFlexTable customTable = new CustomFlexTable();
|
||||
|
||||
private GeoNaItemRef geonaItemRef;
|
||||
private GeoportalItemReferences geoportalItemReferences;
|
||||
|
||||
private String myLogin;
|
||||
|
||||
|
@ -71,16 +77,16 @@ public class ProjectViewer extends Composite {
|
|||
pageViewDetails.getElement().setId("page-view-details");
|
||||
}
|
||||
|
||||
public ProjectViewer(GeoNaItemRef item, ProjectView projectView) {
|
||||
this(item, projectView, true, true);
|
||||
public ProjectViewer(GeoportalItemReferences geoportalItemRefs, ProjectView projectView) {
|
||||
this(geoportalItemRefs, projectView, true, true);
|
||||
}
|
||||
|
||||
public ProjectViewer(GeoNaItemRef item, final ProjectView projectView, boolean viewImageButtonVisible,
|
||||
public ProjectViewer(GeoportalItemReferences geoportalItemRefs, final ProjectView projectView, boolean viewImageButtonVisible,
|
||||
boolean openImageButtonVisible) {
|
||||
this();
|
||||
GWT.log("Rendering " + projectView.getTheProjectDV().getId());
|
||||
this.theProjectView = projectView;
|
||||
this.geonaItemRef = item;
|
||||
this.geoportalItemReferences = geoportalItemRefs;
|
||||
this.viewImageButtonVisible = viewImageButtonVisible;
|
||||
this.openImageButtonVisible = openImageButtonVisible;
|
||||
|
||||
|
@ -98,7 +104,7 @@ public class ProjectViewer extends Composite {
|
|||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
DialogShareableLink dg = new DialogShareableLink(geonaItemRef, null);
|
||||
DialogShareableLink dg = new DialogShareableLink(geoportalItemReferences, null);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -112,7 +118,7 @@ public class ProjectViewer extends Composite {
|
|||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
ProjectViewer cv = new ProjectViewer(geonaItemRef, theProjectView, false, openImageButtonVisible);
|
||||
ProjectViewer cv = new ProjectViewer(geoportalItemReferences, theProjectView, false, openImageButtonVisible);
|
||||
cv.setExpandViewButtonVisible(false);
|
||||
int width = Window.getClientWidth() * 75 / 100;
|
||||
int height = Window.getClientHeight() * 70 / 100;
|
||||
|
@ -124,6 +130,17 @@ public class ProjectViewer extends Composite {
|
|||
|
||||
}
|
||||
});
|
||||
|
||||
relationshipsButton.setType(ButtonType.LINK);
|
||||
relationshipsButton.setIcon(IconType.LINK);
|
||||
relationshipsButton.setTitle("Show Relationships of this Project");
|
||||
|
||||
List<RelationshipDV> relationships = projectView.getTheProjectDV().getRelationships();
|
||||
if(relationships!=null && relationships.size()>0) {
|
||||
relationshipsButton.setVisible(true);
|
||||
}else
|
||||
relationshipsButton.setVisible(false);
|
||||
|
||||
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().getMyLogin(new AsyncCallback<String>() {
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
addStyleNames="{style.margin-bottom-10}">
|
||||
<b:Button ui:field="shareButton">Share</b:Button>
|
||||
<b:Button ui:field="expandButton">Expand</b:Button>
|
||||
<b:Button ui:field="relationshipsButton">Relationships</b:Button>
|
||||
</g:HorizontalPanel>
|
||||
<g:HTMLPanel ui:field="centroidPanel"></g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.client.ui.cms.project.relation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.ResultDocumentDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.RelationshipDV;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.Label;
|
||||
import com.github.gwtbootstrap.client.ui.Modal;
|
||||
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconSize;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||
import com.github.gwtbootstrap.client.ui.constants.LabelType;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
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.Window;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class ViewRelationshipPanel extends Composite {
|
||||
|
||||
private static ViewRelationshipPanelUiBinder uiBinder = GWT.create(ViewRelationshipPanelUiBinder.class);
|
||||
|
||||
interface ViewRelationshipPanelUiBinder extends UiBinder<Widget, ViewRelationshipPanel> {
|
||||
}
|
||||
|
||||
private String profileID;
|
||||
|
||||
@UiField
|
||||
HTMLPanel firstPanelContainer;
|
||||
|
||||
@UiField
|
||||
HTMLPanel panelTitle;
|
||||
|
||||
@UiField
|
||||
HTMLPanel secondPanelContainer;
|
||||
|
||||
@UiField
|
||||
FlowPanel firstProjectPanelContainer;
|
||||
|
||||
@UiField
|
||||
FlowPanel secondProjectPanelContainer;
|
||||
|
||||
@UiField
|
||||
Button closeButton;
|
||||
|
||||
@UiField
|
||||
Button buttonExpand;
|
||||
|
||||
private HashMap<Integer, ResultDocumentDV> selectedProjects = new HashMap<Integer, ResultDocumentDV>(2);
|
||||
|
||||
private HandlerManager appManagerBus;
|
||||
|
||||
private Map<String, ResultDocumentDV> mapOfTargetProjectForId = new HashMap<String, ResultDocumentDV>();
|
||||
|
||||
public ViewRelationshipPanel(HandlerManager appManagerBus, ProjectDV fromProject, boolean showExpand) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
this.appManagerBus = appManagerBus;
|
||||
|
||||
closeButton.setType(ButtonType.LINK);
|
||||
closeButton.setIcon(IconType.REMOVE);
|
||||
closeButton.setIconSize(IconSize.LARGE);
|
||||
|
||||
closeButton.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
buttonExpand.setType(ButtonType.LINK);
|
||||
buttonExpand.setIcon(IconType.EXPAND);
|
||||
buttonExpand.setTitle("Show this view in new Window");
|
||||
buttonExpand.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
Modal mw = new Modal(true, true);
|
||||
mw.setTitle("Relationships");
|
||||
|
||||
int width = 0;
|
||||
try {
|
||||
width = Window.getClientWidth() * 75 / 100;
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
if (width > 500)
|
||||
mw.setWidth(width);
|
||||
|
||||
mw.add(new ViewRelationshipPanel(appManagerBus, fromProject, false));
|
||||
mw.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if (!showExpand) {
|
||||
buttonExpand.setVisible(false);
|
||||
panelTitle.setVisible(false);
|
||||
closeButton.setVisible(false);
|
||||
}
|
||||
|
||||
showRelationsOf(fromProject);
|
||||
}
|
||||
|
||||
public void showRelationsOf(ProjectDV project) {
|
||||
firstProjectPanelContainer.clear();
|
||||
secondProjectPanelContainer.clear();
|
||||
|
||||
Entry<String, Object> firstEntrySet = project.getTheDocument().getFirstEntryOfMap();
|
||||
String htmlMsg = firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b> (id: " + project.getId()
|
||||
+ ")";
|
||||
|
||||
firstProjectPanelContainer.add(new HTML(htmlMsg));
|
||||
|
||||
HTML labelNoRelations = new HTML("No relationship/s found");
|
||||
secondProjectPanelContainer.add(labelNoRelations);
|
||||
|
||||
if (project.getRelationships() != null && project.getRelationships().size() > 0) {
|
||||
|
||||
secondProjectPanelContainer.clear();
|
||||
|
||||
for (RelationshipDV relationDV : project.getRelationships()) {
|
||||
|
||||
final FlexTable flexTable = new FlexTable();
|
||||
flexTable.getElement().addClassName("box-table-diplay-project");
|
||||
Label label = new Label();
|
||||
label.setType(LabelType.INFO);
|
||||
label.setText(relationDV.getRelationshipName());
|
||||
|
||||
FlowPanel panelContainer = new FlowPanel();
|
||||
Button deleteRelation = new Button("", IconType.SAVE);
|
||||
deleteRelation.setTitle("Open this project");
|
||||
deleteRelation.setType(ButtonType.LINK);
|
||||
deleteRelation.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
ResultDocumentDV toProject = mapOfTargetProjectForId.get(relationDV.getTargetUCD());
|
||||
// appManagerBus.fireEvent(
|
||||
// new RelationActionHandlerEvent(project, relationDV.getRelationshipName(), toProject));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
panelContainer.add(label);
|
||||
panelContainer.add(deleteRelation);
|
||||
flexTable.setWidget(0, 0, panelContainer);
|
||||
|
||||
// flexTable.setWidget(1, 0, new LoaderIcon("loading project.."));
|
||||
// GeoportalDataEntryServiceAsync.Util.getInstance().getResultDocumentFoProjectByID(
|
||||
// relationDV.getTargetUCD(), relationDV.getTargetID(), new AsyncCallback<ResultDocumentDV>() {
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(Throwable caught) {
|
||||
// flexTable.setWidget(1, 0, new HTML(caught.getMessage()));
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(ResultDocumentDV result) {
|
||||
// mapOfTargetProjectForId.put(relationDV.getTargetUCD(), result);
|
||||
// Entry<String, Object> firstEntrySet = result.getFirstEntryOfMap();
|
||||
// String htmlMsg = firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue()
|
||||
// + "</b> (id: " + result.getId() + ")";
|
||||
//
|
||||
// flexTable.setWidget(1, 0, new HTML(htmlMsg));
|
||||
//
|
||||
// ReportTemplateToHTML rtth2 = new ReportTemplateToHTML("", result.getDocumentAsJSON(),
|
||||
// false, false);
|
||||
// rtth2.showAsJSON(false);
|
||||
//
|
||||
// flexTable.setWidget(2, 0, rtth2);
|
||||
// }
|
||||
// });
|
||||
|
||||
secondProjectPanelContainer.add(flexTable);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
<ui:style>
|
||||
.view-rel-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 18px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.butt-create {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.to-align-right {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.panel-style {
|
||||
margin-top: 10px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.panel-style table {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.panel-container-style {
|
||||
padding-left: 10px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
</ui:style>
|
||||
|
||||
<g:HTMLPanel>
|
||||
<b:Button ui:field="closeButton"
|
||||
addStyleNames="{style.to-align-right}"></b:Button>
|
||||
<g:HTMLPanel ui:field="panelTitle"
|
||||
addStyleNames="{style.view-rel-title}">View Relations</g:HTMLPanel>
|
||||
<b:Button ui:field="buttonExpand"
|
||||
addStyleNames="{style.float-right}">Expand</b:Button>
|
||||
<g:HTMLPanel ui:field="firstPanelContainer"
|
||||
addStyleNames="{style.panel-style}">
|
||||
<g:FlowPanel>
|
||||
<b:Label>From Project</b:Label>
|
||||
</g:FlowPanel>
|
||||
<g:FlowPanel ui:field="firstProjectPanelContainer"
|
||||
addStyleNames="{style.panel-container-style}"></g:FlowPanel>
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="secondPanelContainer"
|
||||
addStyleNames="{style.panel-style}">
|
||||
<g:FlowPanel>
|
||||
<b:Label>To Project/s</b:Label>
|
||||
</g:FlowPanel>
|
||||
<g:FlowPanel ui:field="secondProjectPanelContainer"
|
||||
addStyleNames="{style.panel-container-style}"></g:FlowPanel>
|
||||
</g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
|
||||
</ui:UiBinder>
|
|
@ -306,8 +306,8 @@ public class SearchFacilityUI extends Composite {
|
|||
*
|
||||
* locateOnMap.addClickHandler(new ClickHandler() {
|
||||
*
|
||||
* @Override public void onClick(ClickEvent event) { GeoNaItemRef gir = new
|
||||
* GeoNaItemRef(concessione.getItemId(),
|
||||
* @Override public void onClick(ClickEvent event) { GeoportalItemReferences gir = new
|
||||
* GeoportalItemReferences(concessione.getItemId(),
|
||||
* GeoportalDataViewerConstants.RECORD_TYPE.CONCESSIONE.toString());
|
||||
* appManagerBus.fireEvent(new ShowDetailsEvent(gir, null, null));
|
||||
* appManagerBus.fireEvent(new ShowPopupOnCentroiEvent(concessione));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.client.ui.dialogs;
|
||||
|
||||
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.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.client.util.LoaderIcon;
|
||||
|
@ -117,7 +117,7 @@ public class DialogShareableLink extends Composite {
|
|||
// @UiField
|
||||
// HTMLPanel panelFieldsContainer;
|
||||
|
||||
private GeoNaItemRef geonItemRef;
|
||||
private GeoportalItemReferences geonItemRef;
|
||||
|
||||
private String fileVersion;
|
||||
|
||||
|
@ -149,7 +149,7 @@ public class DialogShareableLink extends Composite {
|
|||
* @param item the item
|
||||
* @param version the version
|
||||
*/
|
||||
public DialogShareableLink(GeoNaItemRef item, String version) {
|
||||
public DialogShareableLink(GeoportalItemReferences item, String version) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
this.geonItemRef = item;
|
||||
|
@ -409,12 +409,12 @@ public class DialogShareableLink extends Composite {
|
|||
*
|
||||
* @param item the item
|
||||
*/
|
||||
private void loadAndShowPublicLinksForItem(GeoNaItemRef item) {
|
||||
private void loadAndShowPublicLinksForItem(GeoportalItemReferences item) {
|
||||
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().getPublicLinksFor(item, new AsyncCallback<GeoNaItemRef>() {
|
||||
GeoportalDataViewerServiceAsync.Util.getInstance().getPublicLinksFor(item, new AsyncCallback<GeoportalItemReferences>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(GeoNaItemRef itemReferences) {
|
||||
public void onSuccess(GeoportalItemReferences itemReferences) {
|
||||
showLoadingIcon(false);
|
||||
openPublicLink = itemReferences.getOpenLink();
|
||||
restrictedPublicLink = itemReferences.getRestrictedLink();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
//import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
||||
//import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
||||
//import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV;
|
||||
//import org.gcube.application.geoportalcommon.shared.products.model.AbstractRelazioneScavoDV;
|
||||
//import org.gcube.application.geoportalcommon.shared.products.model.LayerConcessioneDV;
|
||||
|
@ -87,7 +87,7 @@
|
|||
//
|
||||
// private CustomFlexTable customTable = new CustomFlexTable();
|
||||
//
|
||||
// private GeoNaItemRef geonaItemRef;
|
||||
// private GeoportalItemReferences geonaItemRef;
|
||||
//
|
||||
// private String myLogin;
|
||||
//
|
||||
|
@ -100,11 +100,11 @@
|
|||
// pageViewDetails.getElement().setId("page-view-details");
|
||||
// }
|
||||
//
|
||||
// public ConcessioneView(GeoNaItemRef item, ConcessioneDV concDV) {
|
||||
// public ConcessioneView(GeoportalItemReferences item, ConcessioneDV concDV) {
|
||||
// this(item, concDV, true, true);
|
||||
// }
|
||||
//
|
||||
// public ConcessioneView(GeoNaItemRef item, ConcessioneDV concDV, boolean viewImageButtonVisible,
|
||||
// public ConcessioneView(GeoportalItemReferences item, ConcessioneDV concDV, boolean viewImageButtonVisible,
|
||||
// boolean openImageButtonVisible) {
|
||||
// this();
|
||||
// GWT.log("Rendering " + concDV.getNome());
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.gcube.application.geoportalcommon.geoportal.GeoportalClientCaller;
|
|||
import org.gcube.application.geoportalcommon.geoportal.ProjectsCaller;
|
||||
import org.gcube.application.geoportalcommon.geoportal.UseCaseDescriptorCaller;
|
||||
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.LayerItem;
|
||||
import org.gcube.application.geoportalcommon.shared.ResultSetPaginatedData;
|
||||
import org.gcube.application.geoportalcommon.shared.SearchingFilter;
|
||||
|
@ -504,7 +504,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
@Override
|
||||
public GeoNaItemRef getPublicLinksFor(GeoNaItemRef item) throws Exception {
|
||||
public GeoportalItemReferences getPublicLinksFor(GeoportalItemReferences item) throws Exception {
|
||||
LOG.info("getPublicLinksFor called for: " + item);
|
||||
|
||||
try {
|
||||
|
@ -1076,6 +1076,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
|||
UseCaseDescriptor ucd = GeoportalClientCaller.useCaseDescriptors().getUCDForId(profileID);
|
||||
Project theProject = GeoportalClientCaller.projects().getProjectByID(profileID, projectID);
|
||||
ProjectDVBuilder projectBuilder = ProjectDVBuilder.newBuilder().fullDocumentMap(true);
|
||||
projectBuilder.relationships(true);
|
||||
ProjectDV theProjectDV = ConvertToDataValueObjectModel.toProjectDV(theProject, projectBuilder);
|
||||
theProjectDV.setProfileName(ucd.getName());
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer.shared.gis;
|
||||
|
||||
public enum LayerObjectType {
|
||||
BASE_LAYER, PROJECT_LAYER, INDEX_LAYER, GENERIC_LAYER
|
||||
PROJECT_LAYER, INDEX_LAYER, GENERIC_LAYER
|
||||
}
|
|
@ -13,10 +13,7 @@ import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
|||
import org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.GeoportalDataViewerServiceImpl;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.Geoportal_JSON_Mapper;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.mongoservice.GeoportalServiceIdentityProxy;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.server.util.SessionUtil;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
Loading…
Reference in New Issue