com.plumtree.taskapi.portalui
Class TaskAPIUICommon

java.lang.Object
  extended by com.plumtree.taskapi.portalui.TaskAPIUICommon

public class TaskAPIUICommon
extends java.lang.Object

Common functions used by other TaskAPI packages.


Field Summary
static int INVALID_OBJECTID
           
 
Constructor Summary
TaskAPIUICommon()
           
 
Method Summary
static java.lang.String GetActivitySpaceName(AActivitySpace owner)
          Gets the name of the provided Activityspace.
static java.lang.Object GetASModel(AActivitySpace owner, java.lang.String strModelName)
          Gets the specified Activityspace Model object.
static boolean GetASModelExist(AActivitySpace owner, java.lang.String strModelName)
          Helper method to check if the specified Model object exists in the current Activityspace.
static AActivitySpace GetEnvTypeObject(IEnvironment env)
           
static FullURL[] GetFullURLFromListEntryIterator(AActivitySpace owner, ICPListEntryIterator cpList)
          Helper function to convert an ICPListEntryIterator object to an array with FullURLs.
static GatewayModel GetGatewayPageModel(AActivitySpace owner)
          Gets the GatewayModel object.
static boolean GetGatewayPageModelExists(AActivitySpace owner)
          Checks if the GatewayModel exists in the current Activityspace.
static AActivitySpace GetMyPageOrCommunityAActivitySpace(IEnvironment env)
          Method to determine and obtain if object is a valid MyPage or CommunityPage AActivitySpace.
static MyPortalModel GetMyPortalPageModel(AActivitySpace owner)
          Gets the MyPortalModel object.
static boolean GetMyPortalPageModelExists(AActivitySpace owner)
          Checks if the MyPortalModel exists in the current Activityspace.
static NavigationModel GetNavigationModel(AActivitySpace owner)
          Deprecated. All functionality is available from TaskAPI functions, no need for NavigationModel.
static boolean GetNavigationModelExists(AActivitySpace owner)
          Helper method that checks whether or not the NavigationModel object is present on the activityspace.
static IPTSession GetPTSession(AActivitySpace owner)
          Gets the Plumtree Session from the Activityspace.
static SiteMapModel GetSiteMapPageModel(AActivitySpace owner)
          Gets the SiteMapModel object.
static boolean GetSiteMapPageModelExists(AActivitySpace owner)
          Checks if the SiteMapModel exists in the current Activityspace.
static boolean IsCurrentActivitySpace(AActivitySpace owner, java.lang.String strASName)
          Checks if the current Activityspace is the specified Activityspace type, E.g.
static boolean IsCurrentDisplayPage(AActivitySpace owner, java.lang.String strPageName)
          Checks if the current DisplayPage is the specified DisplayPage type, E.g.
static boolean IsCurrentPageInEditDefaultProfileMode(AActivitySpace owner)
          Checks if the current page is an Edit Default Profile page.
static boolean IsCurrentPageInPreviewMode(AActivitySpace owner)
          Checks if the current Page is a Preview Page.
static boolean UseFriendlyURLS(int classId)
          Checks whether the classId supports friendly URLs This method is primarily used to check if specific opener links should generate friendly URLs or regular opener URLs.
static boolean UseFriendlyURLS(int classId, java.lang.String queryStringArgs)
          Checks whether the classId supports friendly URLs also considering any additional query string parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_OBJECTID

public static final int INVALID_OBJECTID
See Also:
Constant Field Values
Constructor Detail

TaskAPIUICommon

public TaskAPIUICommon()
Method Detail

GetEnvTypeObject

public static final AActivitySpace GetEnvTypeObject(IEnvironment env)
                                             throws XPIllegalArgumentException,
                                                    XPClassCastException
Parameters:
env - IEnvironment type
Returns:
An AActivityspace object
Throws:
XPIllegalArgumentException - If the provided IEnvironment is null
XPClassCastException - If the provided IEnvironment is not of the required AActivityspace type

GetMyPageOrCommunityAActivitySpace

public static final AActivitySpace GetMyPageOrCommunityAActivitySpace(IEnvironment env)
                                                               throws XPIllegalArgumentException,
                                                                      XPClassCastException
Method to determine and obtain if object is a valid MyPage or CommunityPage AActivitySpace.

Parameters:
env - IEnvironment type
Returns:
A MyPage or CommunityPage AActivityspace object or null if it is not available
Throws:
XPIllegalArgumentException - If the provided IEnvironment is null
XPClassCastException

GetFullURLFromListEntryIterator

public static FullURL[] GetFullURLFromListEntryIterator(AActivitySpace owner,
                                                        ICPListEntryIterator cpList)
Helper function to convert an ICPListEntryIterator object to an array with FullURLs. Used for backwards compatibility.

Parameters:
owner - Current Activityspace.
cpList - ICPListEntryIterator with URL data.
Returns:
An array of FullURL objects with the URL, URL Title from the ICPListEntryIterator. Icons and other components are not included.

GetPTSession

public static final IPTSession GetPTSession(AActivitySpace owner)
Gets the Plumtree Session from the Activityspace.

Parameters:
owner - Current Activityspace.
Returns:
Plumtree session.
Throws:
XPIllegalArgumentException - If the provided AActivityspace is null.
XPClassCastException - If the provided AActivityspace has not been initialized correctly.

GetNavigationModelExists

public static boolean GetNavigationModelExists(AActivitySpace owner)
Helper method that checks whether or not the NavigationModel object is present on the activityspace.

Parameters:
owner - Current Activityspace object.
Returns:
true implies the NavigationModel is present, false otherwise.
Throws:
XPIllegalArgumentException - If the provided AActivityspace is null

GetNavigationModel

public static NavigationModel GetNavigationModel(AActivitySpace owner)
Deprecated. All functionality is available from TaskAPI functions, no need for NavigationModel.

Helper method that gets the NavigationModel object from an activityspace or throws an exception if the AActivityspace is invalid.

Parameters:
owner - AActivityspace object
Returns:
NavigationModel object
Throws:
XPIllegalArgumentException - If the provided AActivityspace is null or the NavigationModel is not available on the current Activity Space.

GetASModelExist

public static boolean GetASModelExist(AActivitySpace owner,
                                      java.lang.String strModelName)
Helper method to check if the specified Model object exists in the current Activityspace.

Parameters:
owner - Current Activityspace.
strModelName - Name of the Model object, defined as a static constant on every model object named STR_MVC_CLASS_NAME
Returns:
true if the specified model exists on the activutyspace, false otherwise.

GetASModel

public static java.lang.Object GetASModel(AActivitySpace owner,
                                          java.lang.String strModelName)
Gets the specified Activityspace Model object.

Parameters:
owner - Current Activityspace.
strModelName - Name of the Model object, defined as a static constant on every model object named STR_MVC_CLASS_NAME
Returns:
The requested Activityspace Model object or null if it does not exist.

GetMyPortalPageModel

public static MyPortalModel GetMyPortalPageModel(AActivitySpace owner)
Gets the MyPortalModel object.

Parameters:
owner - Current Activityspace.
Returns:
MyPortalModel object, or null if MyPortalModel was not found

GetMyPortalPageModelExists

public static boolean GetMyPortalPageModelExists(AActivitySpace owner)
Checks if the MyPortalModel exists in the current Activityspace.

Parameters:
owner - Current Activityspace.
Returns:
true if the MyPortalModel exists, false otherwise.

GetSiteMapPageModel

public static SiteMapModel GetSiteMapPageModel(AActivitySpace owner)
Gets the SiteMapModel object.

Parameters:
owner - Current Activityspace.
Returns:
SiteMapModel object, or null if MyPortalModel was not found

GetSiteMapPageModelExists

public static boolean GetSiteMapPageModelExists(AActivitySpace owner)
Checks if the SiteMapModel exists in the current Activityspace.

Parameters:
owner - Current Activityspace.
Returns:
true if the SiteMapModel exists, false otherwise.

GetGatewayPageModel

public static GatewayModel GetGatewayPageModel(AActivitySpace owner)
Gets the GatewayModel object.

Parameters:
owner - Current Activityspace.
Returns:
SiteMapModel object, or null if GatewayModel was not found

GetGatewayPageModelExists

public static boolean GetGatewayPageModelExists(AActivitySpace owner)
Checks if the GatewayModel exists in the current Activityspace.

Parameters:
owner - Current Activityspace.
Returns:
true if the GatewayModel exists, false otherwise.

GetActivitySpaceName

public static java.lang.String GetActivitySpaceName(AActivitySpace owner)
Gets the name of the provided Activityspace.

Parameters:
owner - Current Activityspace.
Returns:
Name of the Activityspace.

IsCurrentPageInPreviewMode

public static boolean IsCurrentPageInPreviewMode(AActivitySpace owner)
Checks if the current Page is a Preview Page. For example, Preview Portlet or Preview Community page.

Parameters:
owner - Current Activityspace.
Returns:
true if the current page is a preview page, false otherwise.

IsCurrentPageInEditDefaultProfileMode

public static boolean IsCurrentPageInEditDefaultProfileMode(AActivitySpace owner)
Checks if the current page is an Edit Default Profile page.

Parameters:
owner - Current Activityspace.
Returns:
true if the current page is a Edit Default Profile page, false otherwise.

IsCurrentActivitySpace

public static boolean IsCurrentActivitySpace(AActivitySpace owner,
                                             java.lang.String strASName)
Checks if the current Activityspace is the specified Activityspace type, E.g. MyPageAS.

Parameters:
owner - Current Activityspace.
strASName - Name of Activityspace type to check for.
Returns:
true if the current Activityspace is of the specified type, false if not or Activityspace name is null.

IsCurrentDisplayPage

public static boolean IsCurrentDisplayPage(AActivitySpace owner,
                                           java.lang.String strPageName)
Checks if the current DisplayPage is the specified DisplayPage type, E.g. PlumtreeDP or MyPortalDP.

Parameters:
owner - Current Activityspace.
strPageName - Name of the DisplayPage, defined on each DisplayPage as a static constant named STR_MVC_CLASS_NAME.
Returns:
true if the current DisplayPage is of the specified type, false if not or DisplayPage name is null.

UseFriendlyURLS

public static final boolean UseFriendlyURLS(int classId)
Checks whether the classId supports friendly URLs This method is primarily used to check if specific opener links should generate friendly URLs or regular opener URLs.

Parameters:
classId - Class Id of the object type to create URL for
Returns:
Result whether friendly URLs should be used for the class type

UseFriendlyURLS

public static final boolean UseFriendlyURLS(int classId,
                                            java.lang.String queryStringArgs)
Checks whether the classId supports friendly URLs also considering any additional query string parameters. This method is primarily used to check if specific opener links should generate friendly URLs or regular opener URLs.

Parameters:
classId - Class Id of the object type to create URL for
queryStringArgs - Any query string parameters on the URL
Returns:
Result whether friendly URLs should be used for the class type



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