implementation completed

This commit is contained in:
Massimiliano Assante 2019-10-24 17:36:21 +02:00
parent 9c5ece8131
commit 95693aee69
3 changed files with 49 additions and 9 deletions

View File

@ -0,0 +1,33 @@
package org.gcube.portlets.user.thematicgateways;
import java.util.ArrayList;
import com.liferay.portal.model.Group;
public class Gateway {
private Group site;
private ArrayList<String> vres;
public Gateway(Group site, ArrayList<String> vres) {
super();
this.site = site;
this.vres = vres;
}
public Group getSite() {
return site;
}
public void setSite(Group site) {
this.site = site;
}
public ArrayList<String> getVres() {
return vres;
}
public void setVres(ArrayList<String> vres) {
this.vres = vres;
}
@Override
public String toString() {
return "Gateway [site=" + site + ", vres=" + vres + "]";
}
}

View File

@ -0,0 +1,16 @@
package org.gcube.portlets.user.thematicgateways;
import java.util.Comparator;
public class GatewayComparator implements Comparator<Gateway> {
@Override
public int compare(Gateway o1, Gateway o2) {
if (o1.getVres().size() > o2.getVres().size())
return -1;
if (o1.getVres().size() < o2.getVres().size())
return 1;
return 0;
}
}

View File

@ -1,9 +0,0 @@
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
<div class="alert alert-info">
<h4>Please select the farm you wish to operate</h4>
<strong>You are assigned to more than one company
Farm. You can work on one farm at a time.</strong>
</div>