Novell exteNd
Director 5.2 API

com.novell.afw.portal.aggregation
Class EboPortalAggregationURLHelper

java.lang.Object
 |
 +--com.novell.afw.portal.aggregation.EboPortalAggregationURLHelper

public final class EboPortalAggregationURLHelper
extends Object

Helper to build portal URLs

Since:
v.5.0

Constructor Summary
EboPortalAggregationURLHelper()
           
 
Method Summary
static StringBuffer getContextURL(HttpServletRequest request)
          get the URL that points to the applications context, including the schema, server name, and port Note: the returned URL is NOT URL encoded!
static StringBuffer getContextURL(com.novell.afw.portal.aggregation.PortletRequest request)
          get the URL that points to the applications context, including the schema, server name, and port Note: the returned URL is NOT URL encoded!
static String getPortalAdminConsoleURI(EbiPortalContext context)
          Gets the path URI to the Portal Administration Console
static String getPortalAdminConsoleURL(EbiPortalContext context)
          Gets the fully qualified URL to the Portal Administration Console Note: the returned URL is NOT URL encoded!
static String getPortalContainerAndPageURI(EbiPortalContext portalContext, String cName, String pName, boolean includeQueryParam, boolean encode)
          Gets the path URI that points to a container page and shared page (or personal page) Example: /context/portal/cn/containerPageName/pageName This signature of the method creates the URI using the current container page and shared page (or personal page) (or the default ones of the portal if the user is not loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally); Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
static String getPortalContainerAndPageURL(EbiPortalContext portalContext, boolean includeQueryParam, boolean encode)
          Gets the URL that points to a container page and shared page (or personal page) Example: http://server/context/portal/cn/containerPageName/pageName This signature of the method creates the URL using the current container page and shared page (or personal page) (or the default ones of the portal if the user is not loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally); Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
static String getPortalContainerAndPageURL(EbiPortalContext portalContext, EbiContainerPageInfo containerPageInfo, EbiPageLayoutInfo pageInfo, boolean includeQueryParam, boolean encode)
          get the URL that points to a container page and shared or user page Example: http://server/context/portal/cn/containerPageName/pageName this signature of the method creates the URL using the provided containerPageInfo and pageInfo Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalContainerAndPageURL(EbiPortalContext portalContext, String cName, String pName, boolean includeQueryParam, boolean encode)
          Gets the URL that points to a container page and shared page (or personal page) Example: http://server/context/portal/cn/containerPageName/pageName This signature of the method creates the URL using the current container page and shared page (or personal page) (or the default ones of the portal if the user is not loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally); Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
static String getPortalContainerURI(EbiPortalContext portalContext, String cName, boolean includeQueryParam, boolean encode)
          Gets the path URI that points to a container page Example: /context/portal/cn/CorporateContainerPage Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
static String getPortalContainerURL(EbiPortalContext portalContext, String cName, boolean includeQueryParam, boolean encode)
          Gets the URL that points to a container page Example: http://server/context/portal/cn/CorporateContainerPage Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
static String getPortalHomeURI(EbiPortalContext portalContext, boolean encode)
          get the absolute path URI that points to the user's default portal page, wrapped by the default container page Example: /context/portal/cn/containerPageName/pageName this signature of the method creates the URI using the current default container page and default shared page set for the user (or the portal if no user is loged in) Note: the returned URI is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalHomeURL(EbiPortalContext portalContext, boolean encode)
          get the URL that points to the user's default portal page, wrapped by the default container page Example: http://server/context/portal/cn/containerPageName/pageName this signature of the method creates the URL using the current default container page and default shared page set for the user (or the portal if no user is loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPageContainedURL(EbiPortalContext portalContext, EbiPageLayoutInfo pageInfo, boolean includeQueryParam, boolean encode)
          get the URL that displays the requested page in the users current container page Note: this differs from getPortalPageURL() in such that the page is wrapped by the users current container page Example: http://server/context/pagecn/pageName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPageContainedURL(EbiPortalContext portalContext, String pName, boolean includeQueryParam, boolean encode)
          get the URL that displays the requested page in the users current container page Note: this differs from getPortalPageURL() in such that the page is wrapped by the users current container page Example: http://server/context/pagecn/pageName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPageURI(EbiPortalContext portalContext, String pName, boolean includeQueryParam, boolean encode)
          get the absolute path URI that points to a portal page (without the enclosing container page) Example: /context/portal/page/pageName this signature of the method creates the URL using the page name provided via pName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPageURL(EbiPortalContext portalContext, boolean includeQueryParam, boolean encode)
          get the URL that points to a portal page (without the enclosing container page) Example: http://server/context/portal/page/pageName this signature of the method creates the URL using the current page set for the user (or the portal if no user is loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPageURL(EbiPortalContext portalContext, EbiPageLayoutInfo pageInfo, boolean includeQueryParam, boolean encode)
          get the URL that points to a portal page (without the enclosing container page) Example: http://server/context/portal/page/pageName this signature of the method creates the URL using the page provided via pageInfo Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPageURL(EbiPortalContext portalContext, String pName, boolean includeQueryParam, boolean encode)
          get the URL that points to a portal page (without the enclosing container page) Example: http://server/context/portal/page/pageName this signature of the method creates the URL using the page name provided via pName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPidURL(EbiPortalContext portalContext, String pidName, boolean includeQueryParam, boolean encode)
          Get the URL that renders a Portal PID page (static page with s3-components) Example: http://server/context/portal/pages/CorporateHome.html
static String getPortalPortletActionURI(EbiPortalContext portalContext, String portletRegID, String mode, String windowState, Map navParams, boolean encode)
          create a path URI pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Action', and with the passed params for window state and mode as correctly build URL params
static String getPortalPortletActionURL(EbiPortalContext portalContext, String portletRegID, String mode, String windowState, Map navParams, boolean encode)
          create a URL pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Action', and with the passed params for window state and mode as correctly build URL params
static String getPortalPortletRenderURI(EbiPortalContext portalContext, String portletRegID, String mode, String windowState, Map navParams, boolean encode)
          create a path URI pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Render', and with the passed params for window state and mode as correctly build query params
static String getPortalPortletRenderURL(EbiPortalContext portalContext, String portletRegID, String mode, String windowState, Map navParams, boolean encode)
          create a URL pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Render', and with the passed params for window state and mode as correctly build URL params
static String getPortalPortletURI(EbiPortalContext portalContext, String portletName, boolean includeQueryParam, boolean encode)
          get the URL that renders a single portlet on a separate temporary page Example: /context/portal/portlet/portletName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalPortletURL(EbiPortalContext portalContext, String portletName, boolean includeQueryParam, boolean encode)
          get the URL that renders a single portlet on a separate temporary page Example: http://server/context/portal/portlet/portletName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalQueryParams(EbiPortalContext portalContext, String urlType, String portletIID, String mode, String windowState, Map navParams)
          create the URL query params for a portal request (render or action) for a particular portlet example: "urlType=Render&wsrp-windowstate=minimized&novl-regid=StockQuotePortlet&novl-inst=DirectorM.StockQuotePortlet" Note: this signature of the method will check the url type, and the window state (not the mode!) for their validity and throw an IllegalArgumentException if any of them are not supported Note also: since this method doesn't have access to the portlets registration information, the mode cannot be checked for validity
static String getPortalQueryParams(EbiPortalContext portalContext, String urlType, String portletRegID, String portletIID, String mode, String windowState, Map navParams)
          create the URL query params for a portal request (render or action) for a particular portlet example: "urlType=Render&wsrp-windowstate=minimized&novl-regid=StockQuotePortlet&novl-inst=DirectorM.StockQuotePortlet" Note: this signature of the method will check the url type, the mode and the window state for their validity and throw an IllegalArgumentException if any of them are not supported
static String getPortalTCKURL(EbiPortalContext portalContext, String[] portletNames, boolean includeQueryParam, boolean encode)
          get the URL that displays the portlets that are passed in via portletNames Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
static String getPortalWirelessPageURI(EbiPortalContext portalContext, boolean encode)
          Get the absolute path URI that points to the portal's wireless page.
static boolean isSinglePortletRequest(EbiPortalContext portalContext)
          Determine if the current request is for a single portlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EboPortalAggregationURLHelper

public EboPortalAggregationURLHelper()
Method Detail

getPortalPageURL

public static String getPortalPageURL(EbiPortalContext portalContext,
                                      boolean includeQueryParam,
                                      boolean encode)
                               throws EboFactoryException,
                                      EboSecurityException,
                                      EboUnrecoverableSystemException
get the URL that points to a portal page (without the enclosing container page) Example: http://server/context/portal/page/pageName this signature of the method creates the URL using the current page set for the user (or the portal if no user is loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
EboSecurityException - if the user has no access rights to the current page
EboUnrecoverableSystemException - if the framework is missconfigured
Since:
v.5.0

getPortalHomeURL

public static String getPortalHomeURL(EbiPortalContext portalContext,
                                      boolean encode)
                               throws EboFactoryException,
                                      EboSecurityException,
                                      EboUnrecoverableSystemException
get the URL that points to the user's default portal page, wrapped by the default container page Example: http://server/context/portal/cn/containerPageName/pageName this signature of the method creates the URL using the current default container page and default shared page set for the user (or the portal if no user is loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
EboSecurityException - if the user has no access rights to the current page
EboUnrecoverableSystemException - if the framework is missconfigured
Since:
v.5.0

getPortalHomeURI

public static String getPortalHomeURI(EbiPortalContext portalContext,
                                      boolean encode)
                               throws EboFactoryException,
                                      EboSecurityException,
                                      EboUnrecoverableSystemException
get the absolute path URI that points to the user's default portal page, wrapped by the default container page Example: /context/portal/cn/containerPageName/pageName this signature of the method creates the URI using the current default container page and default shared page set for the user (or the portal if no user is loged in) Note: the returned URI is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the absolute path URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
EboSecurityException - if the user has no access rights to the current page
EboUnrecoverableSystemException - if the framework is missconfigured
Since:
v.5.0

getPortalWirelessPageURI

public static String getPortalWirelessPageURI(EbiPortalContext portalContext,
                                              boolean encode)
                                       throws EboFactoryException
Get the absolute path URI that points to the portal's wireless page. This page is a personal page that contains some wireless-enabled portlets which the user wants to access from a wireless device. Note: This URI is encoded Example: /context/portal/pg/MyWirelessProfile
Parameters:
portalContext - the EbiPortalContext
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the absolute path URI to the wireless page
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPageURL

public static String getPortalPageURL(EbiPortalContext portalContext,
                                      EbiPageLayoutInfo pageInfo,
                                      boolean includeQueryParam,
                                      boolean encode)
                               throws EboFactoryException
get the URL that points to a portal page (without the enclosing container page) Example: http://server/context/portal/page/pageName this signature of the method creates the URL using the page provided via pageInfo Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
pageInfo - the EbiPageLayoutInfo of the page to create the URL for
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPageURL

public static String getPortalPageURL(EbiPortalContext portalContext,
                                      String pName,
                                      boolean includeQueryParam,
                                      boolean encode)
                               throws EboFactoryException
get the URL that points to a portal page (without the enclosing container page) Example: http://server/context/portal/page/pageName this signature of the method creates the URL using the page name provided via pName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
pName - the name of the page the URL should lead to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPageURI

public static String getPortalPageURI(EbiPortalContext portalContext,
                                      String pName,
                                      boolean includeQueryParam,
                                      boolean encode)
                               throws EboFactoryException
get the absolute path URI that points to a portal page (without the enclosing container page) Example: /context/portal/page/pageName this signature of the method creates the URL using the page name provided via pName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
pName - the name of the page the URI should lead to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the absolute path URI
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalContainerAndPageURL

public static String getPortalContainerAndPageURL(EbiPortalContext portalContext,
                                                  boolean includeQueryParam,
                                                  boolean encode)
                                           throws EboFactoryException,
                                                  EboSecurityException,
                                                  EboUnrecoverableSystemException
Gets the URL that points to a container page and shared page (or personal page) Example: http://server/context/portal/cn/containerPageName/pageName This signature of the method creates the URL using the current container page and shared page (or personal page) (or the default ones of the portal if the user is not loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally); Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
Parameters:
portalContext - the EbiPortalContext to get to the page information
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
EboSecurityException - if the user has no access rights to the current page or container
EboUnrecoverableSystemException - if the framework is missconfigured
Since:
v.5.0

getPortalContainerAndPageURL

public static String getPortalContainerAndPageURL(EbiPortalContext portalContext,
                                                  EbiContainerPageInfo containerPageInfo,
                                                  EbiPageLayoutInfo pageInfo,
                                                  boolean includeQueryParam,
                                                  boolean encode)
                                           throws EboFactoryException
get the URL that points to a container page and shared or user page Example: http://server/context/portal/cn/containerPageName/pageName this signature of the method creates the URL using the provided containerPageInfo and pageInfo Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
containerPageInfo - the EbiContainerPageInfo representing the container page to use to build the URL
pageInfo - the EbiPageLayoutInfo representing the user or shared page to use to build the URL
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalContainerAndPageURL

public static String getPortalContainerAndPageURL(EbiPortalContext portalContext,
                                                  String cName,
                                                  String pName,
                                                  boolean includeQueryParam,
                                                  boolean encode)
                                           throws EboFactoryException
Gets the URL that points to a container page and shared page (or personal page) Example: http://server/context/portal/cn/containerPageName/pageName This signature of the method creates the URL using the current container page and shared page (or personal page) (or the default ones of the portal if the user is not loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally); Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
Parameters:
portalContext - the EbiPortalContext to get to the page information
cName - the name of the container page the URL should lead to
pName - the name of the page the URL should lead to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalContainerAndPageURI

public static String getPortalContainerAndPageURI(EbiPortalContext portalContext,
                                                  String cName,
                                                  String pName,
                                                  boolean includeQueryParam,
                                                  boolean encode)
                                           throws EboFactoryException
Gets the path URI that points to a container page and shared page (or personal page) Example: /context/portal/cn/containerPageName/pageName This signature of the method creates the URI using the current container page and shared page (or personal page) (or the default ones of the portal if the user is not loged in) Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally); Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
Parameters:
portalContext - the EbiPortalContext to get to the page information
cName - the name of the container page the URL should lead to
pName - the name of the page the URL should lead to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String representing teh absolute path URI
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalContainerURL

public static String getPortalContainerURL(EbiPortalContext portalContext,
                                           String cName,
                                           boolean includeQueryParam,
                                           boolean encode)
                                    throws EboFactoryException
Gets the URL that points to a container page Example: http://server/context/portal/cn/CorporateContainerPage Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
Parameters:
portalContext - the EbiPortalContext to get to the page information
cName - the name of the container page the URL should lead to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalContainerURI

public static String getPortalContainerURI(EbiPortalContext portalContext,
                                           String cName,
                                           boolean includeQueryParam,
                                           boolean encode)
                                    throws EboFactoryException
Gets the path URI that points to a container page Example: /context/portal/cn/CorporateContainerPage Note: The container page is validated to exist and if it does not, we attempt to find one the user has access to and use that one.
Parameters:
portalContext - the EbiPortalContext to get to the page information
cName - the name of the container page the URL should lead to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the absolute path URI
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPortletURL

public static String getPortalPortletURL(EbiPortalContext portalContext,
                                         String portletName,
                                         boolean includeQueryParam,
                                         boolean encode)
                                  throws EboFactoryException
get the URL that renders a single portlet on a separate temporary page Example: http://server/context/portal/portlet/portletName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
portletName - the name of the portlet to place as target of the URL
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPortletURI

public static String getPortalPortletURI(EbiPortalContext portalContext,
                                         String portletName,
                                         boolean includeQueryParam,
                                         boolean encode)
                                  throws EboFactoryException
get the URL that renders a single portlet on a separate temporary page Example: /context/portal/portlet/portletName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
portletName - the name of the portlet to place as target of the URI
includeQueryParam - append the query string of the current request (true) or not (false)
encode - pass true to encode the URL (via HttpServletResponse.encodeRedirectURL()), false to get the not encoded version
Returns:
a String containing the absolute path URI
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPortletRenderURL

public static String getPortalPortletRenderURL(EbiPortalContext portalContext,
                                               String portletRegID,
                                               String mode,
                                               String windowState,
                                               Map navParams,
                                               boolean encode)
                                        throws EboFactoryException,
                                               EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               com.novell.afw.portlet.exception.EboPortletDefinitionException,
                                               com.novell.afw.portlet.exception.EboPortletRegistrationException
create a URL pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Render', and with the passed params for window state and mode as correctly build URL params
Parameters:
portalContext - the EbiPortalContext
portletRegID - the portlet's registration id (the name)
mode - the mode to include in the render request (or null); this will be the new portlet mode for this instance
windowState - the window state to include in the request (or null); this will be the new window state for this portlet
navParams - a Map of key value pairs to include as custom params in the render URL
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String representing the render URL to this particular portlet in the single portlet page
Throws:
EboFactoryException -  
EboUnrecoverableSystemException -  
EboSecurityException -  
EboPortletDefinitionException -  
EboPortletRegistrationException -  
Since:
v.5.0

getPortalPortletRenderURI

public static String getPortalPortletRenderURI(EbiPortalContext portalContext,
                                               String portletRegID,
                                               String mode,
                                               String windowState,
                                               Map navParams,
                                               boolean encode)
                                        throws EboFactoryException,
                                               EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               com.novell.afw.portlet.exception.EboPortletDefinitionException,
                                               com.novell.afw.portlet.exception.EboPortletRegistrationException
create a path URI pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Render', and with the passed params for window state and mode as correctly build query params
Parameters:
portalContext - the EbiPortalContext
portletRegID - the portlet's registration id (the name)
mode - the mode to include in the render request (or null); this will be the new portlet mode for this instance
windowState - the window state to include in the request (or null); this will be the new window state for this portlet
navParams - a Map of key value pairs to include as custom params in the render URI
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String representing the render URI to this particular portlet in the single portlet page
Throws:
EboFactoryException -  
EboUnrecoverableSystemException -  
EboSecurityException -  
EboPortletDefinitionException -  
EboPortletRegistrationException -  
Since:
v.5.0

getPortalPortletActionURL

public static String getPortalPortletActionURL(EbiPortalContext portalContext,
                                               String portletRegID,
                                               String mode,
                                               String windowState,
                                               Map navParams,
                                               boolean encode)
                                        throws EboFactoryException,
                                               EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               com.novell.afw.portlet.exception.EboPortletDefinitionException,
                                               com.novell.afw.portlet.exception.EboPortletRegistrationException
create a URL pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Action', and with the passed params for window state and mode as correctly build URL params
Parameters:
portalContext - the EbiPortalContext
portletRegID - the portlet's registration id (the name)
mode - the mode to include in the render request (or null); this will be the new portlet mode for this instance
windowState - the window state to include in the request (or null); this will be the new window state for this portlet
navParams - a Map of key value pairs to include as custom params in the render URL
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String representing the action URL to this particular portlet in the single portlet page
Throws:
EboFactoryException -  
EboUnrecoverableSystemException -  
EboSecurityException -  
EboPortletDefinitionException -  
EboPortletRegistrationException -  
Since:
v.5.0

getPortalPortletActionURI

public static String getPortalPortletActionURI(EbiPortalContext portalContext,
                                               String portletRegID,
                                               String mode,
                                               String windowState,
                                               Map navParams,
                                               boolean encode)
                                        throws EboFactoryException,
                                               EboUnrecoverableSystemException,
                                               EboSecurityException,
                                               com.novell.afw.portlet.exception.EboPortletDefinitionException,
                                               com.novell.afw.portlet.exception.EboPortletRegistrationException
create a path URI pointing to a particular portlet (..../portal/portlet/{portletName}) with a urlType of 'Action', and with the passed params for window state and mode as correctly build URL params
Parameters:
portalContext - the EbiPortalContext
portletRegID - the portlet's registration id (the name)
mode - the mode to include in the render request (or null); this will be the new portlet mode for this instance
windowState - the window state to include in the request (or null); this will be the new window state for this portlet
navParams - a Map of key value pairs to include as custom params in the render URL
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String representing the action URL to this particular portlet in the single portlet page
Throws:
EboFactoryException -  
EboUnrecoverableSystemException -  
EboSecurityException -  
EboPortletDefinitionException -  
EboPortletRegistrationException -  
Since:
v.5.0

getPortalQueryParams

public static String getPortalQueryParams(EbiPortalContext portalContext,
                                          String urlType,
                                          String portletRegID,
                                          String portletIID,
                                          String mode,
                                          String windowState,
                                          Map navParams)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          com.novell.afw.portlet.exception.EboPortletDefinitionException,
                                          com.novell.afw.portlet.exception.EboPortletRegistrationException
create the URL query params for a portal request (render or action) for a particular portlet example: "urlType=Render&wsrp-windowstate=minimized&novl-regid=StockQuotePortlet&novl-inst=DirectorM.StockQuotePortlet" Note: this signature of the method will check the url type, the mode and the window state for their validity and throw an IllegalArgumentException if any of them are not supported
Parameters:
portalContext - the EbiPortalContext
urlType - the url type to create ('Render' or "Action')
portletRegID - the portlet's registration id (the name)
portletIID - the portlet instance id (or null for the default, if the portlet is not actually on a 'real' page)
mode - the new portlet mode that this url should set the portlet into
windowState - the new window state that this url should set the portlet into
navParams - a Map of key value pairs to use as custome query params
Returns:
a String starting with the 'urlType=' (not the '?'!) and incorporating all passed params
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  
EboPortletDefinitionException -  
EboPortletRegistrationException -  
IllegalArgumentException - when any of the urlType, windowState, portletRegID, mode are not valid
Since:
v.5.0

getPortalQueryParams

public static String getPortalQueryParams(EbiPortalContext portalContext,
                                          String urlType,
                                          String portletIID,
                                          String mode,
                                          String windowState,
                                          Map navParams)
                                   throws EboUnrecoverableSystemException,
                                          EboSecurityException,
                                          com.novell.afw.portlet.exception.EboPortletDefinitionException,
                                          com.novell.afw.portlet.exception.EboPortletRegistrationException
create the URL query params for a portal request (render or action) for a particular portlet example: "urlType=Render&wsrp-windowstate=minimized&novl-regid=StockQuotePortlet&novl-inst=DirectorM.StockQuotePortlet" Note: this signature of the method will check the url type, and the window state (not the mode!) for their validity and throw an IllegalArgumentException if any of them are not supported Note also: since this method doesn't have access to the portlets registration information, the mode cannot be checked for validity
Parameters:
portalContext - the EbiPortalContext
urlType - the url type to create ('Render' or "Action')
portletIID - the portlet instance id (or null for the default, if the portlet is not actually on a 'real' page)
mode - the new portlet mode that this url should set the portlet into
windowState - the new window state that this url should set the portlet into
navParams - a Map of key value pairs to use as custome query params
Returns:
a String starting with the 'urlType=' (not the '?'!) and incorporating all passed params
Throws:
EboUnrecoverableSystemException -  
EboSecurityException -  
EboPortletDefinitionException -  
EboPortletRegistrationException -  
IllegalArgumentException - when any of the urlType, windowState, portletRegID, mode are not valid
Since:
v.5.0

getPortalPageContainedURL

public static String getPortalPageContainedURL(EbiPortalContext portalContext,
                                               EbiPageLayoutInfo pageInfo,
                                               boolean includeQueryParam,
                                               boolean encode)
                                        throws EboFactoryException
get the URL that displays the requested page in the users current container page Note: this differs from getPortalPageURL() in such that the page is wrapped by the users current container page Example: http://server/context/pagecn/pageName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
pageInfo - the EbiPageLayoutInfo of the page that this URL should point to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalPageContainedURL

public static String getPortalPageContainedURL(EbiPortalContext portalContext,
                                               String pName,
                                               boolean includeQueryParam,
                                               boolean encode)
                                        throws EboFactoryException
get the URL that displays the requested page in the users current container page Note: this differs from getPortalPageURL() in such that the page is wrapped by the users current container page Example: http://server/context/pagecn/pageName Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
pName - the name of the page this URL should point to
includeQueryParam - append the query string of the current request (true) or not (false)
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getPortalTCKURL

public static String getPortalTCKURL(EbiPortalContext portalContext,
                                     String[] portletNames,
                                     boolean includeQueryParam,
                                     boolean encode)
                              throws EboFactoryException
get the URL that displays the portlets that are passed in via portletNames Note: the returned URL is already URL encoded if you choose so via the encode param (HttpServletResponse.encodeRedirectURL() is used internally);
Parameters:
portalContext - the EbiPortalContext to get to the page information
portletNames - an array of portlet names to render
includeQueryParam - append the query string of the current request (true) or not (false)
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String containing the full URL
Throws:
EboFactoryException - if the EbiPortalManager is not available
Since:
v.5.0

getContextURL

public static StringBuffer getContextURL(HttpServletRequest request)
get the URL that points to the applications context, including the schema, server name, and port Note: the returned URL is NOT URL encoded!
Parameters:
request - the current HttpServletRequest
Returns:
a StringBuffer containing the full URL to the servlet context
Since:
v.5.0

getContextURL

public static StringBuffer getContextURL(com.novell.afw.portal.aggregation.PortletRequest request)
get the URL that points to the applications context, including the schema, server name, and port Note: the returned URL is NOT URL encoded!
Parameters:
request - a portlet request (render or action)
Returns:
a StringBuffer containing the full URL to the servlet context
Since:
v.5.2

getPortalAdminConsoleURL

public static String getPortalAdminConsoleURL(EbiPortalContext context)
Gets the fully qualified URL to the Portal Administration Console Note: the returned URL is NOT URL encoded!
Parameters:
context - the current EbiPortalContext
Returns:
a String containing the full URL to the servlet context
Since:
v.5.0

getPortalAdminConsoleURI

public static String getPortalAdminConsoleURI(EbiPortalContext context)
Gets the path URI to the Portal Administration Console

example: "/MyContext/PAC"

Note: the returned URI is NOT encoded!
Parameters:
context - the current EbiPortalContext
Returns:
a String containing the absolute path URI to the PAC redirect servlet
Since:
v.5.0

getPortalPidURL

public static String getPortalPidURL(EbiPortalContext portalContext,
                                     String pidName,
                                     boolean includeQueryParam,
                                     boolean encode)
                              throws EboFactoryException
Get the URL that renders a Portal PID page (static page with s3-components) Example: http://server/context/portal/pages/CorporateHome.html
Parameters:
portalContext - the EbiPortalContext to get to the page information
pidName - the name of the portal page (PID) to place as target of the URL
includeQueryParam - append the query string of the current request (true) or not (false)
encode - true if the URL has to be URL encoded (via HttpServletResponse.encodeRedirectURL()), other wise false; for cookie-less session tracking this needs to be true
Returns:
a String containing the full URL to the PID page
Throws:
EboFactoryException -  
Since:
v.5.0

isSinglePortletRequest

public static boolean isSinglePortletRequest(EbiPortalContext portalContext)
Determine if the current request is for a single portlet. Example: http://localhost/Director/portal/portlet/WeatherPortlet would be a single (direct) request to a portlet
Parameters:
portalContext - the EbiPortalContext to get access to the request
Returns:
boolean true if the current request URI is a request to the single portlet page, otherwise false
Since:
v.5.0

Novell exteNd
Director 5.2 API