adapted for messages
This commit is contained in:
parent
5c79f453b2
commit
b25e841aff
4
pom.xml
4
pom.xml
|
@ -57,6 +57,10 @@
|
||||||
<version>[1.16.0, 2.0.0)</version>
|
<version>[1.16.0, 2.0.0)</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.common</groupId>
|
||||||
|
<artifactId>storagehub-model</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.ext</groupId>
|
<groupId>org.glassfish.jersey.ext</groupId>
|
||||||
<artifactId>jersey-bean-validation</artifactId>
|
<artifactId>jersey-bean-validation</artifactId>
|
||||||
|
|
|
@ -10,7 +10,7 @@ import javax.validation.constraints.Size;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
/**
|
/**
|
||||||
* Used for serialization of {@link org.gcube.common.homelibrary.home.workspace.sharing.WorkspaceMessage}
|
* Used for serialization
|
||||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||||
*/
|
*/
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package org.gcube.social_networking.socialnetworking.model.beans;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import org.gcube.common.storagehub.model.items.nodes.Owner;
|
||||||
|
/**
|
||||||
|
* Used for serialization
|
||||||
|
*/
|
||||||
|
public class MessageInbox extends org.gcube.common.storagehub.model.messages.Message {
|
||||||
|
|
||||||
|
//needed for serialization
|
||||||
|
public MessageInbox() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
String body = (getBody() != null && getBody().length() > 10) ? getBody().substring(0, 9) + " ..." : "empty or short body";
|
||||||
|
String usernameSender = getSender() != null ? getSender().getUserName() : "uknwnown";
|
||||||
|
return "Message getSenderUsername()=" + usernameSender + ", getSubject()=" + getSubject() + ", getBody()=" + body + ", isRead()=" + isRead()
|
||||||
|
+ ", isOpened()=" + isOpened() + ", getAddresses()=" + Arrays.toString(getAddresses())
|
||||||
|
+ ", getCreationTime()=" + getCreationTime() + ", getId()="
|
||||||
|
+ getId() + ", getName()=" + getName() + ", getPrimaryType()=" + getPrimaryType() + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue