minor fixes
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/social-networking/social-networking-service-model@163345 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9a74892f42
commit
1dbc072f16
|
@ -18,7 +18,7 @@
|
||||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
|
4
.project
4
.project
|
@ -16,12 +16,12 @@
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<faceted-project>
|
<faceted-project>
|
||||||
<installed facet="java" version="1.7"/>
|
|
||||||
<installed facet="jst.utility" version="1.0"/>
|
<installed facet="jst.utility" version="1.0"/>
|
||||||
|
<installed facet="java" version="1.8"/>
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
disabled=06target
|
||||||
|
eclipse.preferences.version=1
|
19
pom.xml
19
pom.xml
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java-version>1.7</java-version>
|
<java-version>1.7</java-version>
|
||||||
<version.jersey>2.25.1</version.jersey>
|
<version.jersey>2.9</version.jersey>
|
||||||
<gCubeSubsystem>social-networking</gCubeSubsystem>
|
<gCubeSubsystem>social-networking</gCubeSubsystem>
|
||||||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||||
|
@ -37,6 +37,13 @@
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.distribution</groupId>
|
||||||
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
@ -50,7 +57,11 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>social-networking-library</artifactId>
|
<artifactId>social-networking-library</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT,)</version>
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.common</groupId>
|
||||||
|
<artifactId>home-library</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -96,10 +107,6 @@
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
|
||||||
<source>1.7</source>
|
|
||||||
<target>1.7</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -17,6 +17,10 @@ public class ApplicationId {
|
||||||
@Size(message="app_id cannot be empty", min=1)
|
@Size(message="app_id cannot be empty", min=1)
|
||||||
private String appId;
|
private String appId;
|
||||||
|
|
||||||
|
public ApplicationId() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
public ApplicationId(String appId) {
|
public ApplicationId(String appId) {
|
||||||
super();
|
super();
|
||||||
this.appId = appId;
|
this.appId = appId;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.gcube.portal.databook.shared.JobStatusType;
|
||||||
import org.gcube.portal.databook.shared.RunningJob;
|
import org.gcube.portal.databook.shared.RunningJob;
|
||||||
import org.gcube.portal.socialnetworking.model.providers.JobStatusTypeDeserializer;
|
import org.gcube.portal.socialnetworking.model.providers.JobStatusTypeDeserializer;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
@ -42,6 +43,10 @@ public class JobNotificationBean {
|
||||||
@JsonProperty("status_message")
|
@JsonProperty("status_message")
|
||||||
private String statusMessage;
|
private String statusMessage;
|
||||||
|
|
||||||
|
public JobNotificationBean() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recipient
|
* @param recipient
|
||||||
* @param jobId
|
* @param jobId
|
||||||
|
@ -109,6 +114,7 @@ public class JobNotificationBean {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
public RunningJob getRunningJob(){
|
public RunningJob getRunningJob(){
|
||||||
|
|
||||||
return new RunningJob(jobId, jobName, status, statusMessage, serviceName);
|
return new RunningJob(jobId, jobName, status, statusMessage, serviceName);
|
||||||
|
@ -123,8 +129,8 @@ public class JobNotificationBean {
|
||||||
+ (jobName != null ? "jobName=" + jobName + ", " : "")
|
+ (jobName != null ? "jobName=" + jobName + ", " : "")
|
||||||
+ (serviceName != null ? "serviceName=" + serviceName + ", "
|
+ (serviceName != null ? "serviceName=" + serviceName + ", "
|
||||||
: "")
|
: "")
|
||||||
+ (status != null ? "status=" + status + ", " : "")
|
+ (status != null ? "status=" + status + ", " : "")
|
||||||
+ (statusMessage != null ? "statusMessage=" + statusMessage
|
+ (statusMessage != null ? "statusMessage=" + statusMessage
|
||||||
: "") + "]";
|
: "") + "]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,14 +19,6 @@ public class MessageInputBean implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -1317811686036127456L;
|
private static final long serialVersionUID = -1317811686036127456L;
|
||||||
|
|
||||||
/*@JsonProperty("sender")
|
|
||||||
@ApiModelProperty(
|
|
||||||
example="andrea.rossi",
|
|
||||||
required=false,
|
|
||||||
hidden=true, // do not show this information
|
|
||||||
value="The sender of the message. If not specified is the gcube-token's owner")
|
|
||||||
private String sender;*/
|
|
||||||
|
|
||||||
@JsonProperty("body")
|
@JsonProperty("body")
|
||||||
@NotNull(message="body cannot be missing")
|
@NotNull(message="body cannot be missing")
|
||||||
@Size(min=1, message="body cannot be empty")
|
@Size(min=1, message="body cannot be empty")
|
||||||
|
@ -43,6 +35,10 @@ public class MessageInputBean implements Serializable {
|
||||||
@Valid // validate recursively
|
@Valid // validate recursively
|
||||||
private ArrayList<Recipient> recipients;
|
private ArrayList<Recipient> recipients;
|
||||||
|
|
||||||
|
public MessageInputBean(){
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
public MessageInputBean(String body, String subject,
|
public MessageInputBean(String body, String subject,
|
||||||
ArrayList<Recipient> recipients) {
|
ArrayList<Recipient> recipients) {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -42,6 +42,10 @@ public class PostInputBean implements Serializable{
|
||||||
@JsonProperty("params")
|
@JsonProperty("params")
|
||||||
private String params;
|
private String params;
|
||||||
|
|
||||||
|
public PostInputBean(){
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
public PostInputBean(String text, String previewtitle,
|
public PostInputBean(String text, String previewtitle,
|
||||||
String previewdescription, String previewhost, String previewurl,
|
String previewdescription, String previewhost, String previewurl,
|
||||||
String httpimageurl, boolean enablenotification, String params) {
|
String httpimageurl, boolean enablenotification, String params) {
|
||||||
|
|
|
@ -24,6 +24,10 @@ public class Recipient implements Serializable{
|
||||||
@Size(min=1, message="recipient id must not be empty")
|
@Size(min=1, message="recipient id must not be empty")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
public Recipient(){
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
public Recipient(String id) {
|
public Recipient(String id) {
|
||||||
super();
|
super();
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package org.gcube.portal.socialnetworking.model.output;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.jcr.ItemNotFoundException;
|
||||||
|
|
||||||
|
import org.gcube.common.homelibrary.home.User;
|
||||||
|
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
|
||||||
|
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
|
||||||
|
import org.gcube.common.homelibrary.home.workspace.exceptions.WrongDestinationException;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
/**
|
||||||
|
* Used for serialization/deserialization of {@link org.gcube.common.homelibrary.home.workspace.sharing.WorkspaceMessage}
|
||||||
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||||
|
*/
|
||||||
|
public interface MessageOutputBeanMixIn {
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
String getId();
|
||||||
|
|
||||||
|
@JsonProperty("subject")
|
||||||
|
String getSubject();
|
||||||
|
|
||||||
|
@JsonProperty("body")
|
||||||
|
String getBody();
|
||||||
|
|
||||||
|
@JsonProperty("sender")
|
||||||
|
User getSender();
|
||||||
|
|
||||||
|
@JsonProperty("send_time")
|
||||||
|
Calendar getSendTime();
|
||||||
|
|
||||||
|
@JsonProperty("read")
|
||||||
|
boolean isRead();
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
void setStatus(boolean status) throws InternalErrorException;
|
||||||
|
|
||||||
|
@JsonProperty("attachments_ids")
|
||||||
|
List<String> getAttachmentsIds();
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
List<WorkspaceItem> getAttachments() throws InternalErrorException;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
WorkspaceItem saveAttachment(String attachmentId, String destinationFolderId)
|
||||||
|
throws InternalErrorException, WrongDestinationException,
|
||||||
|
ItemNotFoundException;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
void open() throws InternalErrorException;
|
||||||
|
|
||||||
|
@JsonProperty("recipients")
|
||||||
|
List<String> getAddresses();
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
List<String> getCopyAttachmentsIds();
|
||||||
|
|
||||||
|
}
|
|
@ -3,19 +3,17 @@ package org.gcube.portal.socialnetworking.model.output;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response bean
|
* Response bean with real result of type T.
|
||||||
* @author Costantino Perciante at ISTI-CNR
|
* @author Costantino Perciante at ISTI-CNR
|
||||||
* (costantino.perciante@isti.cnr.it)
|
* (costantino.perciante@isti.cnr.it)
|
||||||
*/
|
*/
|
||||||
public class ResponseBean implements Serializable {
|
public class ResponseBean <T> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -2725238162673879658L;
|
private static final long serialVersionUID = -2725238162673879658L;
|
||||||
|
|
||||||
private boolean success;
|
private boolean success;
|
||||||
|
|
||||||
private String message;
|
private String message;
|
||||||
|
private T result;
|
||||||
private Object result;
|
|
||||||
|
|
||||||
public ResponseBean() {
|
public ResponseBean() {
|
||||||
super();
|
super();
|
||||||
|
@ -27,7 +25,7 @@ public class ResponseBean implements Serializable {
|
||||||
* @param result
|
* @param result
|
||||||
* @param help
|
* @param help
|
||||||
*/
|
*/
|
||||||
public ResponseBean(boolean success, String message, Object result) {
|
public ResponseBean(boolean success, String message, T result) {
|
||||||
super();
|
super();
|
||||||
this.success = success;
|
this.success = success;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
@ -55,12 +53,12 @@ public class ResponseBean implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Object getResult() {
|
public T getResult() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setResult(Object result) {
|
public void setResult(T result) {
|
||||||
this.result = result;
|
this.result = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue