Dekoh platform API

com.pramati.bfly.cas.presence.api.ops
Class ShareInfo

java.lang.Object
  extended by com.pramati.bfly.cas.presence.api.ops.ShareInfo

public final class ShareInfo
extends Object

A DataObject having the shared applications information of a DekohUser. This object encapsulates all the shared information to a DekohUser, from other DesktopUser's (DekohUser's who are registered, have a valid dekohId, and installed a Dekoh desktop).

It has information of shared application from both online and offline DekohDesktops. See example below to figure out whether a DesktopUser has any of his DekohDesktop online (i.e connected to central server), and if online how to generate a url to access that application.

For Example:

      // refers to the accountId and name of the user who would be accessing this link.
      // On Dekoh Desktops DesktopUser would give this information.
      // Can set these to null, if unknown.
      String loggedinUserAccountId;
      String loggedInUserName;
for (ShareInfo.BuddyShareInfo buddyShare : shareInfo.getBuddyShares()) { String buddyName = buddyShare.getBuddyAlias(); if (buddyShare.isOnline()) { for (ShareInfo.DesktopShareInfo desktopShare : buddyShare.getDesktopShares()) { if (desktopShare.isOnline()) { String dasId = desktopShare.getDasIdentifier(); int desktopNo = desktopShare.getDesktopNo(); String desktopName = desktopShare.getDesktopName(); for (ShareInfo.AppShareInfo appShare : desktopShare.getAppShares()) { String appName = appShare.getAppName(); String appUrl = SessionUtil.getViewLink(DesktopUser, buddyName, dasId, desktopNo, desktopName, appName); } } } }

Since:
Mar 20, 2007

Nested Class Summary
static class ShareInfo.AppShareInfo
           
static class ShareInfo.BuddyShareInfo
          Represents a DesktopUser (DekohUser's who are registered, have a valid dekohId, and installed a Dekoh desktop) who has shared some application from any of his Dekoh Desktops to this DekohUser.
static class ShareInfo.DesktopShareInfo
          Represents a Dekoh Desktop of a DesktopUser, from which he has shared some application to this DekohUser.
 
Method Summary
 List getBuddyShares()
          Gets the list of DesktopUser's (DekohUser's who are registered, have a valid dekohId, and installed a Dekoh desktop) and the application they have shared to this DekohUser.
 String getUserAlias()
          A dummy value.
 boolean hasOnlineBuddies()
          To know if any DesktopUser (DekohUser's who are registered, have a valid dekohId, and installed a Dekoh desktop) who has shared an application to this Dekoh user are online and reachable.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getUserAlias

public String getUserAlias()
A dummy value. set to dummy-in while getting shared applications information for a Dekoh User.

Returns:
"dummy-in"

getBuddyShares

public List getBuddyShares()
Gets the list of DesktopUser's (DekohUser's who are registered, have a valid dekohId, and installed a Dekoh desktop) and the application they have shared to this DekohUser. This includes applications shared from Dekoh Desktops which are offline (i.e not connected to central server and unreachable) or online (reachable).

Returns:
List of DesktopUser's share information who have shared any application from their Dekoh Desktops. will return an empty list, if no DesktopUsers has shared any application to this DekohUser.

hasOnlineBuddies

public boolean hasOnlineBuddies()
To know if any DesktopUser (DekohUser's who are registered, have a valid dekohId, and installed a Dekoh desktop) who has shared an application to this Dekoh user are online and reachable.

Returns:
true, if any DesktopUser is reachable. else returns false.

toString

public String toString()
Overrides:
toString in class Object

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers