Modifier and Type | Class and Description |
---|---|
static class |
ElementaryURLHelper.Code |
Modifier and Type | Field and Description |
---|---|
static String |
BACK_PARAM_NAME |
static String |
EXPCOMP |
static String |
GLOBAL_CONTEXT_INSTANCE_ID_PARAM |
static String |
IMG_SERVLET_PATH |
static String |
RESOURCE_SERVLET_PATH |
static String |
SPACIAL_RIGHT_CODE_KEY |
static String |
TRANSFORM |
Constructor and Description |
---|
ElementaryURLHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
addAllParams(String url,
String... params)
add get attribute to a url.
|
protected static String |
addHost(ContentContext ctx,
String url) |
static String |
addParam(String url,
String name,
String value) |
static String |
addParams(String url,
String params) |
static String |
addRawParam(String url,
String name,
String value) |
static String |
addSpecialRightCode(GlobalContext globalContext,
javax.servlet.http.HttpSession session,
String url) |
static String |
createAbsoluteURL(ContentContext ctx,
String uri) |
static String |
createForwardURL(ContentContext ctx,
String url)
remove context from url if exist.
|
static String |
createJSPComponentURL(javax.servlet.http.HttpServletRequest request,
String url,
String componentType) |
protected static String |
createNoProtocolURL(ContentContext ctx,
GlobalContext globalContext,
String uri,
boolean ajax,
boolean withPathPrefix,
boolean widthEncodeURL) |
static String |
createSSLURL(String uri,
ContentContext ctx) |
static String |
createStaticComponentURL(javax.servlet.http.HttpServletRequest request,
String url,
String componentType) |
protected static String |
createStaticURL(ContentContext ctx,
MenuElement referencePage,
String inUrl,
boolean withPathPrefix) |
static String |
createStaticURL(ContentContext ctx,
String inUrl) |
static String |
createTeaserURL(ContentContext ctx,
String url) |
static String |
createThumbURL(ContentContext ctx,
String url,
int width,
boolean ts) |
static String |
createTransformLongDescURL(ContentContext ctx,
String url) |
static String |
createTransformURL(ContentContext ctx,
MenuElement referencePage,
String url,
String filter) |
static String |
createTransformURL(ContentContext ctx,
MenuElement referencePage,
String url,
String filter,
String templateName) |
static String |
createTransformURL(ContentContext ctx,
MenuElement referencePage,
Template template,
String url,
String filter) |
static String |
createTransformURL(ContentContext ctx,
MenuElement referencePage,
Template template,
String url,
String filter,
IImageFilter comp) |
static String |
createTransformURL(ContentContext ctx,
StaticInfo info,
String filter) |
static String |
createTransformURL(ContentContext ctx,
String url,
String filter) |
static String |
createTransformURLWithoutCountAccess(ContentContext ctx,
String url,
String filter) |
protected static String |
createURL(ContentContext ctx,
GlobalContext globalContext,
String uri,
boolean ajax,
boolean forceTemplate,
boolean withPathPrefix,
boolean widthEncodeURL) |
static Map<String,String> |
extractParameterFromURL(String url) |
static URL |
getGravatarURL(String email,
String alternativeURL)
creata a URL to gravatar of email, alternativeURL is the url use if no
avatar registered on gravatar.
|
static String |
getIconeURL(ContentContext ctx,
String icone) |
static Map<String,String> |
getParams(String url) |
static Map<String,String> |
getParams(URL url) |
static String |
getParamsAsString(String url) |
static String |
getPathPrefix(ContentContext ctx)
return the path path prefix defined in ServletContext
|
static void |
main(String[] args)
return the path path prefix defined in ServletContext
|
static String |
mergePath(String path1,
String path2)
merge the path. sample mergePath ("/cat", "element" ) -> /cat/element,
mergePath ("/test/", "/google) -> /test/google
|
static String |
removeParam(String url)
remove param. test.html?
|
static String |
removeSite(ContentContext ctx,
String url) |
static String |
removeStaticFolderPrefix(ContentContext ctx,
String path)
remove static folder at the start of the path.
|
static String |
removeURI(String inURL) |
static void |
resetPathPrefix(ContentContext ctx) |
public static final String EXPCOMP
public static final String GLOBAL_CONTEXT_INSTANCE_ID_PARAM
public static final String TRANSFORM
public static final String SPACIAL_RIGHT_CODE_KEY
public static final String BACK_PARAM_NAME
public static final String IMG_SERVLET_PATH
public static final String RESOURCE_SERVLET_PATH
public static String addAllParams(String url, String... params)
params
- a list of string represent param and value. (sp:
name=patrick).public static final String addSpecialRightCode(GlobalContext globalContext, javax.servlet.http.HttpSession session, String url)
public static String createAbsoluteURL(ContentContext ctx, String uri)
public static String createJSPComponentURL(javax.servlet.http.HttpServletRequest request, String url, String componentType)
protected static final String createNoProtocolURL(ContentContext ctx, GlobalContext globalContext, String uri, boolean ajax, boolean withPathPrefix, boolean widthEncodeURL)
public static final String createSSLURL(String uri, ContentContext ctx)
public static String createStaticComponentURL(javax.servlet.http.HttpServletRequest request, String url, String componentType)
protected static String createStaticURL(ContentContext ctx, MenuElement referencePage, String inUrl, boolean withPathPrefix)
public static String createStaticURL(ContentContext ctx, String inUrl)
public static String createTeaserURL(ContentContext ctx, String url)
public static String createThumbURL(ContentContext ctx, String url, int width, boolean ts)
public static String createTransformLongDescURL(ContentContext ctx, String url) throws Exception
Exception
public static String createTransformURL(ContentContext ctx, MenuElement referencePage, Template template, String url, String filter) throws Exception
Exception
public static String createTransformURL(ContentContext ctx, MenuElement referencePage, Template template, String url, String filter, IImageFilter comp) throws Exception
Exception
public static String createTransformURL(ContentContext ctx, MenuElement referencePage, String url, String filter) throws Exception
Exception
public static String createTransformURL(ContentContext ctx, MenuElement referencePage, String url, String filter, String templateName) throws Exception
Exception
public static String createTransformURL(ContentContext ctx, String url, String filter) throws Exception
Exception
public static String createTransformURL(ContentContext ctx, StaticInfo info, String filter) throws Exception
Exception
public static String createTransformURLWithoutCountAccess(ContentContext ctx, String url, String filter) throws Exception
Exception
protected static String createURL(ContentContext ctx, GlobalContext globalContext, String uri, boolean ajax, boolean forceTemplate, boolean withPathPrefix, boolean widthEncodeURL)
protected static String addHost(ContentContext ctx, String url)
public static String getIconeURL(ContentContext ctx, String icone)
public static String getPathPrefix(ContentContext ctx)
request
- public static void resetPathPrefix(ContentContext ctx)
public static void main(String[] args)
request
- public static final String removeParam(String url)
url
- public static final String removeSite(ContentContext ctx, String url)
public static String mergePath(String path1, String path2)
path1
- path2
- public static String createForwardURL(ContentContext ctx, String url)
ctx
- url
- public static URL getGravatarURL(String email, String alternativeURL) throws MalformedURLException
email
- alternativeURL
- MalformedURLException
public static String removeStaticFolderPrefix(ContentContext ctx, String path)
public static String removeURI(String inURL) throws MalformedURLException
MalformedURLException
Copyright © 2012-2018. All Rights Reserved.