|
||||||||||
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 java.lang.String |
SESSION_BASE_URL
|
Method Summary | |
---|---|
static UrlItem |
buildRedirectUrlItem(java.lang.String strRootUrl,
java.lang.String strUrlPropertySuffixKey)
Build the url item to use for a url that includes the redirection parameter for reconnection. |
static java.lang.String |
getAbsolutePathFromRelativePath(java.lang.String strDirectory)
Returns the absolute path of a repository from a relative path |
static java.lang.String |
getAdminMenuUrl()
Returns the admin menu page relative url (jsp/admin/site/AdminMenu.jsp) defined in lutece.properties |
static java.lang.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 java.lang.String |
getBaseUrl(javax.servlet.http.HttpServletRequest request)
Return the url of the webapp, built from rhe request |
static java.lang.String |
getPath(java.lang.String strKey)
Returns the absolute path of a repository from a relative definition in properties file |
static java.lang.String |
getPath(java.lang.String strKey,
java.lang.String strFilename)
Returns the absolute path of file from its relative definition in properties file. |
static java.lang.String |
getPortalUrl()
Returns the portal page relative url (jsp/site/Portal.jsp) defined in lutece.properties |
static java.io.FileInputStream |
getResourceAsStream(java.lang.String strPath,
java.lang.String strFilename)
Gets a file as stream |
static java.lang.String |
getSiteMessageUrl(javax.servlet.http.HttpServletRequest request)
Return the url of the webapp, built from the request |
static java.lang.String |
getVirtualHostKey(javax.servlet.http.HttpServletRequest request)
Gets a Virtual Host Key if the request contains a virtual host key |
static java.lang.String |
getWebAppPath()
Returns the webapp path from the properties file |
static void |
init(javax.servlet.ServletContext context)
Initialize The path service |
static void |
init(java.lang.String strWebAppPath)
Initialize The webapppath |
static UrlItem |
resolveRedirectUrl(javax.servlet.http.HttpServletRequest request,
java.lang.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 java.lang.String SESSION_BASE_URL
Method Detail |
---|
public static void init(javax.servlet.ServletContext context)
context
- The servlet contextpublic static void init(java.lang.String strWebAppPath)
strWebAppPath
- The Webapp pathpublic static java.lang.String getPath(java.lang.String strKey)
strKey
- the repository key definied in properties file
public static java.lang.String getWebAppPath()
public static java.lang.String getPath(java.lang.String strKey, java.lang.String strFilename)
strKey
- the repository key defined in properties filestrFilename
- The name of file
public static java.io.FileInputStream getResourceAsStream(java.lang.String strPath, java.lang.String strFilename)
strPath
- the pathstrFilename
- The name of file
public static java.lang.String getAbsolutePathFromRelativePath(java.lang.String strDirectory)
strDirectory
- the relative path
public static java.lang.String getBaseUrl(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static java.lang.String getSiteMessageUrl(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static java.lang.String getPortalUrl()
public static java.lang.String getAdminPortalUrl()
public static java.lang.String getAdminMenuUrl()
public static ReferenceList getAvailableVirtualHosts()
public static java.lang.String getVirtualHostKey(javax.servlet.http.HttpServletRequest request)
request
- The HTTP request
public static UrlItem buildRedirectUrlItem(java.lang.String strRootUrl, java.lang.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, java.lang.String strDefaultRedirectUrl)
request
- the http requeststrDefaultRedirectUrl
- the default url to go to after login
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |