Initial import.
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@62096 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7631f4728a
commit
ee0957c7e1
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/GCubeSocialAstyanax"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>applicationSupportLayerSocial</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,5 @@
|
|||
#Fri Dec 07 12:41:11 CET 2012
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,6 @@
|
|||
#Fri Dec 07 14:00:07 CET 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,5 @@
|
|||
#Fri Dec 07 12:41:10 CET 2012
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
|
@ -0,0 +1,138 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslsocial</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Social Portal ASL Extension</name>
|
||||
|
||||
<properties>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<maven.compiler.source>1.6</maven.compiler.source>
|
||||
<maven.compiler.target>1.6</maven.compiler.target>
|
||||
|
||||
<!-- Don't let your Mac use a crazy non-standard encoding -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12</version>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-profile</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>profile.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>servicearchive</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>gcf</artifactId>
|
||||
<version>[1.4.0,1.5.0]</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslcore</artifactId>
|
||||
<version>3.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>home-library</artifactId>
|
||||
<version>4.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,57 @@
|
|||
package org.gcube.applicationsupportlayer.social;
|
||||
|
||||
import org.gcube.application.framework.core.session.ASLSession;
|
||||
import org.gcube.common.core.utils.logging.GCUBEClientLog;
|
||||
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
|
||||
import org.gcube.portal.databook.server.DatabookStore;
|
||||
import org.gcube.portal.databook.shared.NotificationType;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
||||
/**
|
||||
*
|
||||
* @author Massimiliano Assante, ISTI-CNR
|
||||
* @version 0.1 Dec 2012
|
||||
*
|
||||
*/
|
||||
public class AslNotificationManager implements NotificationManager {
|
||||
GCUBEClientLog log = new GCUBEClientLog(AslNotificationManager.class);
|
||||
|
||||
private ASLSession session;
|
||||
private DatabookStore store;
|
||||
|
||||
public AslNotificationManager(ASLSession session) {
|
||||
this.session = session;
|
||||
store = new DBCassandraAstyanaxImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyFolderSharing(String userIdToNotify, WorkspaceFolder sharedFolder) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyFolderAddedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String newAddedUserId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyFolderRemovedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String removedUserId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyAddedItem(String userIdToNotify, WorkspaceItem newItem) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem removedItem) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyUpdatedItem(String userIdToNotify, WorkspaceItem updatedItem) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package org.gcube.applicationsupportlayer.social;
|
||||
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceFolder;
|
||||
import org.gcube.portlets.user.homelibrary.home.workspace.WorkspaceItem;
|
||||
/**
|
||||
*
|
||||
* @author Massimiliano Assante, ISTI-CNR
|
||||
* @version 0.1 Dec 2012
|
||||
*
|
||||
*/
|
||||
public interface NotificationManager {
|
||||
/**
|
||||
* use to notify a user he got a workspace folder shared
|
||||
*
|
||||
* @param userIdToNotify the user you want to notify
|
||||
* @param sharedFolder the shared {@link WorkspaceFolder}
|
||||
* @return true id the notification is correctly delivered, false otherwise
|
||||
*/
|
||||
boolean notifyFolderSharing(String userIdToNotify, WorkspaceFolder sharedFolder);
|
||||
/**
|
||||
* use to notify a user that a new user was added in on of his workspace shared folder
|
||||
*
|
||||
* @param userIdToNotify the user you want to notify
|
||||
* @param sharedFolder the shared {@link WorkspaceFolder}
|
||||
* @param newAddedUserId the new user that was added
|
||||
* @return true id the notification is correctly delivered, false otherwise
|
||||
*/
|
||||
boolean notifyFolderAddedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String newAddedUserId);
|
||||
/**
|
||||
* use to notify a user that an existing user was removed from one of his workspace shared folder
|
||||
*
|
||||
* @param userIdToNotify the user you want to notify
|
||||
* @param sharedFolder the shared {@link WorkspaceFolder}
|
||||
* @param removedUserId the new user that was removed
|
||||
* @return true id the notification is correctly delivered, false otherwise
|
||||
*/
|
||||
boolean notifyFolderRemovedUser(String userIdToNotify, WorkspaceFolder sharedFolder, String removedUserId);
|
||||
/**
|
||||
* use to notify a user he got a workspace item new in some of his workspace shared folder
|
||||
* @param userIdToNotify
|
||||
* @param newItem the new shared {@link WorkspaceItem}
|
||||
* @return true id the notification is correctly delivered, false otherwise
|
||||
*/
|
||||
boolean notifyAddedItem(String userIdToNotify, WorkspaceItem newItem);
|
||||
/**
|
||||
* use to notify a user he got a workspace item deleted from one of his workspace shared folder
|
||||
* @param userIdToNotify
|
||||
* @param removedItem the removed {@link WorkspaceItem}
|
||||
* @return true id the notification is correctly delivered, false otherwise
|
||||
*/
|
||||
boolean notifyRemovedItem(String userIdToNotify, WorkspaceItem removedItem);
|
||||
/**
|
||||
* use to notify a user he got a workspace item updated from one of his workspace shared folder
|
||||
* @param userIdToNotify
|
||||
* @param newItem the new shared {@link WorkspaceItem}
|
||||
* @return true id the notification is correctly delivered, false otherwise
|
||||
*/
|
||||
boolean notifyUpdatedItem(String userIdToNotify, WorkspaceItem updatedItem);
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package org.gcube.applicationsupportlayer.social;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue