Added Creation Date to Template

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@115338 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-06-11 16:48:51 +00:00
parent 691fd02875
commit 16521b2c37
2 changed files with 25 additions and 17 deletions

View File

@ -6316,6 +6316,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
Contacts owner = new Contacts("", desc.getOwner(), false);
templateData.setOwner(owner);
templateData.setContacts(retrieveTemplateShareInfo(desc));
if(desc.getCreationdDate()!=null){
templateData.setCreationDate(sdf.format(desc.getCreationdDate().getTime()));
} else {
templateData.setCreationDate("");
}
templateDataList.add(templateData);
}
logger.debug("Retrieved TemplateData List");

View File

@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts;
* Template Description
*
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author "Giancarlo Panichi" <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TemplateData implements Serializable {
@ -21,14 +21,14 @@ public class TemplateData implements Serializable {
private String description;
private String agency;
private String category;
protected Contacts owner;
protected ArrayList<Contacts> contacts;
private Contacts owner;
private ArrayList<Contacts> contacts;
private String creationDate;
public TemplateData(){
public TemplateData() {
super();
}
/**
*
* @param id
@ -41,7 +41,7 @@ public class TemplateData implements Serializable {
*/
public TemplateData(long id, String name, String description,
String agency, String category, Contacts owner,
ArrayList<Contacts> contacts) {
ArrayList<Contacts> contacts, String creationDate) {
super();
this.id = id;
this.name = name;
@ -50,6 +50,7 @@ public class TemplateData implements Serializable {
this.category = category;
this.owner = owner;
this.contacts = contacts;
this.creationDate = creationDate;
}
public long getId() {
@ -83,7 +84,7 @@ public class TemplateData implements Serializable {
public void setAgency(String agency) {
this.agency = agency;
}
public String getCategory() {
return category;
}
@ -108,7 +109,6 @@ public class TemplateData implements Serializable {
return login;
}
public ArrayList<Contacts> getContacts() {
return contacts;
}
@ -117,17 +117,20 @@ public class TemplateData implements Serializable {
this.contacts = contacts;
}
public String getCreationDate() {
return creationDate;
}
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
@Override
public String toString() {
return "TemplateData [id=" + id + ", name=" + name + ", description="
+ description + ", agency=" + agency + ", category=" + category
+ ", owner=" + owner + ", contacts=" + contacts + "]";
+ ", owner=" + owner + ", contacts=" + contacts
+ ", creationDate=" + creationDate + "]";
}
}