model improved with few more beans and partial repackaging
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/social-networking/social-networking-service-model@163382 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3a4c65e88f
commit
f80d19ffc4
2
pom.xml
2
pom.xml
|
@ -18,7 +18,7 @@
|
|||
<description>Social networking service model classes</description>
|
||||
|
||||
<properties>
|
||||
<java-version>1.7</java-version>
|
||||
<java-version>1.8</java-version>
|
||||
<version.jersey>2.9</version.jersey>
|
||||
<gCubeSubsystem>social-networking</gCubeSubsystem>
|
||||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portal.socialnetworking.model.providers;
|
||||
package org.gcube.portal.socialnetworking.custom.serializers_deserializers;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portal.socialnetworking.model.input;
|
||||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
|
@ -1,10 +1,10 @@
|
|||
package org.gcube.portal.socialnetworking.model.input;
|
||||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.gcube.portal.databook.shared.JobStatusType;
|
||||
import org.gcube.portal.databook.shared.RunningJob;
|
||||
import org.gcube.portal.socialnetworking.model.providers.JobStatusTypeDeserializer;
|
||||
import org.gcube.portal.socialnetworking.custom.serializers_deserializers.JobStatusTypeDeserializer;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portal.socialnetworking.model.input;
|
||||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
@ -7,11 +7,13 @@ import java.util.List;
|
|||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
/**
|
||||
* Used for serialization of {@link org.gcube.common.homelibrary.home.workspace.sharing.WorkspaceMessage}
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Message {
|
||||
|
||||
@JsonProperty("id")
|
|
@ -0,0 +1,81 @@
|
|||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MyVRE
|
||||
{
|
||||
private String description;
|
||||
|
||||
private String name;
|
||||
|
||||
private String context;
|
||||
|
||||
private List<VREManager> managers;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public MyVRE() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param description
|
||||
* @param name
|
||||
* @param context
|
||||
*/
|
||||
public MyVRE(String description, String name, String context) {
|
||||
super();
|
||||
this.description = description;
|
||||
this.name = name;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public String getDescription ()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription (String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getName ()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName (String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getContext ()
|
||||
{
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext (String context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public List<VREManager> getManagers() {
|
||||
return managers;
|
||||
}
|
||||
|
||||
public void setManagers(List<VREManager> managers) {
|
||||
this.managers = managers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MyVRE [description=" + description + ", name=" + name
|
||||
+ ", context=" + context + ", managers=" + managers + "]";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portal.socialnetworking.model.input;
|
||||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portal.socialnetworking.model.input;
|
||||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* The user profile
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class UserProfile {
|
||||
|
||||
@JsonProperty("username")
|
||||
private String username;
|
||||
|
||||
@JsonProperty("roles")
|
||||
private List<String> roles;
|
||||
|
||||
@JsonProperty("avatar")
|
||||
private String avatar;
|
||||
|
||||
@JsonProperty("fullname")
|
||||
private String fullname;
|
||||
|
||||
public UserProfile() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param username
|
||||
* @param roles
|
||||
* @param avatar
|
||||
* @param fullname
|
||||
*/
|
||||
public UserProfile(String username, List<String> roles, String avatar,
|
||||
String fullname) {
|
||||
super();
|
||||
this.username = username;
|
||||
this.roles = roles;
|
||||
this.avatar = avatar;
|
||||
this.fullname = fullname;
|
||||
}
|
||||
|
||||
public String getUsername ()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername (String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public List<String> getRoles ()
|
||||
{
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles (List<String> roles)
|
||||
{
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public String getAvatar ()
|
||||
{
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar (String avatar)
|
||||
{
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getFullname ()
|
||||
{
|
||||
return fullname;
|
||||
}
|
||||
|
||||
public void setFullname (String fullname)
|
||||
{
|
||||
this.fullname = fullname;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "UserProfile [username = "+username+", roles = "+roles+", avatar = "+avatar+", fullname = "+fullname+"]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class UserProfileExtended extends UserProfile {
|
||||
|
||||
@JsonProperty("middle_name")
|
||||
private String middleName;
|
||||
|
||||
@JsonProperty("male")
|
||||
private boolean male;
|
||||
|
||||
@JsonProperty("location_industry")
|
||||
private String locationIndustry;
|
||||
|
||||
@JsonProperty("first_name")
|
||||
private String firstName;
|
||||
|
||||
@JsonProperty("email")
|
||||
private String email;
|
||||
|
||||
@JsonProperty("job_title")
|
||||
private String jobTitle;
|
||||
|
||||
@JsonProperty("last_name")
|
||||
private String lastName;
|
||||
|
||||
@JsonProperty("registration_date")
|
||||
private long registrationDate;
|
||||
|
||||
@JsonProperty("user_id")
|
||||
private long userId;
|
||||
|
||||
@JsonProperty("email_addresses")
|
||||
private List<String> emailAddresses;
|
||||
|
||||
public UserProfileExtended() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param username
|
||||
* @param roles
|
||||
* @param avatar
|
||||
* @param fullname
|
||||
*/
|
||||
public UserProfileExtended(String username, List<String> roles,
|
||||
String avatar, String fullname) {
|
||||
super(username, roles, avatar, fullname);
|
||||
}
|
||||
|
||||
public String getMiddleName() {
|
||||
return middleName;
|
||||
}
|
||||
|
||||
public void setMiddleName(String middleName) {
|
||||
this.middleName = middleName;
|
||||
}
|
||||
|
||||
public boolean isMale() {
|
||||
return male;
|
||||
}
|
||||
|
||||
public void setMale(boolean male) {
|
||||
this.male = male;
|
||||
}
|
||||
|
||||
public String getLocationIndustry() {
|
||||
return locationIndustry;
|
||||
}
|
||||
|
||||
public void setLocationIndustry(String locationIndustry) {
|
||||
this.locationIndustry = locationIndustry;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getJobTitle() {
|
||||
return jobTitle;
|
||||
}
|
||||
|
||||
public void setJobTitle(String jobTitle) {
|
||||
this.jobTitle = jobTitle;
|
||||
}
|
||||
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public long getRegistrationDate() {
|
||||
return registrationDate;
|
||||
}
|
||||
|
||||
public void setRegistrationDate(long registrationDate) {
|
||||
this.registrationDate = registrationDate;
|
||||
}
|
||||
|
||||
public long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public List<String> getEmailAddresses() {
|
||||
return emailAddresses;
|
||||
}
|
||||
|
||||
public void setEmailAddresses(List<String> emailAddresses) {
|
||||
this.emailAddresses = emailAddresses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserProfileExtended [UserProfile =" + super.toString() + ", middleName=" + middleName + ", male="
|
||||
+ male + ", locationIndustry=" + locationIndustry
|
||||
+ ", firstName=" + firstName + ", email=" + email
|
||||
+ ", jobTitle=" + jobTitle + ", lastName=" + lastName
|
||||
+ ", registrationDate=" + registrationDate + ", userId="
|
||||
+ userId + ", emailAddresses=" + emailAddresses + "]";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.gcube.portal.socialnetworking.model.beans;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class VREManager {
|
||||
|
||||
private String username;
|
||||
private String fullname;
|
||||
|
||||
public VREManager() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param username
|
||||
* @param fullname
|
||||
*/
|
||||
public VREManager(String username, String fullname) {
|
||||
super();
|
||||
this.username = username;
|
||||
this.fullname = fullname;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
public String getFullname() {
|
||||
return fullname;
|
||||
}
|
||||
public void setFullname(String fullname) {
|
||||
this.fullname = fullname;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VREManager [username=" + username + ", fullname=" + fullname
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue