ApplicationNewsManager (Social Portal ASL Extension 1.1.0-4.1.0-132891 API)
Date: 2016-10-27

org.gcube.applicationsupportlayer.social

## Class ApplicationNewsManager

- java.lang.Object
- - org.gcube.applicationsupportlayer.social.SocialPortalBridge
  - - org.gcube.applicationsupportlayer.social.ApplicationNewsManager

- All Implemented Interfaces:
    NewsManager

      public class ApplicationNewsManager
      extends SocialPortalBridge
      implements NewsManager

  Author:
    Massimiliano Assante, ISTI-CNR use to share updates from within your applicationProfile, the update will be published in the Users News Feed belonging to the VRE your applicationProfile runs into

- - ### Field Summary

    - ### Fields inherited from class org.gcube.applicationsupportlayer.social.SocialPortalBridge

      `applicationProfile, currGroupName, currScope, currUser`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationNewsManager(String scope, SocialNetworkingUser currUser, String portletClassName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `shareApplicationUpdate(String feedText)` use to share an update from your application
    `boolean` | `shareApplicationUpdate(String feedText, String uriParams)` use to share an update from your application with a reference to the news object
    `boolean` | `shareApplicationUpdate(String feedText, String uriParams, String previewTitle, String previewDescription, InputStream previewThumbnailInputStream, org.gcube.portal.databook.shared.ImageType imageExtension)` use to share an update from your application with a reference to the news object and with a link preview passing its input stream
    `boolean` | `shareApplicationUpdate(String feedText, String uriParams, 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

    - ### Methods inherited from class org.gcube.applicationsupportlayer.social.SocialPortalBridge

      `escapeHtml, getApplicationProfile, getScopeByVREId, getStoreInstance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ApplicationNewsManager

          public ApplicationNewsManager(String scope,
                                        SocialNetworkingUser currUser,
                                        String portletClassName)

      Parameters:
        `scope` - the current scope
        `currUser` - an instance of `SocialNetworkingUser` filled with the required user data
        `portletClassName` - your portlet class name will be used ad unique identifier for your applicationProfile

  - ### Method Detail

    - #### shareApplicationUpdate

          public boolean shareApplicationUpdate(String feedText)

      use to share an update from your application
      Specified by:
        `shareApplicationUpdate` in interface `NewsManager`
      Parameters:
        `feedText` - add a description for the update you are sharing
      Returns:
        true if the update is correctly delivered, false otherwise

    - #### shareApplicationUpdate

          public boolean shareApplicationUpdate(String feedText,
                                                String uriParams)

      use to share an update from your application with a reference to the news object
      Specified by:
        `shareApplicationUpdate` in interface `NewsManager`
      Parameters:
        `feedText` - description for the update you are sharing
        `uriParams` - additional parameters if your application supports the direct opening of of this update's object e.g. id=12345&type=foo
      Returns:
        true if the update is correctly delivered, false otherwise

    - #### shareApplicationUpdate

          public boolean shareApplicationUpdate(String feedText,
                                                String uriParams,
                                                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
      Specified by:
        `shareApplicationUpdate` in interface `NewsManager`
      Parameters:
        `feedText` - add a description for the update you are sharing
        `uriParams` - additional parameters if your application supports the direct opening of of this update's object e.g. id=12345&type=foo
        `previewTitle` - the title to show in the preview
        `previewDescription` - the description to show in the preview
        `previewThumbnailUrl` - the image url to show in the preview
      Returns:
        true if the update is correctly delivered, false otherwise

    - #### shareApplicationUpdate

          public boolean shareApplicationUpdate(String feedText,
                                                String uriParams,
                                                String previewTitle,
                                                String previewDescription,
                                                InputStream previewThumbnailInputStream,
                                                org.gcube.portal.databook.shared.ImageType imageExtension)

      use to share an update from your application with a reference to the news object and with a link preview passing its input stream
      Specified by:
        `shareApplicationUpdate` in interface `NewsManager`
      Parameters:
        `feedText` - add a description for the update you are sharing
        `uriParams` - additional parameters if your application supports the direct opening of of this update's object e.g. id=12345&type=foo
        `previewTitle` - the title to show in the preview
        `previewDescription` - the description to show in the preview
        `previewThumbnailInputStream` - the image url Input Stream to show in the preview
        `imageExtension` - the image Extension
      Returns:
        true if the update is correctly delivered, false otherwise

Copyright © 2016. All Rights Reserved.