|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.portal.service.util.AppPathService
public final class AppPathService
this class provides services for locate repository or url
Field Summary | |
---|---|
static String |
SESSION_BASE_URL
|
Method Summary | |
---|---|
static UrlItem |
buildRedirectUrlItem(String strRootUrl,
String strUrlPropertySuffixKey)
Build the url item to use for a url that includes the redirection parameter for reconnection. |
static String |
getAbsolutePathFromRelativePath(String strDirectory)
Returns the absolute path of a repository from a relative path |
static String |
getAbsoluteUrl(javax.servlet.http.HttpServletRequest request,
String strUrl)
Returns the absolute url corresponding to the given one, if the later was found to be relative. |
static String |
getAdminMenuUrl()
Returns the admin menu page relative url (jsp/admin/site/AdminMenu.jsp) defined in lutece.properties |
static String |
getAdminPortalUrl()
Returns the admin portal page relative url (jsp/admin/site/AdminSite.jsp) defined in lutece.properties |
static ReferenceList |
getAvailableVirtualHosts()
Gets available virtual hosts defined in the config.properties |
static String |
getBaseUrl()
Deprecated. Use getBaseUrl(HttpServletRequest)
instead |
static String |
getBaseUrl(javax.servlet.http.HttpServletRequest request)
Return the url of the webapp, built from the request |
static String |
getPath(String strKey)
Returns the absolute path of a repository from a relative definition in properties file |
static String |
getPath(String strKey,
String strFilename)
Returns the absolute path of file from its relative definition in properties file. |
static String |
getPortalUrl()
Returns the portal page relative url (jsp/site/Portal.jsp) defined in lutece.properties |
static String |
getProdUrl()
Deprecated. Use getProdUrl(String) instead |
static String |
getProdUrl(javax.servlet.http.HttpServletRequest request)
Return the webapp prod url (or the base url if no prod url has been definied). |
static String |
getProdUrl(String strBaseUrl)
Return the webapp prod url. |
static FileInputStream |
getResourceAsStream(String strPath,
String strFilename)
Gets a file as stream |
static String |
getRootForwardUrl()
Returns the forward URL for webapp's root path. |
static String |
getSiteMessageUrl()
Returns the Site Message relative url (jsp/site/SiteMessage.jsp) defined in lutece.properties |
static String |
getSiteMessageUrl(javax.servlet.http.HttpServletRequest request)
Return the url of the webapp, built from the request |
static String |
getVirtualHostKey(javax.servlet.http.HttpServletRequest request)
Gets a Virtual Host Key if the request contains a virtual host key |
static String |
getWebappInstance()
Gets the webapp instance defined in the config.properties file with the key lutece.webapp.instance |
static String |
getWebAppPath()
Returns the webapp path from the properties file |
static void |
init(javax.servlet.ServletContext context)
Initialize The path service |
static void |
init(String strWebAppPath)
Initialize The webapppath |
static boolean |
isDefaultWebappInstance()
Returns whether the current instance is the default webapp instance |
static UrlItem |
resolveRedirectUrl(javax.servlet.http.HttpServletRequest request,
String strDefaultRedirectUrl)
Retrieve the url to redirect to after login. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SESSION_BASE_URL
Method Detail |
---|
public static void init(javax.servlet.ServletContext context)
context
- The servlet contextpublic static void init(String strWebAppPath)
strWebAppPath
- The Webapp pathpublic static String getPath(String strKey)
strKey
- the repository key definied in properties file
public static String getWebAppPath()
public static String getPath(String strKey, String strFilename)
strKey
- the repository key defined in properties filestrFilename
- The name of file
public static FileInputStream getResourceAsStream(String strPath, String strFilename)
strPath
- the pathstrFilename
- The name of file
public static String getAbsolutePathFromRelativePath(String strDirectory)
strDirectory
- the relative path
public static String getBaseUrl(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
@Deprecated public static String getBaseUrl()
getBaseUrl(HttpServletRequest)
instead
getBaseUrl(HttpServletRequest)
instead.
public static String getProdUrl(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
@Deprecated public static String getProdUrl()
getProdUrl(String)
instead
public static String getProdUrl(String strBaseUrl)
strBaseUrl
- The base URL
public static String getSiteMessageUrl(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static String getPortalUrl()
public static String getRootForwardUrl()
public static String getSiteMessageUrl()
public static String getAdminPortalUrl()
public static String getAdminMenuUrl()
public static ReferenceList getAvailableVirtualHosts()
public static String getVirtualHostKey(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
public static UrlItem buildRedirectUrlItem(String strRootUrl, String strUrlPropertySuffixKey)
strRootUrl
- the root part of the url, to build an absolute urlstrUrlPropertySuffixKey
- The property suffix to retrieve the url
public static UrlItem resolveRedirectUrl(javax.servlet.http.HttpServletRequest request, String strDefaultRedirectUrl)
request
- the http requeststrDefaultRedirectUrl
- the default url to go to after login
public static String getAbsoluteUrl(javax.servlet.http.HttpServletRequest request, String strUrl)
request
- the http request (provides the base path if needed)strUrl
- the url to transform
public static String getWebappInstance()
public static boolean isDefaultWebappInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |