From ac3dcc4934953477568fabfaccc7ba4e50d8fdf0 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 17 Oct 2014 16:41:37 +0000 Subject: [PATCH] Added Uri Resolver git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@100794 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/type/DataViewRequestType.java | 3 ++- .../dataview/TabularResourceDataView.java | 21 +++++++++++++++- .../shared/uriresolver/ApplicationType.java | 25 +++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/uriresolver/ApplicationType.java diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java index 76cff4d..b305ded 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/client/type/DataViewRequestType.java @@ -11,5 +11,6 @@ package org.gcube.portlets.user.td.widgetcommonevent.client.type; */ public enum DataViewRequestType { OPEN, - CLOSE; + CLOSE, + UPDATE_TAB_NAME; } diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/dataview/TabularResourceDataView.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/dataview/TabularResourceDataView.java index e371b12..684ebc1 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/dataview/TabularResourceDataView.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/dataview/TabularResourceDataView.java @@ -13,6 +13,7 @@ public class TabularResourceDataView extends DataView { private static final long serialVersionUID = -8615122839978608904L; private TRId trId; + private String tabName; public TabularResourceDataView() { @@ -25,6 +26,14 @@ public class TabularResourceDataView extends DataView { super(); dataViewType = DataViewType.TABULARRESOURCE; this.trId = trId; + this.tabName = null; + } + + public TabularResourceDataView(TRId trId, String tabName) { + super(); + dataViewType = DataViewType.TABULARRESOURCE; + this.trId = trId; + this.tabName = tabName; } public TRId getTrId() { @@ -35,11 +44,21 @@ public class TabularResourceDataView extends DataView { this.trId = trId; } + public String getTabName() { + return tabName; + } + + public void setTabName(String tabName) { + this.tabName = tabName; + } + @Override public String toString() { - return "TabularResourceDataView [dataViewType="+dataViewType+", trId=" + trId + "]"; + return "TabularResourceDataView [trId=" + trId + ", tabName=" + tabName + + "]"; } + } diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/uriresolver/ApplicationType.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/uriresolver/ApplicationType.java new file mode 100644 index 0000000..8f612ee --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/uriresolver/ApplicationType.java @@ -0,0 +1,25 @@ +package org.gcube.portlets.user.td.widgetcommonevent.shared.uriresolver; + +/** + * + * @author giancarlo + * email: g.panichi@isti.cnr.it + * + */ +public enum ApplicationType { + GIS("GIS"); + + /** + * @param text + */ + private ApplicationType(final String id) { + this.id = id; + } + + private final String id; + + @Override + public String toString() { + return id; + } +}