org.sakaiproject.profile2.logic
Interface ProfileLinkLogic


public interface ProfileLinkLogic

An interface to create and resolve links to pages and views into Profile2

Author:
Steve Swinsburg (steve.swinsburg@gmail.com)

Method Summary
 String getEntityLinkToProfileConnections()
          Creates a RESTful link to the Profile2 conenctions page for any currently logged in user.
 String getEntityLinkToProfileHome(String userUuid)
          Creates a RESTful link to the Profile2 home page for either the currently logged in user (if null param) or the given user.
 String getEntityLinkToProfileMessages(String threadId)
          Creates a RESTful link to the Profile2 message page (and optionally directly to a thread) for any currently logged in user.
 String getEntityLinkToProfileWall(String userUuid)
          Creates a RESTful link to the Profile2 wall page for either the currently logged in user (if null param) or the given user.
 String getInternalDirectUrlToUserConnections()
          Creates a full URL to the connections page of the currently logged in user's profile page on their My Workspace.
 String getInternalDirectUrlToUserMessages(String threadId)
          Creates a full URL to the messages page (and optionally directly to a message view) of the currently logged in user's profile page on their My Workspace.
 String getInternalDirectUrlToUserProfile()
          Creates a full URL to the front page of the currently logged in user's profile page on their My Workspace.
 String getInternalDirectUrlToUserProfile(String userUuid)
          Creates a full URL to the given user's profile page viewed from within the currently logged in user's ViewProfile page in Profile2 on their My Workspace
 String getInternalDirectUrlToUserWall(String userUuid, String wallItemId)
          Creates a full URL to the wall page of the currently logged in user's profile page on their My Workspace.
 

Method Detail

getInternalDirectUrlToUserProfile

String getInternalDirectUrlToUserProfile()
Creates a full URL to the front page of the currently logged in user's profile page on their My Workspace.

This should only be used internally by Profile2 as the URL is long and ugly. If you need to generate a URL to a user's profile, see generateUrlToUserProfile

Returns:
the url or null if they don't have the tool installed.

getInternalDirectUrlToUserProfile

String getInternalDirectUrlToUserProfile(String userUuid)
Creates a full URL to the given user's profile page viewed from within the currently logged in user's ViewProfile page in Profile2 on their My Workspace

This should only be used internally by Profile2 as the URL is long and ugly. If you need to generate a URL to a user's profile, see generateUrlToUserProfile

Returns:
the url or null if they don't have the tool installed.

getInternalDirectUrlToUserMessages

String getInternalDirectUrlToUserMessages(String threadId)
Creates a full URL to the messages page (and optionally directly to a message view) of the currently logged in user's profile page on their My Workspace.

This should only be used internally by Profile2 as the URL is long and ugly. If you need to generate a URL to a user's profile, see getUrlToUserMessages

Parameters:
threadId - optional param if we want to link direct to a message thread view
Returns:
the url or null if they don't have the tool installed.

getInternalDirectUrlToUserConnections

String getInternalDirectUrlToUserConnections()
Creates a full URL to the connections page of the currently logged in user's profile page on their My Workspace.

This should only be used internally by Profile2 as the URL is long and ugly. If you need to generate a URL to a user's profile, see getUrlToUserConnections

Returns:
the url or null if they don't have the tool installed.

getInternalDirectUrlToUserWall

String getInternalDirectUrlToUserWall(String userUuid,
                                      String wallItemId)
Creates a full URL to the wall page of the currently logged in user's profile page on their My Workspace.

This should only be used internally by Profile2 as the URL is long and ugly. If you need to generate a URL to a user's profile, see generateUrlToUserProfile

Returns:
the url or null if they don't have the tool installed.

getEntityLinkToProfileHome

String getEntityLinkToProfileHome(String userUuid)
Creates a RESTful link to the Profile2 home page for either the currently logged in user (if null param) or the given user. When followed, will pass through the ProfileLinkEntityProvider and be resolved into the real link

This is used for url shortening and also to avoid generating the personalised link for each user for when sending out multiple emails.

The URL is of the form: http://server.com/direct/my/profile/{userUuid}

Parameters:
userUuid - optional if you want to link to the profile view of another person
Returns:

getEntityLinkToProfileMessages

String getEntityLinkToProfileMessages(String threadId)
Creates a RESTful link to the Profile2 message page (and optionally directly to a thread) for any currently logged in user. When followed, will pass through the ProfileLinkEntityProvider and be resolved into the real link.

Note: If that person is not a thread participant, this will be handled in the tool and just put to their message list page.

The URL is of the form: http://server.com/direct/my/messages or http://server.com/direct/my/messages/12345

Parameters:
threadId - optionally, add the threadId to the URL
Returns:

getEntityLinkToProfileConnections

String getEntityLinkToProfileConnections()
Creates a RESTful link to the Profile2 conenctions page for any currently logged in user. When followed, will pass through the ProfileLinkEntityProvider and be resolved into the real link.

The URL is of the form: http://server.com/direct/my/connections

Returns:

getEntityLinkToProfileWall

String getEntityLinkToProfileWall(String userUuid)
Creates a RESTful link to the Profile2 wall page for either the currently logged in user (if null param) or the given user. When followed, will pass through the ProfileLinkEntityProvider and be resolved into the real link

This is used for url shortening and also to avoid generating the personalised link for each user for when sending out multiple emails.

The URL is of the form: http://server.com/direct/my/profile/{userUuid}

Parameters:
userUuid - optional if you want to link to the wall of another person
Returns:


Copyright © 2008-2013 The Sakai Foundation. All Rights Reserved.