2015-03-03 12:31:46 +01:00
|
|
|
package org.gcube.portlets.user.joinvre.shared;
|
2015-03-03 11:21:17 +01:00
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
|
|
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
|
|
*/
|
|
|
|
@SuppressWarnings("serial")
|
|
|
|
public class VRE extends ResearchEnvironment implements Serializable, Comparable<VRE> {
|
2015-03-04 12:27:08 +01:00
|
|
|
|
|
|
|
protected boolean uponRequest;
|
|
|
|
protected long id;
|
2015-10-22 14:58:31 +02:00
|
|
|
protected boolean isExternal;
|
|
|
|
protected String url;
|
2015-03-03 11:21:17 +01:00
|
|
|
|
|
|
|
public VRE() {
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-03-04 12:27:08 +01:00
|
|
|
* @param id
|
2015-03-03 11:21:17 +01:00
|
|
|
* @param vreName
|
|
|
|
* @param description
|
|
|
|
* @param imageURL
|
|
|
|
* @param vomsGroupName
|
|
|
|
* @param friendlyURL
|
2015-03-04 12:27:08 +01:00
|
|
|
* @param categories
|
2015-03-03 11:21:17 +01:00
|
|
|
* @param userBelonging
|
2015-03-04 12:27:08 +01:00
|
|
|
* @param uponRequest
|
2015-03-03 11:21:17 +01:00
|
|
|
*/
|
|
|
|
public VRE(long id, String vreName, String description, String imageURL,
|
2015-09-02 19:26:00 +02:00
|
|
|
String vomsGroupName, String friendlyURL, UserBelonging userBelonging, boolean uponRequest) {
|
2015-03-03 11:21:17 +01:00
|
|
|
super(vreName, description, imageURL, vomsGroupName, friendlyURL, userBelonging);
|
|
|
|
this.uponRequest = uponRequest;
|
|
|
|
this.id = id;
|
2015-10-22 14:58:31 +02:00
|
|
|
isExternal = false;
|
|
|
|
url = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
public VRE(long id, String vreName, String description, String imageURL,
|
|
|
|
String vomsGroupName, String friendlyURL, UserBelonging userBelonging, boolean uponRequest, boolean isExternal, String url) {
|
|
|
|
super(vreName, description, imageURL, vomsGroupName, friendlyURL, userBelonging);
|
|
|
|
this.uponRequest = uponRequest;
|
|
|
|
this.id = id;
|
|
|
|
this.isExternal = isExternal;
|
|
|
|
this.url = url;
|
2015-03-03 11:21:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isUponRequest() {
|
|
|
|
return uponRequest;
|
|
|
|
}
|
|
|
|
public void setUponRequest(boolean uponRequest) {
|
|
|
|
this.uponRequest = uponRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(long id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
2015-10-22 14:58:31 +02:00
|
|
|
|
|
|
|
public boolean isExternal() {
|
|
|
|
return isExternal;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setExternal(boolean isExternal) {
|
|
|
|
this.isExternal = isExternal;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUrl() {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUrl(String url) {
|
|
|
|
this.url = url;
|
|
|
|
}
|
2015-03-03 11:21:17 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
2015-03-05 15:10:23 +01:00
|
|
|
return "VRE {" + getName() + ", "+ getFriendlyURL() + ", uponRequest=" + uponRequest+"}";
|
2015-03-03 11:21:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-03-10 11:29:28 +01:00
|
|
|
public int compareTo(VRE vre) {
|
|
|
|
return this.getName().compareTo(vre.getName());
|
2015-03-03 11:21:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|