adapted to be built widh JDK 11
This commit is contained in:
parent
1ed2f32c49
commit
c9f542fb8f
|
@ -25,8 +25,9 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
|
|
|
@ -11,6 +11,6 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
13
pom.xml
13
pom.xml
|
@ -16,7 +16,7 @@
|
|||
<name>social-networking-library-ws</name>
|
||||
<description>Rest interface for the social networking library.</description>
|
||||
<properties>
|
||||
<java-version>1.8</java-version>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<enunciate.version>2.14.0</enunciate.version>
|
||||
<jackson.version>2.8.11</jackson.version>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>1.8.2</version>
|
||||
<version>1.9.7</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
@ -213,7 +213,12 @@
|
|||
<artifactId>authorization-client</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
@ -320,7 +325,7 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<version>1.14.0</version>
|
||||
<configuration>
|
||||
<complianceLevel>1.8</complianceLevel>
|
||||
<source>1.8</source>
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.gcube.portal.databook.server.DatabookStore;
|
|||
import org.gcube.portal.databook.shared.Comment;
|
||||
import org.gcube.portal.databook.shared.EnhancedFeed;
|
||||
import org.gcube.portal.databook.shared.Feed;
|
||||
import org.gcube.portal.databook.shared.Post;
|
||||
import org.gcube.portal.social.networking.liferay.ws.GroupManagerWSBuilder;
|
||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
|
@ -92,6 +93,7 @@ public class Filters {
|
|||
* @param context
|
||||
* @throws Exception
|
||||
*/
|
||||
@Deprecated
|
||||
public static void filterFeedsPerContext(List<Feed> feeds, String context) throws Exception {
|
||||
|
||||
List<String> contexts = getContexts(context);
|
||||
|
@ -104,6 +106,27 @@ public class Filters {
|
|||
iterator.remove();
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Given a list of not filtered posts, the methods remove posts unaccessible in this scope.
|
||||
* If the initial context is the root: all posts are returned;
|
||||
* If the initial context is a VO: posts for vres within the vo are returned;
|
||||
* If the initial context is a vre: posts of the vre are returned;
|
||||
* @param context
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void filterPostsPerContext(List<Post> posts, String context) throws Exception {
|
||||
|
||||
List<String> contexts = getContexts(context);
|
||||
|
||||
// filter
|
||||
Iterator<Post> iterator = posts.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Post post = (Post) iterator.next();
|
||||
if(!contexts.contains(post.getVreid()))
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue