|
||||||||||
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
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 |
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 |
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)
|
static void |
init(java.lang.String strWebAppPath)
|
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 |
Method Detail |
---|
public static void init(javax.servlet.ServletContext context)
public static void init(java.lang.String strWebAppPath)
public static java.lang.String getPath(java.lang.String strKey)
strKey
- the repository key definied in properties file
AppException
public static java.lang.String getWebAppPath()
AppException
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
AppException
public static java.lang.String getBaseUrl(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest
public static java.lang.String getPortalUrl()
public static java.lang.String getAdminPortalUrl()
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 urlstrUrlPropertyKey
- 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 |