Compare commits

...

1 Commits

Author SHA1 Message Date
Massimiliano Assante 3af13a07e8 comm 2022-05-06 15:14:16 +02:00
5 changed files with 72 additions and 13 deletions

View File

@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [v1.17.0-SNAPSHOT] - 2022-04-20 ## [v1.17.0-SNAPSHOT] - 2022-04-20
- Added support for Catalogue notifications
- Ported to git - Ported to git
## [v1.16.1] - 2018-03-07 ## [v1.16.1] - 2018-03-07

View File

@ -24,6 +24,8 @@
</scm> </scm>
<properties> <properties>
<gwtVersion>2.8.1</gwtVersion> <gwtVersion>2.8.1</gwtVersion>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties> </properties>
@ -32,7 +34,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>3.7.0-SNAPSHOT</version> <version>3.6.3</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -153,5 +155,4 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -1413,10 +1413,10 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override @Override
public List<Comment> getAllCommentByFeed(String feedid) { public List<Comment> getAllCommentByPost(String postId) {
List<Comment> toReturn = new ArrayList<Comment>(); List<Comment> toReturn = new ArrayList<Comment>();
PreparedIndexExpression<String, String> clause = cf_Comments.newIndexClause().whereColumn("Feedid").equals().value(feedid); PreparedIndexExpression<String, String> clause = cf_Comments.newIndexClause().whereColumn("Feedid").equals().value(postId);
OperationResult<Rows<String, String>> result; OperationResult<Rows<String, String>> result;
try { try {
result = conn.getKeyspace().prepareQuery(cf_Comments) result = conn.getKeyspace().prepareQuery(cf_Comments)
@ -1458,6 +1458,14 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
} }
return toReturn; return toReturn;
} }
/**
* {@inheritDoc}
*/
@Override
@Deprecated
public List<Comment> getAllCommentByFeed(String feedid) {
return getAllCommentByPost(feedid);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
@ -2497,6 +2505,30 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
else if (type.compareTo("JOB_COMPLETED_OK") == 0) { else if (type.compareTo("JOB_COMPLETED_OK") == 0) {
return NotificationType.JOB_COMPLETED_OK; return NotificationType.JOB_COMPLETED_OK;
} }
else if (type.compareTo("CAT_ITEM_SUBMITTED") == 0) {
return NotificationType.CAT_ITEM_SUBMITTED;
}
else if (type.compareTo("CAT_ITEM_REJECTED") == 0) {
return NotificationType.CAT_ITEM_REJECTED;
}
else if (type.compareTo("CAT_ITEM_PUBLISHED") == 0) {
return NotificationType.CAT_ITEM_PUBLISHED;
}
else if (type.compareTo("CAT_ITEM_UPDATED") == 0) {
return NotificationType.CAT_ITEM_UPDATED;
}
else if (type.compareTo("CAT_ITEM_DELETE") == 0) {
return NotificationType.CAT_ITEM_DELETE;
}
else if (type.compareTo("TDM_TAB_RESOURCE_SHARE") == 0) {
return NotificationType.TDM_TAB_RESOURCE_SHARE;
}
else if (type.compareTo("TDM_RULE_SHARE") == 0) {
return NotificationType.TDM_RULE_SHARE;
}
else if (type.compareTo("TDM_TEMPLATE_SHARE") == 0) {
return NotificationType.TDM_TEMPLATE_SHARE;
}
else if (type.compareTo("DOCUMENT_WORKFLOW_EDIT") == 0) { else if (type.compareTo("DOCUMENT_WORKFLOW_EDIT") == 0) {
return NotificationType.DOCUMENT_WORKFLOW_EDIT; return NotificationType.DOCUMENT_WORKFLOW_EDIT;
} }
@ -2518,15 +2550,6 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
else if (type.compareTo("DOCUMENT_WORKFLOW_FIRST_STEP_REQUEST_INVOLVMENT") == 0) { else if (type.compareTo("DOCUMENT_WORKFLOW_FIRST_STEP_REQUEST_INVOLVMENT") == 0) {
return NotificationType.DOCUMENT_WORKFLOW_FIRST_STEP_REQUEST_INVOLVMENT; return NotificationType.DOCUMENT_WORKFLOW_FIRST_STEP_REQUEST_INVOLVMENT;
} }
else if (type.compareTo("TDM_TAB_RESOURCE_SHARE") == 0) {
return NotificationType.TDM_TAB_RESOURCE_SHARE;
}
else if (type.compareTo("TDM_RULE_SHARE") == 0) {
return NotificationType.TDM_RULE_SHARE;
}
else if (type.compareTo("TDM_TEMPLATE_SHARE") == 0) {
return NotificationType.TDM_TEMPLATE_SHARE;
}
else if (type.compareTo("GENERIC") == 0) { else if (type.compareTo("GENERIC") == 0) {
return NotificationType.GENERIC; return NotificationType.GENERIC;
} }

View File

@ -298,10 +298,17 @@ public interface DatabookStore {
*/ */
boolean addComment(Comment comment) throws FeedIDNotFoundException; boolean addComment(Comment comment) throws FeedIDNotFoundException;
/** /**
* @deprecated use {@link #getAllCommentByPost()} instead.
* @param feedid feed identifier * @param feedid feed identifier
* return all the comments belonging to the feedid * return all the comments belonging to the feedid
*/ */
@Deprecated
List<Comment> getAllCommentByFeed(String feedid); List<Comment> getAllCommentByFeed(String feedid);
/**
* @param feedid feed identifier
* return all the comments belonging to the feedid
*/
List<Comment> getAllCommentByPost(String postId);
/** /**
* @param userid user identifier * @param userid user identifier
* @param timeInMillis time in milliseconds from which you want to start retrieve the feeds * @param timeInMillis time in milliseconds from which you want to start retrieve the feeds

View File

@ -12,14 +12,17 @@ public enum NotificationType {
/** /**
* use to notify a user he got a Tabular Resource shared * use to notify a user he got a Tabular Resource shared
*/ */
@Deprecated
TDM_TAB_RESOURCE_SHARE, TDM_TAB_RESOURCE_SHARE,
/** /**
* use to notify a user he got a TDM Rule shared * use to notify a user he got a TDM Rule shared
*/ */
@Deprecated
TDM_RULE_SHARE, TDM_RULE_SHARE,
/** /**
* use to notify a user he got a TDM Templated shared * use to notify a user he got a TDM Templated shared
*/ */
@Deprecated
TDM_TEMPLATE_SHARE, TDM_TEMPLATE_SHARE,
/** /**
* use to notify a user he got a workspace folder shared * use to notify a user he got a workspace folder shared
@ -85,6 +88,26 @@ public enum NotificationType {
* use to notify a user he got a message * use to notify a user he got a message
*/ */
MESSAGE, MESSAGE,
/**
* catalogue, use to notify someone submits an item for consideration
*/
CAT_ITEM_SUBMITTED,
/**
* catalogue, use to notify someone rejected a submitted item
*/
CAT_ITEM_REJECTED,
/**
* catalogue, use to notify someone published an item
*/
CAT_ITEM_PUBLISHED,
/**
* catalogue, use to notify someone updated an item
*/
CAT_ITEM_UPDATED,
/**
* catalogue, use to notify someone removed an item
*/
CAT_ITEM_DELETE,
/** /**
* use to notify every user of a VRE/Group that the post was made * use to notify every user of a VRE/Group that the post was made
*/ */
@ -92,18 +115,22 @@ public enum NotificationType {
/** /**
* use to notify a user that someone in his VRE created a new Event in the Calendar * use to notify a user that someone in his VRE created a new Event in the Calendar
*/ */
@Deprecated
CALENDAR_ADDED_EVENT, CALENDAR_ADDED_EVENT,
/** /**
* use to notify a user that someone in his VRE updated an Event in the Calendar * use to notify a user that someone in his VRE updated an Event in the Calendar
*/ */
@Deprecated
CALENDAR_UPDATED_EVENT, CALENDAR_UPDATED_EVENT,
/** /**
* use to notify a user that someone in his VRE deleted an Event in the Calendar * use to notify a user that someone in his VRE deleted an Event in the Calendar
*/ */
@Deprecated
CALENDAR_DELETED_EVENT, CALENDAR_DELETED_EVENT,
/** /**
* use to notify a user he got a connections request * use to notify a user he got a connections request
*/ */
@Deprecated
REQUEST_CONNECTION, REQUEST_CONNECTION,
/** /**
* use to notify a user he got a job completed ok * use to notify a user he got a job completed ok