diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/JoinService.java b/src/main/java/org/gcube/portlets/user/joinvre/client/JoinService.java
index 0c00b4b..2f67d4a 100644
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/JoinService.java
+++ b/src/main/java/org/gcube/portlets/user/joinvre/client/JoinService.java
@@ -1,8 +1,8 @@
package org.gcube.portlets.user.joinvre.client;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.LinkedHashMap;
+import java.util.TreeMap;
import org.gcube.portlets.user.joinvre.shared.VRE;
import org.gcube.portlets.user.joinvre.shared.VRECategory;
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/JoinServiceAsync.java b/src/main/java/org/gcube/portlets/user/joinvre/client/JoinServiceAsync.java
index 746bf56..9967867 100644
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/JoinServiceAsync.java
+++ b/src/main/java/org/gcube/portlets/user/joinvre/client/JoinServiceAsync.java
@@ -1,8 +1,8 @@
package org.gcube.portlets.user.joinvre.client;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.LinkedHashMap;
+import java.util.TreeMap;
import org.gcube.portlets.user.joinvre.shared.VRE;
import org.gcube.portlets.user.joinvre.shared.VRECategory;
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/panels/Relevance.java b/src/main/java/org/gcube/portlets/user/joinvre/client/panels/Relevance.java
deleted file mode 100644
index 6a27cf4..0000000
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/panels/Relevance.java
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.gcube.portlets.user.joinvre.client.panels;
-
-/**
- * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
- *
- */
-public enum Relevance {
- Must_Have, Recommended, Exclusive, Demonstrative
-}
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/ResponsivePanel.java b/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/ResponsivePanel.java
index 126a43f..a0176b8 100644
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/ResponsivePanel.java
+++ b/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/ResponsivePanel.java
@@ -1,19 +1,16 @@
package org.gcube.portlets.user.joinvre.client.responsive;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.LinkedHashMap;
+import java.util.TreeMap;
import org.gcube.portlets.user.joinvre.client.JoinService;
import org.gcube.portlets.user.joinvre.client.JoinServiceAsync;
+import org.gcube.portlets.user.joinvre.client.ui.VreThumbnail;
import org.gcube.portlets.user.joinvre.shared.VRE;
import org.gcube.portlets.user.joinvre.shared.VRECategory;
-import com.github.gwtbootstrap.client.ui.Column;
-import com.github.gwtbootstrap.client.ui.Image;
import com.github.gwtbootstrap.client.ui.PageHeader;
-import com.github.gwtbootstrap.client.ui.Row;
-import com.github.gwtbootstrap.client.ui.ThumbnailLink;
import com.github.gwtbootstrap.client.ui.Thumbnails;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/VreThumbnail.ui.xml b/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/VreThumbnail.ui.xml
deleted file mode 100644
index a052d0a..0000000
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/VreThumbnail.ui.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- .important {
- font-weight: bold;
- }
-
-
-
-
-
-
-
-
- Info
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java
deleted file mode 100644
index d57e3a8..0000000
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package org.gcube.portlets.user.joinvre.client.ui;
-
-import static com.google.gwt.query.client.GQuery.$;
-import static com.google.gwt.query.client.css.CSS.WIDTH;
-import static com.google.gwt.query.client.GQuery.window;
-import java.util.List;
-
-import org.gcube.portlets.user.gcubewidgets.client.elements.Div;
-import org.gcube.portlets.user.joinvre.client.JoinService;
-import org.gcube.portlets.user.joinvre.client.JoinServiceAsync;
-import org.gcube.portlets.user.joinvre.shared.VRE;
-import org.gcube.portlets.user.joinvre.shared.VRECategory;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.query.client.Function;
-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.rpc.AsyncCallback;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-
-/**
- * @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
- * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
- */
-public class DisplayVRE extends Composite {
-
- interface DisplayVREUiBinder extends UiBinder {}
-
- private static DisplayVREUiBinder uiBinder = GWT.create(DisplayVREUiBinder.class);
-
- private final JoinServiceAsync joinService = GWT.create(JoinService.class);
-
- public static final String vreDefaultImage = GWT.getModuleBaseURL() + "../images/vre-default.png";
- public static final String loadingImage = GWT.getModuleBaseURL() + "../images/vre-image-loader.gif";
-
- public static LoadingPopUp loadingPopUp = new LoadingPopUp(false, true, loadingImage);
-
- public static final String REQUEST_ACCESS = "Request Access";
- public static final String FREE_ACCESS = "Free Access";
-
-
-
- @UiField HTMLPanel mainPanel;
- @UiField Image vreImage;
- @UiField Label vreName;
- @UiField HTMLPanel vreCategories;
- @UiField Div vreDesc;
- @UiField Button joinButton;
- @UiField Button closeButton;
-
- public DisplayVRE(final VRE vre) {
- Widget widget = uiBinder.createAndBindUi(this);
- vreImage.setUrl(loadingImage);
- closeButton.setText("Collapse");
- vreDesc.setHTML(vre.getDescription());
-
- if(vre.getImageURL().compareTo("")!=0){
- vreImage.setUrl(vre.getImageURL());
- }else{
- vreImage.setUrl(vreDefaultImage);
- }
-
- final String name = vre.getName();
- ClickHandler descriptionHandler = new ClickHandler(){
- @Override
- public void onClick(ClickEvent event) {
- if ($(mainPanel).css(WIDTH).compareTo("160px") == 0)
- show();
- else
- collapse();
-
- }
- };
- closeButton.addClickHandler(new ClickHandler() {
- @Override
- public void onClick(ClickEvent event) {
- collapse();
- }
- });
-
- vreImage.setTitle("Click to see details");
- vreImage.addClickHandler(descriptionHandler);
-
- vreName.setTitle(name);
- vreName.setText(name);
- vreName.addClickHandler(descriptionHandler);
-
- List categories = null;
- for(int i=0; i() {
-
- @Override
- public void onFailure(Throwable caught) {
- loadingPopUp.hide();
- String error = "Error";
- String errorDescription = "Error while trying to join to"
- + name + " VRE. Please Try again later. "
- + "If the problem persist contact system administrator";
- final InfoDialog infoDialog = new InfoDialog(error, errorDescription);
- infoDialog.show();
- }
-
- @Override
- public void onSuccess(Boolean result) {
- loadingPopUp.hide();
- Window.open("/group/data-e-infrastructure-gateway/join-new?orgid="+vre.getId(), "_self", "");
- }
-
- });
- }
- });
-
-
- initWidget(widget);
- }
-
- private void show() {
- $(mainPanel).animate("width:'927px'", 120, new Function(){
- public void f(Element e){
- $(vreDesc).fadeIn();
- $(closeButton).fadeIn();
- $(window).scrollTo(0, mainPanel.getAbsoluteTop()-310);
- }
- });
- vreImage.setTitle("Click to collapse");
- }
- private void collapse() {
- $(closeButton).fadeOut();
- $(vreDesc).fadeOut(new Function(){
- public void f(Element e){
- $(mainPanel).animate("width:'160px'", 150);
- }
- });
- vreImage.setTitle("Click to see details");
- }
-
- public void showError(String message) {
- Window.alert("Failure: " + message);
- vreImage.setSize("100px", "100px");
- vreImage.setUrl(vreDefaultImage);
- }
-
-
-
-}
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.ui.xml b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.ui.xml
deleted file mode 100644
index cf6d243..0000000
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.ui.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
-
-
-
- |
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/InfoDialog.java b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/InfoDialog.java
deleted file mode 100755
index 57e2946..0000000
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/InfoDialog.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.gcube.portlets.user.joinvre.client.ui;
-
-import org.gcube.portlets.user.gcubewidgets.client.popup.GCubeDialog;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.ScrollPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-
-/**
- * @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
- * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
- */
-public class InfoDialog extends GCubeDialog {
- private ScrollPanel scroller = new ScrollPanel();
- private VerticalPanel main_panel = null;
-
- public InfoDialog(String title, String content) {
-
- // PopupPanel's constructor takes 'auto-hide' as its boolean parameter.
- // If this is set, the panel closes itself automatically when the user
- // clicks outside of it.
- super(true);
- super.setText(title);
- main_panel = new VerticalPanel();
- main_panel.addStyleName("bgBlank p8 font_family font_12");
-
- if (content == null || content.equals(""))
- content = "We're sorry, there is no available description yet";
-
- scroller.add(new HTML(content));
-
- // PopupPanel is a SimplePanel, so you have to set it's widget property to
- // whatever you want its contents to be.
- Button close = new Button("Close");
- close.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
- hide();
- }
- });
- main_panel.add(scroller);
- main_panel.add(new HTML("
"));
- main_panel.add(close);
- scroller.setPixelSize(550, 300);
- main_panel.setPixelSize(550, 350);
- setWidget(main_panel);
- }
-
- public void show() {
- super.show();
- center();
-// int left = (Window.getClientWidth() - getOffsetWidth()) / 2 + getBodyScrollLeft();
-// int top = (Window.getClientHeight() - getOffsetHeight()) / 2 + getBodyScrollTop();
-// setPopupPosition(left, top);
- }
-
- private native int getBodyScrollLeft() /*-{
- return $doc.body.scrollLeft;
- }-*/;
-
- private native int getBodyScrollTop() /*-{
- return $doc.body.scrollTop;
- }-*/;
-}
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/LoadingPopUp.java b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/LoadingPopUp.java
deleted file mode 100755
index 77875cf..0000000
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/LoadingPopUp.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.gcube.portlets.user.joinvre.client.ui;
-
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.HTML;
-
-/**
- *
- */
-public class LoadingPopUp extends DialogBox {
-
- private static LoadingPopUp singleton = null;
- private boolean hidden = true;
- private String loading_image = "";
-
- public static LoadingPopUp get() {
- return singleton;
- }
-
- public LoadingPopUp(boolean autoHide, boolean modal, String loading_image) {
- super(autoHide, modal);
- this.loading_image = loading_image;
- HTML msg = new HTML(setToDisplay(), true);
- DockPanel dock = new DockPanel();
- dock.setSpacing(0);
- dock.add(msg, DockPanel.NORTH);
- dock.setPixelSize(msg.getOffsetWidth(), msg.getOffsetHeight());
- setWidget(dock);
- if (singleton == null) singleton = this;
- }
-
- protected String setToDisplay() {
- return
- ""+
- ""+
- ""+
- ""+
- " |
"+
- "
" ;
- }
- public void hide() {
- super.hide();
- this.hidden = true;
- }
- public void show() {
- super.show();
- this.hidden = false;
- }
- public boolean isHidden() {
- return this.hidden;
- }
-}
-
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/VreThumbnail.java b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/VreThumbnail.java
similarity index 89%
rename from src/main/java/org/gcube/portlets/user/joinvre/client/responsive/VreThumbnail.java
rename to src/main/java/org/gcube/portlets/user/joinvre/client/ui/VreThumbnail.java
index f49497b..852a140 100644
--- a/src/main/java/org/gcube/portlets/user/joinvre/client/responsive/VreThumbnail.java
+++ b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/VreThumbnail.java
@@ -1,9 +1,7 @@
-package org.gcube.portlets.user.joinvre.client.responsive;
+package org.gcube.portlets.user.joinvre.client.ui;
import org.gcube.portlets.user.joinvre.client.JoinService;
import org.gcube.portlets.user.joinvre.client.JoinServiceAsync;
-import org.gcube.portlets.user.joinvre.client.ui.InfoDialog;
-import org.gcube.portlets.user.joinvre.client.ui.InfoPanel;
import org.gcube.portlets.user.joinvre.shared.VRE;
import com.github.gwtbootstrap.client.ui.Button;
@@ -12,7 +10,6 @@ import com.github.gwtbootstrap.client.ui.Image;
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
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.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
@@ -52,8 +49,6 @@ public class VreThumbnail extends Composite {
joinButton.setText("Enter this VRE");
}
vreImage.setUrl(vre.getImageURL());
- vreImage.setWidth("180px");
-
}
@UiHandler("joinButton")
@@ -61,7 +56,6 @@ public class VreThumbnail extends Composite {
joinService.joinVRE(myVre.getId(), new AsyncCallback() {
@Override
public void onFailure(Throwable caught) {
- String error = "Error";
String errorDescription = "Error while trying to join to"
+ myVre.getName() + " VRE. Please Try again later. "
+ "If the problem persist contact system administrator";
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/VreThumbnail.ui.xml b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/VreThumbnail.ui.xml
new file mode 100644
index 0000000..7ca1d43
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/VreThumbnail.ui.xml
@@ -0,0 +1,31 @@
+
+
+
+ .imageContainer {
+ height: 180px;
+ text-align: center;
+ }
+
+ .image {
+ width: 180px;
+ position: relative;
+ top: 50%;
+ -ms-transform: translateY(-50%);
+ -webkit-transform: translateY(-50%);
+ transform: translateY(-50%);
+ }
+
+
+
+
+
+
+
+
+
+ Info
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java b/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java
index 3e46b9c..9382ad6 100644
--- a/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java
@@ -4,8 +4,8 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
-import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Properties;
@@ -17,13 +17,10 @@ import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.user.joinvre.client.JoinService;
-import org.gcube.portlets.user.joinvre.client.panels.Relevance;
import org.gcube.portlets.user.joinvre.shared.UserBelonging;
import org.gcube.portlets.user.joinvre.shared.VRE;
import org.gcube.portlets.user.joinvre.shared.VRECategory;
-import java.util.HashMap;
-
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
@@ -40,8 +37,8 @@ import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.theme.ThemeDisplay;
-import com.liferay.portlet.asset.model.AssetCategory;
-import com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil;
+import com.liferay.portlet.expando.model.ExpandoBridge;
+import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
/**
* @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
@@ -103,7 +100,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
if (isWithinPortal()) {
toReturn = getPortalOrganizationMappedToVRE();
} else {
- VRECategory devsecCategory = new VRECategory(1, "Development", "designed to apply Data Mining techniques to biological data. "
+ VRECategory devsecCategory = new VRECategory(1, "Z_Development", "designed to apply Data Mining techniques to biological data. "
+ "The algorithms are executed in a distributed fashion on the e-Infrastructure nodes or on local multi-core machines.");
ArrayList vres = new ArrayList();
@@ -139,12 +136,12 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
devsecCategory = new VRECategory(2, "Sailing", "Sailing prod desc");
vres = new ArrayList();
- vres.add(new VRE(1, "PerformanceEvaluationInAquaculture", "devVRE VRE description", "", "http://placehold.it/200x200", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
- vres.add(new VRE(2, "devmode", "devmode VRE description", "", "http://placehold.it/200x200", "/group/devmode", UserBelonging.NOT_BELONGING, true));
- vres.add(new VRE(1, "StrategicInvestmentAnalysis", "devVRE VRE description", "", "http://placehold.it/200x200", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
- vres.add(new VRE(2, "devmode2", "devmode VRE description", "", "http://placehold.it/200x200", "/group/devmode", UserBelonging.NOT_BELONGING, true));
- vres.add(new VRE(1, "devVR3E", "devVRE VRE description", "", "http://placehold.it/200x200", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
- vres.add(new VRE(2, "devmode3", "devmode VRE description", "", "http://placehold.it/200x200", "/group/devmode", UserBelonging.NOT_BELONGING, true));
+ vres.add(new VRE(1, "PerformanceEvaluationInAquaculture", "devVRE VRE description", "http://placehold.it/200x100", "http://placehold.it/200x100", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
+ vres.add(new VRE(2, "devmode", "devmode VRE description", "http://placehold.it/200x100", "https://placeholdit.imgix.net/~text?txtsize=19&txt=200%C3%97100&w=200&h=100", "/group/devmode", UserBelonging.NOT_BELONGING, true));
+ vres.add(new VRE(1, "StrategicInvestmentAnalysis", "devVRE VRE description", "", "https://placeholdit.imgix.net/~text?txtsize=19&txt=200%C3%97100&w=200&h=100", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
+ vres.add(new VRE(2, "devmode2", "devmode VRE description", "http://placehold.it/200x100", "", "/group/devmode", UserBelonging.NOT_BELONGING, true));
+ vres.add(new VRE(1, "devVR3E", "devVRE VRE description", "http://placehold.it/200x200", "aaaa", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
+ vres.add(new VRE(2, "devmode3", "devmode VRE description", "http://placehold.it/200x200", "", "/group/devmode", UserBelonging.NOT_BELONGING, true));
vres.add(new VRE(1, "devVRE4", "devVRE VRE description", "", "http://placehold.it/200x200", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
vres.add(new VRE(2, "devmode4", "devmode VRE description", "", "http://placehold.it/200x200", "/group/devmode", UserBelonging.NOT_BELONGING, true));
vres.add(new VRE(1, "devVRE5", "devVRE VRE description", "", "http://placehold.it/200x200", "/group/devVRE", UserBelonging.NOT_BELONGING, false));
@@ -174,6 +171,18 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
private static final String REQUEST_BASED_GROUP = "Requestbasedgroup";
+ public List getVirtualGroups() throws PortalException, SystemException {
+ try {
+ ExpandoBridge expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(OrganizationsUtil.getCompany().getCompanyId(), Organization.class.getName());
+ String[] groups = (String[]) expandoBridge.getAttributeDefault("Virtualgroup");
+ return Arrays.asList(groups);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+
public boolean requireAccessGrant(Organization organization) throws PortalException, SystemException {
try {
long companyId = OrganizationsUtil.getCompany().getCompanyId();
@@ -210,8 +219,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
_log.warn(String.format("Attribute %s not initialized.", CATEGORY));
return null;
} else {
- String[] values = (String[]) organization.getExpandoBridge().getAttribute(CATEGORY);
- System.out.println("RITORNA QUESTO -> " + values.toString());
+ String[] values = (String[]) organization.getExpandoBridge().getAttribute(CATEGORY);
return values[0];
}
} catch (Exception e) {
@@ -221,10 +229,22 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
}
+
public LinkedHashMap> getPortalOrganizationMappedToVRE() throws SystemException, PortalException {
LinkedHashMap> toReturn = new LinkedHashMap>();
-
+ //before iterating the actual groups create the virtualGroups in the correct order
+ List virtualGroups = getVirtualGroups();
+ for (String vg : virtualGroups) {
+ String[] splits = vg.split("\\|");
+ String gName = splits[0];
+ String gDescription = splits[1];
+ ArrayList toCreate = new ArrayList();
+ VRECategory cat = new VRECategory(1L, gName, gDescription);
+ toReturn.put(cat, toCreate);
+ }
+
+ //start of iteration of the actual groups
List organizations = OrganizationLocalServiceUtil.getOrganizations(0, OrganizationLocalServiceUtil.getOrganizationsCount());
Organization rootOrganization = null;
for (Organization organization : organizations) {
@@ -264,29 +284,33 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
boolean requireAccessGrant = requireAccessGrant(vreOrganization);
_log.debug(String.format("VRE preferences : %s", vreOrganization.getPreferences()));
+
String catName = getCategory(vreOrganization);
String[] splits = catName.split("\\|");
catName = splits[0];
- String description = splits[1];
+
VRECategory toLookFor = null;
for (VRECategory vre : toReturn.keySet()) {
if (vre.getName().compareTo(catName)==0)
toLookFor = vre;
}
- System.out.println("\ngetCategory() ->" + catName);
+ _log.debug("\ngetCategory() ->" + catName);
if (toLookFor != null) {
ArrayList toUpdate = toReturn.get(toLookFor);
toUpdate.add(new VRE(vreID,vreName, vreDescription, vreLogoURL, groupName,friendlyURL, UserBelonging.NOT_BELONGING, requireAccessGrant));
- } else {
- ArrayList toCreate = new ArrayList();
- toCreate.add(new VRE(vreID,vreName, vreDescription, vreLogoURL, groupName,friendlyURL, UserBelonging.NOT_BELONGING, requireAccessGrant));
- VRECategory cat = new VRECategory(1L, catName, description);
- toReturn.put(cat, toCreate);
- }
+ }
+
+
+
}
}
-
+
+ //sort the vres in the groups
+ for (VRECategory cat : toReturn.keySet()) {
+ ArrayList toSort = toReturn.get(cat);
+ Collections.sort(toSort);
+ }
return toReturn;
}
diff --git a/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml b/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml
index 0471e0c..71ff8d7 100644
--- a/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml
@@ -4,10 +4,7 @@
-
-
-
-
+
diff --git a/src/main/webapp/JoinVRE.css b/src/main/webapp/JoinVRE.css
index 38e56ff..8b6d71a 100644
--- a/src/main/webapp/JoinVRE.css
+++ b/src/main/webapp/JoinVRE.css
@@ -1,3 +1,15 @@
body {
padding-top: 0px !important;
+}
+
+h1 {
+ font-size:30px !important;
+}
+
+h1 small {
+ font-size:22px !important;
+}
+
+#wrapper {
+ width: 1220px !important;
}
\ No newline at end of file
diff --git a/src/main/webapp/images/logoBlue.png b/src/main/webapp/images/logoBlue.png
new file mode 100644
index 0000000..952dd22
Binary files /dev/null and b/src/main/webapp/images/logoBlue.png differ