implementation completed
This commit is contained in:
parent
9c5ece8131
commit
95693aee69
|
@ -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 + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
|
Loading…
Reference in New Issue