Skip to main content link. Accesskey S
  • HCL Logo
  • HCL Connections On-Premise Wiki
  • THIS WIKI IS READ-ONLY.
  • HCL Forums and Blogs
  • Home
  • API Documentation
Search
Learning Center > Education > Synchronizing Community folders to Mini PC/ Smart TV in Connections V5.0
  • Share Show Menu▼

Recent articles by this author

Quick customization and rebranding of Connections V5.0

In this article, you will gain an understanding of how you can quickly customize and rebrand Connections for your organization.

Synchronizing Community folders to Mini PC/ Smart TV in Connections V5.0

In this article, you will gain an understanding of how you can synchronize Connections V5.0 community files and folders to client devices programmatically, by which you can broadcast files of various types. You will also learn how you can use Connections APIs to fetch desired atom feed ...
Learning Center articleSynchronizing Community folders to Mini PC/ Smart TV in Connections V5.0
Added by ~Rex Kifoosonings | Edited by ~Rex Kifoosonings on October 12, 2015 | Version 4
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: IBM Connections V5.0, Collaboration, Folder synchronize, Mini TV, Android TV, Connections API

In this article, you will gain an understanding of how you can synchronize IBM Connections V5.0 community files and folders to client devices programmatically, by which you can broadcast files of various types. You will also learn how you can use IBM Connections APIs to fetch desired atom feed from its components and achieve the desired result

 

In our use case we will take an example of broadcast requirement of Branding & Marketing (customer stories/employee stories etc.), e-Learning and disseminating information on organization-wide initiatives in branches on large scrolling screens and videos on large-screen displays from bank head office based on the branch local language and business preferences.

 

Before you start, you must have following software installed:

 

  • IBM Connections V5.0
  • Eclipse IDE
  • Social Business Toolkit

 

 

Consider following broadcast structure where we have IBM Connections community’s setup for different languages and need to synchronize files and folders from these communities to the specific branches.

 

To achieve this we will create an application which will be scheduled in the branch offices to run at specific time and synchronize the files and folders from the community.

 

Steps we will follow:

 

  1. Fetch my communities feed from IBM Connections
  2. Fetch files and folders feed from the individual community
  3. Download the files and folders to the device

 

  1. Fetch my communities feed from IBM Connections

 

The Social Business Toolkit SDK is a set of libraries and code samples that you use for connecting to the IBM Social Platform. We will use Social Business Toolkit for our development purpose.

 

Constructor for our class

public CommunityFilesDownload(String user, String password) throws ClientServicesException{

BasicEndpoint endpoint = createEndpoint(Messages.getString("CommunityFilesDownload.hostname"), user, password);

                        this.communityService = new CommunityService();

                        this.communityService.setEndpoint(endpoint);

                                   

                        }

 

Endpoint for the connections

private BasicEndpoint createEndpoint(String url, String user, String password) {

                        BasicEndpoint endpoint = new ConnectionsBasicEndpoint();

                        endpoint.setUrl(url);

                        endpoint.setUser(user);

                        endpoint.setPassword(password);

                        endpoint.setForceTrustSSLCertificate(true);

                        return endpoint;

                }

 

 

CommunityFilesDownload connectionsService = new CommunityFilesDownload(userid, password);                                                  

                                    application=runtimeFactory.initApplication("CommunityFilesDownload");

            context = Context.init(application, null, null);

            First get my communities

            Map pageParameters = new HashMap(2);

            int itemsPerPage = 10;

 

 

            pageParameters.put("page", page + "");

            pageParameters.put("ps", itemsPerPage + "");                   

            EntityListcommunityList = connectionsService.getCommunityService().getMyCommunities(pageParameters);

 

 

  1. Fetch files and folders feed from the individual community

 

To fetch community folders feed you need to construct following URI

 

https://{connections-host}/files/basic/api/communitycollection/{community-id}/feed

 

 

To fetch individual community folder content  you need to construct following URI

https://{connections-host}/files/basic/api/collection/{folder-uuid}/feed

 

 

 

 

for(Community community : communityList){

String folderFeedURL = communityFilesCollectionURL + community.getCommunityUuid() + "/feed?sK=updated&sO=dsc&category=collection&type=all";

…..

…..

…..

List entries = feed.getData().getEntries();

for(AtomEntry entry : entries){

…..

…..

Get the folder contents

String folderContents = connectionsHost + "/files/basic/api/collection/" + entry.getAsString("td:uuid") + "/feed?sK=added&sO=dsc&acls=true&collectionAcls=true&includeNotification=true&includePolicy=true";

…..

…..

Fetch atom feed using folderContents URI

…..

fetch media download URL from the feed

}

}

 

 

 

  1. Download the files and folders to the device

 

 

InputStream inputStream = filedownload.doGet(downloadURL).response().getResponse().getEntity().getContent();

                                                           

IOUtils.copy(inputStream, output);

 

For more details on APIs and Query parameters used refer

http://www-10.lotus.com/ldd/lcwiki.nsf/xpViewCategories.xsp?lookupName=IBM%20Connections%205.0%20API%20Documentation

 

 

You can schedule this code to run at specific intervals from the branch offices and trigger the sync.

 

Additionally, you can also check for failed downloads as well as files which are deleted on the server side and take actions programmatically.

 

 

Overall architecture of the solution is as below:

 

 

 

 

 

You can schedule this code on PC on stick, which will trigger at the scheduled time and sync the community content to the device, which can be played on wide screen TV sets present at the branch offices.

 

These IBM Connections API as well as same logic can be used to develop an application to run on Android which you can run it on Android on stick which can be plugged to television sets.

 

For working sample code please refer the link here code

About author:

 

Sushant Naik is an IBM certified senior IT specialist (Portal and Collaboration) working with Lab services division of India Software Labs. His skills and interests include WebSphere Portal, Web Experience Factory, Lotus® Forms, Lotus® Connections, Lotus Sametime®, Java / JEE and Eclipse development. You can reach him at sushnaik@in.ibm.com.

 

References:

  • http://www-10.lotus.com/ldd/lcwiki.nsf/xpViewCategories.xsp?lookupName=IBM%20Connections%205.0%20API%20Documentation
  • http://www.intel.com/content/www/us/en/compute-stick/intel-compute-stick.html
  • http://www.amazon.com/Androset-Bluetooth-Android-Rockchip-Cortex-A9/dp/B00ALSZNLW

 


  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (1)
collapsed Versions (1)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (4)Oct 12, 2015, 6:25:05 AM~Rex Kifoosonings  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL Software
  • Privacy
  • Accessibility