ready for test application feeds

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@62314 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2012-12-13 15:43:42 +00:00
parent ab7478c31a
commit 3f19faca54
2 changed files with 15 additions and 11 deletions

View File

@ -123,22 +123,26 @@ public class ApplicationNewsManager extends SocialPortalBridge implements NewsMa
* {@inheritDoc}
*/
@Override
public boolean shareApplicationUpdate(String feedText, String uri) {
return getStoreInstance().saveAppFeed(buildFeed(feedText, uri, "", "", ""));
public boolean shareApplicationUpdate(String feedText, String uriParams) {
return getStoreInstance().saveAppFeed(buildFeed(feedText, uriParams, "", "", ""));
}
/**
* {@inheritDoc}
*/
@Override
public boolean shareApplicationUpdate(String feedText, String uri, String previewTitle, String previewDescription, String previewThumbnailUrl) {
return getStoreInstance().saveAppFeed(buildFeed(feedText, uri, previewTitle, previewDescription, previewThumbnailUrl));
public boolean shareApplicationUpdate(String feedText, String uriParams, String previewTitle, String previewDescription, String previewThumbnailUrl) {
return getStoreInstance().saveAppFeed(buildFeed(feedText, uriParams, previewTitle, previewDescription, previewThumbnailUrl));
}
private Feed buildFeed(String description, String uri, String previewTitle, String previewDescription, String previewThumbnailUrl) {
private Feed buildFeed(String description, String uriParams, String previewTitle, String previewDescription, String previewThumbnailUrl) {
String descToAdd = escapeHtml(description);
// String scope = getScopeByOrganizationId(""+aslSession.getGroupId());
String scope = "/gcube/devsec/devVRE";
String uri = application.getUrl();
//add the GET params if necessary
if (uriParams != null && uriParams.compareTo("") != 0)
uri += "?"+uriParams;
String scope = getScopeByOrganizationId(""+aslSession.getGroupId());
//String scope = "/gcube/devsec/devVRE";
Feed toReturn = new Feed(
UUID.randomUUID().toString(),
FeedType.PUBLISH,

View File

@ -22,20 +22,20 @@ public interface NewsManager {
* use to share an update from your application with a reference to the news subject
*
* @param description add a description for the update you are sharing
* @param uri the link to which the subject of this update is available
* @param uriParams the additional parameteres your application needs to open the subject of this update e.g. id=12345&type=foo
* @return true if the update is correctly delivered, false otherwise
*/
boolean shareApplicationUpdate(String description, String uri);
boolean shareApplicationUpdate(String description, String uriGETparams);
/**
* use to share an update from your application with a link preview
*
* @param applicationClass your servlet class name will be used ad unique identifier for your application with a link preview
* @param description add a description for the update you are sharing
* @param uri the link to which the subject of this update is available
* @param uriParams the additional parameteres your application needs to open the subject of this update 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 previewThumbnailUrl the image url to show in the preview
* @return true if the update is correctly delivered, false otherwise
*/
boolean shareApplicationUpdate(String description, String uri, String previewTitle, String previewDescription, String previewThumbnailUrl);
boolean shareApplicationUpdate(String description, String uriGETparams, String previewTitle, String previewDescription, String previewThumbnailUrl);
}