| java.lang.Object org.apache.jetspeed.headerresource.HeaderResourceLib
HeaderResourceLib | public class HeaderResourceLib (Code) | | HeaderResourceLib static utility methods
author: Steve Milek version: $Id: HeaderResourceLib.java 188569 2006-10-21 13:35:18Z smilek $ |
Field Summary | |
final protected static String | EOL |
Method Summary | |
public static String | getHeaderType(Integer headerTypeId) | public static int | getHeaderTypeId(String headerType) | public static String | getPortalBaseUrl(RequestContext requestContext) Portal base url ( e.g. | public static String | getPortalBaseUrl(RequestContext requestContext, BasePortalURL baseUrlAccessOverride) Portal base url ( e.g. | public static String | getPortalBaseUrl(RequestContext requestContext, BasePortalURL baseUrlAccessOverride, boolean fullUrl) Portal base url ( e.g. | public static String | getPortalResourceUrl(String relativePath, String portalBaseUrl) Portal base url with relativePath argument appended ( e.g. | public static String | getPortalResourceUrl(String relativePath, String portalBaseUrl, boolean encode, RequestContext requestContext) Portal base url with relativePath argument appended ( e.g. | public static String | getPortalUrl(String portalBaseUrl, RequestContext requestContext) Portal base servlet url ( e.g. | public static String | getPortalUrl(String portalBaseUrl, RequestContext requestContext, String servletPath) Portal base servlet url ( e.g. | public static String | getPortalUrl(String relativePath, String portalUrl) Portal base servlet url with relativePath argument appended ( e.g. | public static String | getPortalUrl(String relativePath, String portalUrl, boolean encode, RequestContext requestContext) Portal base servlet url with relativePath argument appended ( e.g. | public static String | makeJSONBoolean(Object source) | public static String | makeJSONInteger(Object source, boolean quote) | public static StringBuffer | makeJSONObject(Map objectMap, boolean whenEmptyReturnNewObject) | public static StringBuffer | makeJSONObject(Map[] objectMaps, boolean whenEmptyReturnNewObject) | public static StringBuffer | makeJSONObject(StringBuffer jsonBuffer, Map objectMap, boolean whenEmptyReturnNewObject) | public static StringBuffer | makeJSONObject(StringBuffer jsonBuffer, Map[] objectMaps, boolean whenEmptyReturnNewObject) | public static String | makeJSONStringArray(Collection stringList) | public static String | makeJSONStringArray(Collection stringList, List compiledUniqueValues) | public static String | makeJavascriptStatement(String statement, String indent, boolean addEOL) |
getHeaderTypeId | public static int getHeaderTypeId(String headerType)(Code) | | |
getPortalBaseUrl | public static String getPortalBaseUrl(RequestContext requestContext)(Code) | | Portal base url ( e.g. http://localhost:8080/jetspeed )
portal base url |
getPortalBaseUrl | public static String getPortalBaseUrl(RequestContext requestContext, BasePortalURL baseUrlAccessOverride)(Code) | | Portal base url ( e.g. http://localhost:8080/jetspeed )
The optional BasePortalURL argument is provided to allow the common BasePortalURL usage by various jetspeed components
to be properly supported in this url generation
portal base url |
getPortalBaseUrl | public static String getPortalBaseUrl(RequestContext requestContext, BasePortalURL baseUrlAccessOverride, boolean fullUrl)(Code) | | Portal base url ( e.g. http://localhost:8080/jetspeed )
The optional BasePortalURL argument is provided to allow the common BasePortalURL usage by various jetspeed components
to be properly supported in this url generation
When the fullUrl parameter is true, the scheme, servername and port will be provided in the baseUrl,
regardless if global property portalurl.relative.only is set to true in jetspeed.properties.
This is needed for HeaderResourceImpl.jetspeedGenerateBasetag() for rendering a valid base tag (for which IE requires an absolute url to work).
Note: if portalurl.relative.only is set to true to support a Proxy based front end, better remove de (default) "header.basetag" rendering setting
from assembly/headtag.xml, otherwise the desktop still won't work properly behind the Proxy.
portal base url |
getPortalResourceUrl | public static String getPortalResourceUrl(String relativePath, String portalBaseUrl)(Code) | | Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
portal base url with relativePath argument appended |
getPortalResourceUrl | public static String getPortalResourceUrl(String relativePath, String portalBaseUrl, boolean encode, RequestContext requestContext)(Code) | | Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
RequestContext argument is needed only when encode argument is true (it's needed to call HttpServletResponse.encodeURL())
Method signature/behavior is a bit strange because this is a static method trying to accomodate
callers that lazy cache portalBaseUrl string
portal base url with relativePath argument appended |
getPortalUrl | public static String getPortalUrl(String portalBaseUrl, RequestContext requestContext)(Code) | | Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
portal base servlet url |
getPortalUrl | public static String getPortalUrl(String portalBaseUrl, RequestContext requestContext, String servletPath)(Code) | | Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
Also expects servletPath argument to be defined
portal base servlet url |
getPortalUrl | public static String getPortalUrl(String relativePath, String portalUrl)(Code) | | Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
Expects portalUrl argument to be defined (ie. it does not call getPortalUrl)
portal base servlet url with relativePath argument appended |
getPortalUrl | public static String getPortalUrl(String relativePath, String portalUrl, boolean encode, RequestContext requestContext)(Code) | | Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
Expects portalUrl argument to be defined (ie. it does not call getPortalUrl)
RequestContext argument is needed only when encode argument is true (it's needed to call HttpServletResponse.encodeURL())
Method signature/behavior is a bit strange because this is a static method trying to accomodate
callers that lazy cache portalUrl string
portal base servlet url with relativePath argument appended |
makeJSONObject | public static StringBuffer makeJSONObject(Map objectMap, boolean whenEmptyReturnNewObject)(Code) | | |
makeJSONObject | public static StringBuffer makeJSONObject(Map[] objectMaps, boolean whenEmptyReturnNewObject)(Code) | | |
makeJavascriptStatement | public static String makeJavascriptStatement(String statement, String indent, boolean addEOL)(Code) | | |
|
|