2013-04-10 18:32:02 +02:00
|
|
|
package org.gcube.portlets.user.gcubeloggedin.shared;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author massi
|
|
|
|
*
|
|
|
|
*/
|
2014-09-15 19:02:39 +02:00
|
|
|
@SuppressWarnings("serial")
|
2013-04-10 18:32:02 +02:00
|
|
|
public class VOClient extends VObject implements Comparable<VOClient>, Serializable {
|
|
|
|
|
|
|
|
private boolean isRoot;
|
|
|
|
private List<VREClient> vres;
|
|
|
|
|
|
|
|
public VOClient() { }
|
|
|
|
|
|
|
|
public VOClient(
|
|
|
|
String name,
|
|
|
|
String groupName,
|
|
|
|
String description,
|
|
|
|
String imageURL,
|
|
|
|
String friendlyURL,
|
|
|
|
UserBelongingClient userBelonging) {
|
2014-09-15 19:02:39 +02:00
|
|
|
super(name, groupName, description, imageURL, friendlyURL, userBelonging, true, true);
|
2013-04-10 18:32:02 +02:00
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
}
|
|
|
|
|
|
|
|
public VOClient(
|
|
|
|
String name,
|
|
|
|
String groupName,
|
|
|
|
String description,
|
|
|
|
String imageURL,
|
|
|
|
String friendlyURL,
|
|
|
|
UserBelongingClient userBelonging,
|
|
|
|
boolean isRoot, List<VREClient> vres) {
|
2014-09-15 19:02:39 +02:00
|
|
|
super(name, groupName, description, imageURL, friendlyURL, userBelonging, true, true);
|
2013-04-10 18:32:02 +02:00
|
|
|
this.isRoot = isRoot;
|
|
|
|
this.vres = vres;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isRoot() {
|
|
|
|
return isRoot;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setRoot(boolean isRoot) {
|
|
|
|
this.isRoot = isRoot;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<VREClient> getVres() {
|
|
|
|
return vres;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setVres(List<VREClient> vres) {
|
|
|
|
this.vres = vres;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int compareTo(VOClient voToCompare) {
|
|
|
|
return (this.vres.size() >= voToCompare.getVres().size()) ? 1 : -1;
|
|
|
|
}
|
|
|
|
}
|