Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@97791 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-06-25 14:14:01 +00:00
parent 3bd4da5d31
commit 43611e02a3
1 changed files with 33 additions and 32 deletions

View File

@ -5,21 +5,18 @@ import java.io.Serializable;
import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts; import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
/** /**
* *
* @author "Giancarlo Panichi" * @author "Giancarlo Panichi" <a
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> * href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public class TabResource implements Serializable { public class TabResource implements Serializable {
private static final long serialVersionUID = -8353499109124097114L; private static final long serialVersionUID = -8353499109124097114L;
protected TRId trId; protected TRId trId;
protected String id;//For grid only protected String id;// For grid only
protected String name; protected String name;
protected String description; protected String description;
protected String agency; protected String agency;
@ -29,17 +26,18 @@ public class TabResource implements Serializable {
protected boolean valid; protected boolean valid;
protected boolean finalized; protected boolean finalized;
public TabResource() {
}
public TabResource(){} public TabResource(String id, String name, String description,
String agency, String date, String right, TRId trId) {
public TabResource(String id, String name, String description,String agency, String date, String right, TRId trId){ this.id = id;
this.id=id; this.name = name;
this.name=name; this.description = description;
this.description=description; this.agency = agency;
this.agency=agency; this.date = date;
this.date=date; this.right = right;
this.right=right; this.trId = trId;
this.trId=trId;
} }
public String getId() { public String getId() {
@ -90,10 +88,10 @@ public class TabResource implements Serializable {
this.trId = trId; this.trId = trId;
} }
public String getTabularResourceType(){ public String getTabularResourceType() {
String t=""; String t = "";
if(trId!=null&&trId.getTabularResourceType()!=null){ if (trId != null && trId.getTabularResourceType() != null) {
t=trId.getTabularResourceType(); t = trId.getTabularResourceType();
} }
return t; return t;
} }
@ -114,6 +112,14 @@ public class TabResource implements Serializable {
this.owner = owner; this.owner = owner;
} }
public String getOwnerLogin() {
String login = null;
if (owner != null) {
login = owner.getLogin();
}
return login;
}
public boolean isValid() { public boolean isValid() {
return valid; return valid;
} }
@ -138,9 +144,4 @@ public class TabResource implements Serializable {
+ ", valid=" + valid + ", finalized=" + finalized + "]"; + ", valid=" + valid + ", finalized=" + finalized + "]";
} }
} }