|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pramati.bfly.das.contacts.helper.DekohNetworkRequestHelper
public class DekohNetworkRequestHelper
Helper for knowing remote requests information.
| Constructor Summary | |
|---|---|
DekohNetworkRequestHelper()
|
|
| Method Summary | |
|---|---|
static Contact |
getIncomingUser(HttpServletRequest request,
Set allAllowedContacts)
Filter out from the aliases returned by getIncomingUserAliases and return the most appropriate match from the supplied allAllowedContacts. |
static Set |
getIncomingUserAliases(HttpServletRequest request)
Gets list of contacts representing all the aliases of the incoming remote request user. |
static List |
getOnlineDasIds(DesktopUser desktopUser,
String buddyDekohId,
String applicationName)
To get the list of online dekoh desktop ids, from which application applicationName is shared by
user buddyDekohId to this Deskoh desktop user. |
static String |
getOwner(HttpServletRequest request)
Gets the Dekoh user name of the owner of the dekoh installation that is being accessed by the RemoteUser. |
static HttpURLConnection |
getRemoteUrlConnection(DesktopUser desktopUser,
String requesteeAlias,
String remoteDasId,
String targetFile)
To get Connection For a remote request url. |
static HttpURLConnection |
getRemoteUrlConnection(HttpServletRequest request,
String requesteeAlias,
String remoteDasId,
String targetFile)
same as invoking getRemoteUrlConnection(SessionUtil.getLoggedInDesktopUser(request), requesteeAlias, remoteDasId, targetFile) |
static boolean |
isRemoteRequest(HttpServletRequest request)
To know whether a incoming requests is a RemoteRequest or a LocalRequest. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DekohNetworkRequestHelper()
| Method Detail |
|---|
public static boolean isRemoteRequest(HttpServletRequest request)
request -
public static String getOwner(HttpServletRequest request)
request -
public static Set getIncomingUserAliases(HttpServletRequest request)
request -
public static Contact getIncomingUser(HttpServletRequest request,
Set allAllowedContacts)
getIncomingUserAliases and return the most appropriate match from the supplied allAllowedContacts.
UseCase : Imagine that this user shares a photo collection named "test" to Jekyll@example.com, and
another@example.com
Consider incoming user is Dekoh user- U1, who has known aliases (only to Dekoh network) Jekyll@example.com and
Hyde@example.com. When U1 logs into Dekoh as Hyde@example.com to access the shared photo collection, the photo
application would want to determine from the the incoming remote request which of the user contacts is accessing
this shared content. By invoking this api with Jekyll@example.com, another@example.com as
allAllowedContacts, the caller can obtain Jekyll@example.com as the preferred alias for incoming remote
user.
request - allAllowedContacts -
public static HttpURLConnection getRemoteUrlConnection(HttpServletRequest request,
String requesteeAlias,
String remoteDasId,
String targetFile)
throws IOException
getRemoteUrlConnection(SessionUtil.getLoggedInDesktopUser(request), requesteeAlias, remoteDasId, targetFile)
request - requesteeAlias - remoteDasId - targetFile -
IOException
public static HttpURLConnection getRemoteUrlConnection(DesktopUser desktopUser,
String requesteeAlias,
String remoteDasId,
String targetFile)
throws IOException
reachable, and a Desktop user is a valid
authenticated user for getting proper target url connection.
requesteeAlias
and remoteDasId can be obtained from ApplicationShares
getResponseCode on returned Connection Object can result in
an error code, if the loggedIn user doesnt have access to given url or no such url exists on target Dekoh
desktop.
desktopUser - an Authenticate DesktopUser.requesteeAlias - DekohId of the target dekoh, to which url connection is requested.remoteDasId - Dekoh Desktop id of the requesteeAlias from which the targetFile needs to
be retrieved.targetFile -
IOException
public static List getOnlineDasIds(DesktopUser desktopUser,
String buddyDekohId,
String applicationName)
throws ShareException
applicationName is shared by
user buddyDekohId to this Deskoh desktop user.
If application name is null, this api would return list of dekoh desktops, from which any application has been
shared by
- Parameters:
desktopUser - buddyDekohId - applicationName -
- Returns:
-
- Throws:
ShareException
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers