com.plumtree.taskapi.portalui
Class TaskAPIUICommunityService

java.lang.Object
  extended by com.plumtree.taskapi.portalui.TaskAPIUICommunityService
All Implemented Interfaces:
ITaskAPIUICommunity

public class TaskAPIUICommunityService
extends java.lang.Object
implements ITaskAPIUICommunity

This class manages instances of the ITaskAPIUICommunity interface for both production and testing purposes. It is a replacement for the TaskAPIUICommunity class, since that class uses static methods and cannot be mocked for testing.


Method Summary
 boolean CheckUserAccessLevelToCommunity(AActivitySpace owner, int nAccessLevel, int nCommunityID)
          Check the if the current user has at least the accesslevel specified to the current community
 boolean CheckUserAccessLevelToCurrentCommunity(AActivitySpace owner, int nAccessLevel)
          Check the if the current user has at least the accesslevel specified to the current community
 boolean CheckUserAccessLevelToCurrentCommunityPage(AActivitySpace owner, int nAccessLevel)
          Check the if the current user has at least the accesslevel specified to the current community page
 IPTURL CreateCommunityCommonOpenerURL(AActivitySpace owner, int nCommunityID, java.lang.String strCommunityName)
          Helper function to create an URL to a specified Community.
 IPTURL CreateCommunityPageCommonOpenerURL(AActivitySpace owner, int nCommunityID, int nCommunityPageID, java.lang.String strCommunityPageName)
          Helper function to create an URL to a specified Community Page.
 IPTURL CreateUserProfilePageCommonOpenerURL(AActivitySpace owner, int nProfileUserID, java.lang.String sProfileUserName)
          Gets an URL to a UserProfile page for the specified user.
 IPTURL CreateUserProfilePageCommonOpenerURL(AActivitySpace owner, int nProfileUserID, java.lang.String sProfileUserName, java.lang.String strURLTitle)
          Gets an URL to a UserProfile page for the specified user.
 IPTURL CreateUserProfilePageCommonOpenerURL(AActivitySpace owner, int nProfileUserID, java.lang.String sProfileUserName, java.lang.String strURLTitle, int nPageId, java.lang.String strPageName)
          Gets an URL to a UserProfile page for the specified user.
 XPArrayList GetCommunityActionsAsURLs(AActivitySpace owner)
          Gets Community Actions as an XPArrayList with IPTURL entries.
 XPArrayList GetCommunityActionsAsURLs(AActivitySpace owner, boolean bIncludeOneClick, boolean bInheritTemplate, int nPageTemplate)
          Gets Community Actions as an XPArrayList with IPTURL entries.
 int GetCommunityIDFromPTURL(IPTURL ptURL)
          Gets the Community ID from an IPTURL with an URL to a Community or Community Page.
 java.lang.String GetCommunityName(AActivitySpace owner, int nCommunityID)
          Gets the name of the specified Community.
 int GetCommunityPageIDFromPTURL(IPTURL ptURL)
          Gets the Community Page ID from an IPTURL with an URL to a Community Page.
 XPArrayList GetCommunityPagesAsURLs(AActivitySpace owner, int nCommunityID)
          Get Community Pages in the specified Community as a list of IPTURLs.
 int GetCurrentCommunityID(AActivitySpace owner)
          Gets the Community ID of the current Community.
 java.lang.String GetCurrentCommunityName(AActivitySpace owner)
          Gets the Community Name of the current Community.
 int GetCurrentCommunityPageID(AActivitySpace owner)
          Gets the current Community Page ID, If current page is not a Community page, the TaskAPIUICommon.INVALID_OBJECTID value is returned.
 java.lang.String GetCurrentCommunityPageName(AActivitySpace owner)
          Gets the Community Page Name of the current Community Page.
 XPArrayList GetCurrentCommunityPagesAsURLs(AActivitySpace owner)
          Gets the Community Pages of the current Community as an XPArraylist with IPTURL entries.
 IPTURL GetCurrentPageAsURL(AActivitySpace owner)
          Gets the current Page as an object of typeIPTURL.
 IPTURL GetCurrentParentCommunityAsURL(AActivitySpace owner)
          Gets the URL to the parent Community of the current Community.
 int GetCurrentParentCommunityID(AActivitySpace owner)
          Gets the Object ID of the parent Community in the current Community.
 XPArrayList GetCurrentRelatedCommunitiesAsURLs(AActivitySpace owner)
          Gets URLs to Related Communities for for the current Community in a list of IPTURLs.
 int[] GetCurrentRelatedCommununityIDs(AActivitySpace owner)
          Gets Related Communities (a.k.a.
 XPArrayList GetCurrentSubCommunitiesAsURLs(AActivitySpace owner)
          Gets Subcommunities in the current Community as an XPArrayList with IPTURL entries.
 int[] GetCurrentSubCommunityIDs(AActivitySpace owner)
          Gets the Subcommunities of the current Community as a integer array.
 int GetDefaultCommunityID(AActivitySpace owner)
          Gets the default Community ID, the first Community in a user's My Community list.
static ITaskAPIUICommunity GetInstance()
           
 XPArrayList GetMyCommunitiesAsURLs(AActivitySpace owner, boolean bUseCachedData)
          Gets a user's My Communities list as an XPArrayList with IPTURL entries.
 XPArrayList GetMyMandatoryCommunitiesWithTabsAsURLs(AActivitySpace owner, boolean bUseCachedData)
          Gets a user's Mandatory with Tab Communities as an XPArrayList with IPTURL entries.
 IPTURL GetParentCommunityAsURL(AActivitySpace owner, int nCommunityID)
          Gets the URL to the parent Community of the specified Community.
 int GetParentCommunityID(AActivitySpace owner, int nCommunityID)
          Gets the Object ID of the parent Community in the specified Community.
 XPArrayList GetRelatedCommununitiesAsURLs(AActivitySpace owner, int nCommunityID)
          Gets URLs to Related Communities for the specified Community in a list of IPTURLs.
 int[] GetRelatedCommununityIDs(AActivitySpace owner, int nCommunityID)
          Gets the Related Communities for the specified Community as an integer array.
 XPArrayList GetSubCommununitiesAsURLs(AActivitySpace owner, int nCommunityID)
          Gets the Subcommunities for the specified Community as a list with IPTURL entries.
 int[] GetSubCommununityIDs(AActivitySpace owner, int nCommunityID)
          Gets the Subcommunities for the specified Community as an integer array.
 IPTURL GetURLForAddCommunityPortletsEditor(AActivitySpace owner)
          Gets the URL to the Community Add Portlets Editor.
 IPTURL GetURLForAddCommunityPortletsFlyout(AActivitySpace owner)
          Gets the URL to the Community Add Portlets Flyout.
 IPTURL GetURLForCommunityKnowledgeDirectory(AActivitySpace owner, int nCommunityID)
          Gets to URL to the Community Knowledge Directory f0r the current Community.
 IPTURL GetURLForCreateCommunityPage(AActivitySpace owner)
          Gets the URL to the Create Community page in the Community Editor.
 IPTURL GetURLForCreateCommunityPageOneClick(AActivitySpace owner, boolean bInheritTemplate, int nPageTemplate)
          Gets the URL to the Create Community page in the Community Editor.
 XPArrayList GetURLForCurrentCommunity(AActivitySpace owner)
          Gets an XPArrayList with a single entry for the URL for the current Community.
 IPTURL GetURLForCurrentCommunityEditor(AActivitySpace owner)
          Gets the URL to the Community Editor for the current Community.
 IPTURL GetURLForEditPortletPreferencesEditor(AActivitySpace owner)
          Gets the URL to the Community Edit Portlet Preferences Editor.
 IPTURL GetURLForJoinCommunitiesEditor(AActivitySpace owner)
          Gets the URL for the Join Community Editor where users add Communities to their My Communities list.
 IPTURL GetURLForJoinCurrentCommunityAction(AActivitySpace owner)
          Gets the URL to Join Current Community Action.
 IPTURL GetURLForUnsubscribeCommunitiesEditor(AActivitySpace owner)
          Gets the URL to the Unsubscribe from Communities Editor.
 IPTURL GetURLForUnsubscribeCurrentCommunityAction(AActivitySpace owner)
          Gets the URL to Unsubscribe Current Community Action.
 boolean IsCommunityMember(AActivitySpace _asOwner, int _nCommunityID)
          Checks whether or not the current user is a member of the specified community.
 boolean IsCurrentCommunityUserProfileCommunity(AActivitySpace owner)
          Checks if the current Community is the User Profile Community.
 boolean IsCurrentPageCommunityPage(AActivitySpace owner)
          Checks if the current page is a Community Page.
 boolean IsCurrentPageMyPortalPage(AActivitySpace owner)
          Checks if the current page is a Myportal page, i.e.
 boolean IsCurrentUserAbleToEditCurrentCommunityPage(AActivitySpace owner)
          Checks if the current user has access (requires EDIT access) to use the Community Editor on the current Community Page.
 boolean IsCurrentUserCommunityOwner(AActivitySpace owner)
          Checks if the current user is the owner of the current Community.
 boolean IsUserAbleToAccessCurrentCommunity(AActivitySpace owner)
          Checks if the current user has at least READ access to the current Community.
 boolean IsUserAbleToJoinCurrentCommunity(AActivitySpace owner)
          Checks if the current user has at least SELECT access to the current Community.
 boolean IsUserMemberOfCurrentCommunity(AActivitySpace owner)
          Checks if the current user is already subscribed to the current Community, i.e.
 boolean JoinCommunity(AActivitySpace _asOwner, int _nCommunityID)
          This method causes the current user to join the specified community.
 boolean LeaveCommunity(AActivitySpace _asOwner, int _nCommunityID)
          This method causes the current user to leave the specified community.
static void SetMockInstanceForDebug(ITaskAPIUICommunity _instance)
          This method sets the debug instance of the ITaskAPIUIDirectory interface for use as a mock object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

GetInstance

public static ITaskAPIUICommunity GetInstance()
Returns:
An instance of the ITaskAPIUIDirectory interface.

SetMockInstanceForDebug

public static void SetMockInstanceForDebug(ITaskAPIUICommunity _instance)
This method sets the debug instance of the ITaskAPIUIDirectory interface for use as a mock object. This should never be used in a production environment. This should be reset to null at the end of testing to ensure other code does not get an old mock instance.

Parameters:
_instance - The mock instance of the ITaskAPIUIDirectory interface. When the mock instance is done being used it should be reset to null by calling this method again with a null argument.

CheckUserAccessLevelToCommunity

public boolean CheckUserAccessLevelToCommunity(AActivitySpace owner,
                                               int nAccessLevel,
                                               int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Check the if the current user has at least the accesslevel specified to the current community

Specified by:
CheckUserAccessLevelToCommunity in interface ITaskAPIUICommunity
nCommunityID - Object ID of the Community to check security of
Returns:
boolean True if the current user has at least the specified accesslevel, false if the user does not have access or there is no current community.
See Also:
PT_ACCESS_LEVELS

CheckUserAccessLevelToCurrentCommunity

public boolean CheckUserAccessLevelToCurrentCommunity(AActivitySpace owner,
                                                      int nAccessLevel)
Description copied from interface: ITaskAPIUICommunity
Check the if the current user has at least the accesslevel specified to the current community

Specified by:
CheckUserAccessLevelToCurrentCommunity in interface ITaskAPIUICommunity
Returns:
boolean True if the current user has at least the specified accesslevel, false if the user does not have access or there is no current community.
See Also:
PT_ACCESS_LEVELS

CheckUserAccessLevelToCurrentCommunityPage

public boolean CheckUserAccessLevelToCurrentCommunityPage(AActivitySpace owner,
                                                          int nAccessLevel)
Description copied from interface: ITaskAPIUICommunity
Check the if the current user has at least the accesslevel specified to the current community page

Specified by:
CheckUserAccessLevelToCurrentCommunityPage in interface ITaskAPIUICommunity
Returns:
boolean True if the current user has at least the specified accesslevel, false if the user does not have access or there is no current community page.
See Also:
PT_ACCESS_LEVELS

CreateCommunityCommonOpenerURL

public IPTURL CreateCommunityCommonOpenerURL(AActivitySpace owner,
                                             int nCommunityID,
                                             java.lang.String strCommunityName)
Description copied from interface: ITaskAPIUICommunity
Helper function to create an URL to a specified Community. The PTURLConstants.KEY_CURRENTMARKER flag is set on the URL if is leading to the current Community.

Specified by:
CreateCommunityCommonOpenerURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID of the Community to create an URL to.
strCommunityName - Name of the URL, normally the name of the Community.
Returns:
IPTURL with an URL to the specified Community.

CreateCommunityPageCommonOpenerURL

public IPTURL CreateCommunityPageCommonOpenerURL(AActivitySpace owner,
                                                 int nCommunityID,
                                                 int nCommunityPageID,
                                                 java.lang.String strCommunityPageName)
Description copied from interface: ITaskAPIUICommunity
Helper function to create an URL to a specified Community Page. The PTURLConstants.KEY_CURRENTMARKER flag is set on the URL if is leading to the current Community Page. In case the page is a profile page, the link generated will be of the viewed profile, not the current user's.

Specified by:
CreateCommunityPageCommonOpenerURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID of the Community where the Page is located in.
nCommunityPageID - Object ID of the Page to create a URL to.
strCommunityPageName - Title of the URL, normally the name of the Page.
Returns:
IPTURL with an URL to the specified Community Page.

CreateUserProfilePageCommonOpenerURL

public IPTURL CreateUserProfilePageCommonOpenerURL(AActivitySpace owner,
                                                   int nProfileUserID,
                                                   java.lang.String sProfileUserName)
Description copied from interface: ITaskAPIUICommunity
Gets an URL to a UserProfile page for the specified user.

Specified by:
CreateUserProfilePageCommonOpenerURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nProfileUserID - The Object ID of the user to open the User Profile page for.
sProfileUserName - The name of the user to open the User Profile page for. Also used for the link title.
Returns:
IPTURL with the URL to the user profile page for the specified user.

CreateUserProfilePageCommonOpenerURL

public IPTURL CreateUserProfilePageCommonOpenerURL(AActivitySpace owner,
                                                   int nProfileUserID,
                                                   java.lang.String sProfileUserName,
                                                   java.lang.String strURLTitle)
Description copied from interface: ITaskAPIUICommunity
Gets an URL to a UserProfile page for the specified user.

Specified by:
CreateUserProfilePageCommonOpenerURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nProfileUserID - The Object ID of the user to open the User Profile page for.
sProfileUserName - The name of the user to open the User Profile page for.
strURLTitle - The title of the URL.
Returns:
IPTURL with the URL to the user profile page for the specified user.

CreateUserProfilePageCommonOpenerURL

public IPTURL CreateUserProfilePageCommonOpenerURL(AActivitySpace owner,
                                                   int nProfileUserID,
                                                   java.lang.String sProfileUserName,
                                                   java.lang.String strURLTitle,
                                                   int nPageId,
                                                   java.lang.String strPageName)
Description copied from interface: ITaskAPIUICommunity
Gets an URL to a UserProfile page for the specified user.

Specified by:
CreateUserProfilePageCommonOpenerURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nProfileUserID - The Object ID of the user to open the User Profile page for.
sProfileUserName - The name of the user to open the User Profile page for.
strURLTitle - The title of the URL.
Returns:
IPTURL with the URL to the user profile page for the specified user.

GetCommunityActionsAsURLs

public XPArrayList GetCommunityActionsAsURLs(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets Community Actions as an XPArrayList with IPTURL entries. Most Community actions only display when in an Community and only if a user has access to perform the actions.

Specified by:
GetCommunityActionsAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
An XPArrayList with IPTURL entries with Community Actions.

GetCommunityActionsAsURLs

public XPArrayList GetCommunityActionsAsURLs(AActivitySpace owner,
                                             boolean bIncludeOneClick,
                                             boolean bInheritTemplate,
                                             int nPageTemplate)
Description copied from interface: ITaskAPIUICommunity
Gets Community Actions as an XPArrayList with IPTURL entries. Most Community actions only display when in an Community and only if a user has access to perform the actions.

Specified by:
GetCommunityActionsAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
An XPArrayList with IPTURL entries with Community Actions.

GetCommunityIDFromPTURL

public int GetCommunityIDFromPTURL(IPTURL ptURL)
Description copied from interface: ITaskAPIUICommunity
Gets the Community ID from an IPTURL with an URL to a Community or Community Page.

Specified by:
GetCommunityIDFromPTURL in interface ITaskAPIUICommunity
Parameters:
ptURL - IPTURL to a Community or Community Page.
Returns:
The Community ID, or 0 if none is found in the URL.

GetCommunityName

public java.lang.String GetCommunityName(AActivitySpace owner,
                                         int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets the name of the specified Community.

Specified by:
GetCommunityName in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID of the Community to retrieve the name for.
Returns:
Name of the specified Community.

GetCommunityPageIDFromPTURL

public int GetCommunityPageIDFromPTURL(IPTURL ptURL)
Description copied from interface: ITaskAPIUICommunity
Gets the Community Page ID from an IPTURL with an URL to a Community Page.

Specified by:
GetCommunityPageIDFromPTURL in interface ITaskAPIUICommunity
Parameters:
ptURL - IPTURL to a Community Page.
Returns:
The Community Page ID, or 0 if none is found in the URL.

GetCommunityPagesAsURLs

public XPArrayList GetCommunityPagesAsURLs(AActivitySpace owner,
                                           int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Get Community Pages in the specified Community as a list of IPTURLs. The PTURLConstants.KEY_CURRENTMARKER flag is set on an URL entry if is leading to the current Community Page.

Specified by:
GetCommunityPagesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object Id of the Communitu to list pages of.
Returns:
A list with Community Pages as IPTURL objects.

GetCurrentCommunityID

public int GetCurrentCommunityID(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the Community ID of the current Community. If current page is not a Community page, i.e., Community portlet, Sitemap or Community Gatewaypage page, TaskAPIUICommon.INVALID_OBJECTID is returned.

Specified by:
GetCurrentCommunityID in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace
Returns:
Community ID of the current community or TaskAPIUICommon.INVALID_OBJECTID if not in a Community.

GetCurrentCommunityName

public java.lang.String GetCurrentCommunityName(AActivitySpace owner)
                                         throws XPIllegalArgumentException
Description copied from interface: ITaskAPIUICommunity
Gets the Community Name of the current Community.

Specified by:
GetCurrentCommunityName in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Community Name of the current community or null value if not currently on a Community Page.
Throws:
XPIllegalArgumentException - If the provided AActivityspace is null.

GetCurrentCommunityPageID

public int GetCurrentCommunityPageID(AActivitySpace owner)
                              throws XPIllegalArgumentException
Description copied from interface: ITaskAPIUICommunity
Gets the current Community Page ID, If current page is not a Community page, the TaskAPIUICommon.INVALID_OBJECTID value is returned.

Specified by:
GetCurrentCommunityPageID in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Current Community Page ID or TaskAPIUICommon.INVALID_OBJECTID if not in on Community Page.
Throws:
XPIllegalArgumentException - If the provided AActivityspace is null.

GetCurrentCommunityPageName

public java.lang.String GetCurrentCommunityPageName(AActivitySpace owner)
                                             throws XPIllegalArgumentException
Description copied from interface: ITaskAPIUICommunity
Gets the Community Page Name of the current Community Page. If current page is not a Community related page, i.e., Community portlet, Sitemap or Community Gatewaypage page, a null value is returned.

Specified by:
GetCurrentCommunityPageName in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Community Page Name of the current community pageor null value if not currently on a Community Page.
Throws:
XPIllegalArgumentException - If the provided AActivityspace is null

GetCurrentCommunityPagesAsURLs

public XPArrayList GetCurrentCommunityPagesAsURLs(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the Community Pages of the current Community as an XPArraylist with IPTURL entries.

Specified by:
GetCurrentCommunityPagesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
An XPArrayList with IPTURL to CommunityPages, or empty XPArrayList if the current page is not a Community Page or valid Page.

GetCurrentPageAsURL

public IPTURL GetCurrentPageAsURL(AActivitySpace owner)
                           throws XPIllegalArgumentException
Description copied from interface: ITaskAPIUICommunity
Gets the current Page as an object of typeIPTURL. Returns

Specified by:
GetCurrentPageAsURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace
Returns:
IPTURL to the current community page or null if the current page is not a community page.
Throws:
XPIllegalArgumentException

GetCurrentParentCommunityAsURL

public IPTURL GetCurrentParentCommunityAsURL(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the parent Community of the current Community. Parent Community is the Community where the current Community is located in the administrative hierarchy.

Specified by:
GetCurrentParentCommunityAsURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL to current Parent Community or null if no parent Community exists, or if not currently in a Community.

GetCurrentParentCommunityID

public int GetCurrentParentCommunityID(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the Object ID of the parent Community in the current Community. Parent Community is the Community where the current Community is located in the administrative hierarchy.

Specified by:
GetCurrentParentCommunityID in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Object ID of current parent Community ID, or 0 if not currently in a Community or the current Community does not have a parent Community.

GetCurrentRelatedCommunitiesAsURLs

public XPArrayList GetCurrentRelatedCommunitiesAsURLs(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets URLs to Related Communities for for the current Community in a list of IPTURLs. Related Communities are Communities in the same administrative folder.

Specified by:
GetCurrentRelatedCommunitiesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
XPArrayList with IPTURLs to Related Communities or an empty XPArrayList if none exists.

GetCurrentRelatedCommununityIDs

public int[] GetCurrentRelatedCommununityIDs(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets Related Communities (a.k.a. peer Communities) of the current Community as an integer array. Related Communities are Communities located in one Community in the administrative hierarchy.

Specified by:
GetCurrentRelatedCommununityIDs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Array with Object IDs of Related Community to the current Community. Empty array if the current Community has no Related communities or if not in a Community.

GetCurrentSubCommunitiesAsURLs

public XPArrayList GetCurrentSubCommunitiesAsURLs(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets Subcommunities in the current Community as an XPArrayList with IPTURL entries.

Specified by:
GetCurrentSubCommunitiesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Array list with IPTURL of Subcommunities. An empty list is returned if there are no subcommunities exist or not in a Community.

GetCurrentSubCommunityIDs

public int[] GetCurrentSubCommunityIDs(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the Subcommunities of the current Community as a integer array. Subcommunties are Communities located in another Community in the adminstrative hierarchy.

Specified by:
GetCurrentSubCommunityIDs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
An integer array with Object IDs to Subcommunity. Returns an empty array if the current Community has no Subcommunities or not currently in a Community.

GetDefaultCommunityID

public int GetDefaultCommunityID(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the default Community ID, the first Community in a user's My Community list.

Specified by:
GetDefaultCommunityID in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
Object ID of the first Community in the current user's My Community list, or -1 if the user is not a member of any communities.

GetMyCommunitiesAsURLs

public XPArrayList GetMyCommunitiesAsURLs(AActivitySpace owner,
                                          boolean bUseCachedData)
Description copied from interface: ITaskAPIUICommunity
Gets a user's My Communities list as an XPArrayList with IPTURL entries. The PTURLConstants.KEY_CURRENTMARKER flag is set on an URL entry if is leading to the current Community.

Specified by:
GetMyCommunitiesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
bUseCachedData - Get the current user's mandatory Communities with Tabs from a cache that contains at most 15 minutes old data if true. Will query the database for the mandatory communities if false.
Returns:
XPArrayList with IPTURLs to the current user's My Communities , or null if Communities features is disabled in the current Experience Definition.

GetMyMandatoryCommunitiesWithTabsAsURLs

public XPArrayList GetMyMandatoryCommunitiesWithTabsAsURLs(AActivitySpace owner,
                                                           boolean bUseCachedData)
Description copied from interface: ITaskAPIUICommunity
Gets a user's Mandatory with Tab Communities as an XPArrayList with IPTURL entries.

Specified by:
GetMyMandatoryCommunitiesWithTabsAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
bUseCachedData - Get the current user's mandatory Communities with Tabs from a cache that contains at most 15 minutes old data if true. Will query the database for the mandatory communities if false.
Returns:
XPArrayList with IPTURLs to the current user's mandatory Communities with Tabs, or null if Communities features is disabled in the current Experience Definition.

GetParentCommunityAsURL

public IPTURL GetParentCommunityAsURL(AActivitySpace owner,
                                      int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the parent Community of the specified Community. Parent Community is the Community where the current Community is located in the administrative hierarchy.

Specified by:
GetParentCommunityAsURL in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL to current Parent Community or null if no parent Community exists, or if the specified Community is invalid.

GetParentCommunityID

public int GetParentCommunityID(AActivitySpace owner,
                                int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets the Object ID of the parent Community in the specified Community. (the Community where the current Community is located in the administrative hierarchy).

Specified by:
GetParentCommunityID in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID of the Community to get the parent Community from.
Returns:
Object ID of current parent Community ID, or 0 /code> if non-existant.

GetRelatedCommununitiesAsURLs

public XPArrayList GetRelatedCommununitiesAsURLs(AActivitySpace owner,
                                                 int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets URLs to Related Communities for the specified Community in a list of IPTURLs. Related Communities are Communities in the same administrative folder.

Specified by:
GetRelatedCommununitiesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID for the Community to retrieve Related Communities from.
Returns:
XPArrayList with IPTURLs to Related Communities or an empty XPArrayList if none exists.

GetRelatedCommununityIDs

public int[] GetRelatedCommununityIDs(AActivitySpace owner,
                                      int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets the Related Communities for the specified Community as an integer array. Related Communities are Communities in the same administrative folder.

Specified by:
GetRelatedCommununityIDs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID for the Community to retrieve Related Communities from.
Returns:
Array of integers with Object IDs of the Related Communities in the specified Community.

GetSubCommununitiesAsURLs

public XPArrayList GetSubCommununitiesAsURLs(AActivitySpace owner,
                                             int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets the Subcommunities for the specified Community as a list with IPTURL entries. Subcommunities are Community located below another Community in the administrative hierarchy.

Specified by:
GetSubCommununitiesAsURLs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID for the Community to get Subcommunities from.
Returns:
An XPArrayList with IPTURL entries to Subcommunities, or empty array if the specified Community does no thave any Subcommunities or it is invalid.

GetSubCommununityIDs

public int[] GetSubCommununityIDs(AActivitySpace owner,
                                  int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets the Subcommunities for the specified Community as an integer array. Subcommunites are Communities directly below a Community in the administrative folder hierarchy.

Specified by:
GetSubCommununityIDs in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
nCommunityID - Object ID for the Community to retrieve Subcommunities from.
Returns:
Array of integers with Object IDs of the Subcommunities in the specified Community.

GetURLForAddCommunityPortletsEditor

public IPTURL GetURLForAddCommunityPortletsEditor(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Community Add Portlets Editor.

Specified by:
GetURLForAddCommunityPortletsEditor in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Community Add Portlets Editor, or null if the URL is not valid in the current context.

GetURLForAddCommunityPortletsFlyout

public IPTURL GetURLForAddCommunityPortletsFlyout(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Community Add Portlets Flyout.

Specified by:
GetURLForAddCommunityPortletsFlyout in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Community Add Portlets Flyout, or null if the URL is not valid in the current context.

GetURLForCommunityKnowledgeDirectory

public IPTURL GetURLForCommunityKnowledgeDirectory(AActivitySpace owner,
                                                   int nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Gets to URL to the Community Knowledge Directory f0r the current Community. The PTURLConstants.KEY_CURRENTMARKER flag is set on the URL if the current page is a Community Knowledge Directory page.

Specified by:
GetURLForCommunityKnowledgeDirectory in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace
nCommunityID - Object ID of the Community to get pages from.
Returns:
IPTURL with the URL to the Community Knowledge Directory for the specified Community.
See Also:
PTURLConstants

GetURLForCreateCommunityPage

public IPTURL GetURLForCreateCommunityPage(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Create Community page in the Community Editor.

Specified by:
GetURLForCreateCommunityPage in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to Create Community Page in the Community Editor, or null if the URL is not valid in the current context.

GetURLForCreateCommunityPageOneClick

public IPTURL GetURLForCreateCommunityPageOneClick(AActivitySpace owner,
                                                   boolean bInheritTemplate,
                                                   int nPageTemplate)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Create Community page in the Community Editor.

Specified by:
GetURLForCreateCommunityPageOneClick in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to Create Community Page in the Community Editor, or null if the URL is not valid in the current context.

GetURLForCurrentCommunity

public XPArrayList GetURLForCurrentCommunity(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets an XPArrayList with a single entry for the URL for the current Community.

Specified by:
GetURLForCurrentCommunity in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
XPArrayList list containing a single URL to the current Community, or null if the URL is not valid in the current context.

GetURLForCurrentCommunityEditor

public IPTURL GetURLForCurrentCommunityEditor(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Community Editor for the current Community.

Specified by:
GetURLForCurrentCommunityEditor in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Editor for the current Community, or null if the URL is not valid in the current context.

GetURLForEditPortletPreferencesEditor

public IPTURL GetURLForEditPortletPreferencesEditor(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Community Edit Portlet Preferences Editor.

Specified by:
GetURLForEditPortletPreferencesEditor in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Community Edit Portlet Preferences Editor, or null if the URL is not valid in the current context.

GetURLForJoinCommunitiesEditor

public IPTURL GetURLForJoinCommunitiesEditor(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL for the Join Community Editor where users add Communities to their My Communities list.

Specified by:
GetURLForJoinCommunitiesEditor in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Join Communities Editor, or null if the URL is not valid in the current context.

GetURLForJoinCurrentCommunityAction

public IPTURL GetURLForJoinCurrentCommunityAction(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to Join Current Community Action. The URL goes to a page that subscribes the user to the current Community. This URL is only visible on Communities a user is not already member of.

Specified by:
GetURLForJoinCurrentCommunityAction in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL to join current community or null if the current user is already a member or does not have access to join the current community.

GetURLForUnsubscribeCommunitiesEditor

public IPTURL GetURLForUnsubscribeCommunitiesEditor(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to the Unsubscribe from Communities Editor.

Specified by:
GetURLForUnsubscribeCommunitiesEditor in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Unsubscribe from Communities Editor, or null if the URL is not valid in the current context.

GetURLForUnsubscribeCurrentCommunityAction

public IPTURL GetURLForUnsubscribeCurrentCommunityAction(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Gets the URL to Unsubscribe Current Community Action. The URL goes to a page that unsubscribes the user to the current Community. This URL is only visible on Communities a user is not already member of.

Specified by:
GetURLForUnsubscribeCurrentCommunityAction in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
IPTURL to unsubscribe current community or null if the current user is already not a member or does not have access to unsubscribe the current community.

IsCurrentCommunityUserProfileCommunity

public boolean IsCurrentCommunityUserProfileCommunity(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current Community is the User Profile Community.

Specified by:
IsCurrentCommunityUserProfileCommunity in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current Community is the User Profile Community, false otherwise.

IsCurrentPageCommunityPage

public boolean IsCurrentPageCommunityPage(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current page is a Community Page.

Specified by:
IsCurrentPageCommunityPage in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current page is a Community Page, false otherwise.

IsCurrentPageMyPortalPage

public boolean IsCurrentPageMyPortalPage(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current page is a Myportal page, i.e. either a MyPage or Community Page.

Specified by:
IsCurrentPageMyPortalPage in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current page is either a MyPage or Community Page, false otherwise.

IsCurrentUserAbleToEditCurrentCommunityPage

public boolean IsCurrentUserAbleToEditCurrentCommunityPage(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current user has access (requires EDIT access) to use the Community Editor on the current Community Page.

Specified by:
IsCurrentUserAbleToEditCurrentCommunityPage in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current user has at least EDIT access to the current Community Page, false otherwise.

IsCurrentUserCommunityOwner

public boolean IsCurrentUserCommunityOwner(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current user is the owner of the current Community. The check only works on Community pages or Community Knowledge directory pages, not in Community editors.

Specified by:
IsCurrentUserCommunityOwner in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current user has at least EDIT access to the current Community, false otherwise.

IsUserAbleToAccessCurrentCommunity

public boolean IsUserAbleToAccessCurrentCommunity(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current user has at least READ access to the current Community. Only works on Community pages or Community Knowledge directory pages, not in Community editors.

Specified by:
IsUserAbleToAccessCurrentCommunity in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current user has at least READ access to the current Community, false otherwise.

IsUserAbleToJoinCurrentCommunity

public boolean IsUserAbleToJoinCurrentCommunity(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current user has at least SELECT access to the current Community. Only works on Community pages or Community Knowledge directory pages, not in Community Editors.

Specified by:
IsUserAbleToJoinCurrentCommunity in interface ITaskAPIUICommunity
Parameters:
owner - Current Activityspace.
Returns:
true if the current user has at least SELECT access to the current Community, false otherwise.

IsUserMemberOfCurrentCommunity

public boolean IsUserMemberOfCurrentCommunity(AActivitySpace owner)
Description copied from interface: ITaskAPIUICommunity
Checks if the current user is already subscribed to the current Community, i.e. if the current Community is already on the user's My Community list.

Specified by:
IsUserMemberOfCurrentCommunity in interface ITaskAPIUICommunity
Parameters:
owner - Current activityspace.
Returns:
true if current Community is already subscribed by the user, false if not member, or on User profile community or not or if not currently in a Community.

IsCommunityMember

public boolean IsCommunityMember(AActivitySpace _asOwner,
                                 int _nCommunityID)
Description copied from interface: ITaskAPIUICommunity
Checks whether or not the current user is a member of the specified community.

Specified by:
IsCommunityMember in interface ITaskAPIUICommunity
Parameters:
_asOwner - the current Activity Space
_nCommunityID - the community to check membership for.
Returns:
true if the current user is a member of the specified community.
See Also:
com.plumtree.taskapi.portalui.ITaskAPIUICommunity.IsCommunityMember(AActivitySpace, int)

JoinCommunity

public boolean JoinCommunity(AActivitySpace _asOwner,
                             int _nCommunityID)
Description copied from interface: ITaskAPIUICommunity
This method causes the current user to join the specified community. This method will check community membership before joining the community.

Specified by:
JoinCommunity in interface ITaskAPIUICommunity
Parameters:
_asOwner - the current Activity Space
_nCommunityID - the community to join.
Returns:
True means the user has joined the community, false means the user was already a member.
See Also:
com.plumtree.taskapi.portalui.ITaskAPIUICommunity.JoinCommunity(AActivitySpace, int)

LeaveCommunity

public boolean LeaveCommunity(AActivitySpace _asOwner,
                              int _nCommunityID)
Description copied from interface: ITaskAPIUICommunity
This method causes the current user to leave the specified community. This method will check community membership before leaving the community.

Specified by:
LeaveCommunity in interface ITaskAPIUICommunity
Parameters:
_asOwner - the current Activity Space
_nCommunityID - the community to leave.
Returns:
True means the user has left the community, false means the user was not a member of the community.
See Also:
com.plumtree.taskapi.portalui.ITaskAPIUICommunity.LeaveCommunity(AActivitySpace, int)



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.