adapted for messages
This commit is contained in:
parent
5c79f453b2
commit
b25e841aff
6
pom.xml
6
pom.xml
|
@ -57,6 +57,10 @@
|
|||
<version>[1.16.0, 2.0.0)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>storagehub-model</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.ext</groupId>
|
||||
<artifactId>jersey-bean-validation</artifactId>
|
||||
|
@ -113,7 +117,7 @@
|
|||
<target>${java_version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -10,7 +10,7 @@ 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}
|
||||
* Used for serialization
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
@ -141,4 +141,4 @@ public class Message {
|
|||
+ sendTime + ", read=" + read + ", attachmentIds="
|
||||
+ attachmentIds + ", recipients=" + recipients + "]";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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