public class WebAppUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
appBases |
static List<String> |
vhostNames |
| Constructor and Description |
|---|
WebAppUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
checkJaxApplication(WebApplication webApplication)
This util method is used to check if the given application is a Jax-RS/WS app
|
static Map<String,WebApplicationsHolder> |
getAllWebappHolders(org.apache.axis2.context.ConfigurationContext configurationContext) |
static String |
getAppbase(String hostName)
This util method will return appbase value of matching host name from catalina-server.xml
|
static String |
getDefaultHost() |
static WebApplicationsHolder |
getDefaultWebappHolder(org.apache.axis2.context.ConfigurationContext configurationContext) |
static String |
getMatchingHostName(String filePath) |
static String |
getServerConfigHostName()
This will read "HostName" value from carbon.xml and will return
default host (from catalina-server.xml) if the value is null (or not defined)
|
static String |
getWebappDir(String webappFilePath)
This util method is used to return base dir name of webapp.
|
static String |
getWebappDirPath(String webappFilePath)
This util method is used to return file path of base dir.
|
static WebApplicationsHolder |
getWebappHolder(String webappFilePath,
org.apache.axis2.context.ConfigurationContext configurationContext)
This util method will return the web application holder of the given web app file
|
static String |
getWebappKey(File webappFile)
This will return a key with pair hostname:webappFileName
|
static String |
getWebappName(String webappFilePath) |
static boolean |
validateWebappFileName(String filename) |
public static String checkJaxApplication(WebApplication webApplication)
webApplication - application objectpublic static boolean validateWebappFileName(String filename)
public static String getWebappDirPath(String webappFilePath)
webappFilePath - path to webapppublic static String getMatchingHostName(String filePath)
filePath - web app base dir pathpublic static String getWebappKey(File webappFile)
webappFile - web application filepublic static String getAppbase(String hostName)
hostName - hostname of Host elementpublic static Map<String,WebApplicationsHolder> getAllWebappHolders(org.apache.axis2.context.ConfigurationContext configurationContext)
configurationContext - ConfigurationContext instancepublic static WebApplicationsHolder getWebappHolder(String webappFilePath, org.apache.axis2.context.ConfigurationContext configurationContext)
webappFilePath - AbsolutePath of webappconfigurationContext - ConfigurationContext instancepublic static String getWebappDir(String webappFilePath)
webappFilePath - path to web apppublic static String getWebappName(String webappFilePath)
webappFilePath - path to webapppublic static WebApplicationsHolder getDefaultWebappHolder(org.apache.axis2.context.ConfigurationContext configurationContext)
public static String getDefaultHost()
public static String getServerConfigHostName()
Copyright © 2015 WSO2. All rights reserved.