added imageType, refactore notification manager to old name

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@65280 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2012-12-19 15:39:27 +00:00
parent 2853d2bee8
commit f89aef3d0e
9 changed files with 63 additions and 4 deletions

View File

@ -4,6 +4,5 @@
<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="/usermanagement-core.HEAD"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -145,5 +145,10 @@
<artifactId>social-library</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +1,6 @@
package org.gcube.applicationsupportlayer.social;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -8,6 +9,7 @@ import javax.servlet.http.HttpServlet;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.applicationsupportlayer.social.ex.ApplicationProfileNotFoundException;
import org.gcube.applicationsupportlayer.social.imageType.ImageType;
import org.gcube.common.core.contexts.GHNContext;
import org.gcube.common.core.informationsystem.client.ISClient;
import org.gcube.common.core.informationsystem.client.XMLResult;
@ -172,4 +174,11 @@ public class ApplicationNewsManager extends SocialPortalBridge implements NewsMa
true);
return toReturn;
}
@Override
public boolean shareApplicationUpdate(String feedtext, String uriGETparams,
String previewTitle, String previewDescription,
InputStream previewThumbnailInputStream, ImageType imageExtension) {
// TODO Auto-generated method stub
return false;
}
}

View File

@ -13,9 +13,9 @@ import org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessa
*
* use to notify users from within your application
*/
public class UserNotificationsManager extends SocialPortalBridge implements NotificationsManager {
public class AslNotificationManager extends SocialPortalBridge implements NotificationManager {
public UserNotificationsManager(ASLSession session) {
public AslNotificationManager(ASLSession session) {
super(session);
}
/**

View File

@ -1,5 +1,9 @@
package org.gcube.applicationsupportlayer.social;
import java.io.InputStream;
import org.gcube.applicationsupportlayer.social.imageType.ImageType;
/**
@ -35,4 +39,16 @@ public interface NewsManager {
* @return true if the update is correctly delivered, false otherwise
*/
boolean shareApplicationUpdate(String feedtext, String uriGETparams, String previewTitle, String previewDescription, String previewThumbnailUrl);
/**
* use to share an update from your application with a reference to the news object and with a link preview passing its input stream
*
* @param feedtext add a description for the update you are sharing
* @param uriGETparams additional parameters if your application supports the direct opening of of this update's object e.g. id=12345&type=foo
* @param previewTitle the title to show in the preview
* @param previewDescription the description to show in the preview
* @param previewThumbnailInputStream the image url Input Stream to show in the preview
* @param imageExtension the image Extension
* @return true if the update is correctly delivered, false otherwise
*/
boolean shareApplicationUpdate(String feedtext, String uriGETparams, String previewTitle, String previewDescription, InputStream previewThumbnailInputStream, ImageType imageExtension);
}

View File

@ -11,7 +11,7 @@ import org.gcube.portlets.user.homelibrary.home.workspace.sharing.WorkspaceMessa
* @version 0.1 Dec 2012
*
*/
public interface NotificationsManager {
public interface NotificationManager {
/**
* use to notify a user he got a workspace folder shared
*

View File

@ -0,0 +1,5 @@
package org.gcube.applicationsupportlayer.social.imageType;
public enum ImageType {
JPG, GIF, PNG, TIFF, PDF, BMP;
}

25
target/profile.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID></ID>
<Type>Library</Type>
<Profile>
<Description>ASL Social Library</Description>
<Class>ApplicationSupportLayer</Class>
<Name>aslsocial</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>aslsocial</Name>
<Version>0.1.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslsocial</artifactId>
<version>0.1.0-SNAPSHOT</version>
</MavenCoordinates>
<Files>
<File>aslsocial-0.1.0-SNAPSHOT.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>