Package org.wso2.carbon.tomcat.ext.utils
Class URLMappingHolder
- java.lang.Object
-
- org.wso2.carbon.tomcat.ext.utils.URLMappingHolder
-
public class URLMappingHolder extends Object
This class is to hold URL mappings Vs actual URL in order to use them at run time.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetApplicationFromUrlMapping(String urlMapping)Method to obtain url application of url mapping from the map.StringgetDefaultHost()static URLMappingHoldergetInstance()Map<String,String>getUrlMappingOfApplication()Method to get the whole url mapping.List<String>getUrlMappingsPerApplication(String applicationContext)Method to get url mappings per applicationbooleanisUrlMappingExists(String urlMapping)Method to check whether the mapping exists or not.voidputUrlMappingForApplication(String urlMapping, String application)Method to put url mapping with application to the mapvoidremoveUrlMappingMap(String urlMapping)Method to remove url mapping from the map.voidsetDefaultHost(String defaultHost)
-
-
-
Method Detail
-
getInstance
public static URLMappingHolder getInstance()
-
getDefaultHost
public String getDefaultHost()
-
setDefaultHost
public void setDefaultHost(String defaultHost)
-
putUrlMappingForApplication
public void putUrlMappingForApplication(String urlMapping, String application)
Method to put url mapping with application to the map- Parameters:
urlMapping- url mapping for an applicationapplication- application which has url mapping
-
getApplicationFromUrlMapping
public String getApplicationFromUrlMapping(String urlMapping)
Method to obtain url application of url mapping from the map.- Parameters:
urlMapping- url mapping for an application- Returns:
- application which has url mapping
-
removeUrlMappingMap
public void removeUrlMappingMap(String urlMapping)
Method to remove url mapping from the map.- Parameters:
urlMapping- url mapping for an application
-
isUrlMappingExists
public boolean isUrlMappingExists(String urlMapping)
Method to check whether the mapping exists or not.- Parameters:
urlMapping- url mapping for an application- Returns:
- if mapping exists
-
getUrlMappingsPerApplication
public List<String> getUrlMappingsPerApplication(String applicationContext)
Method to get url mappings per application- Parameters:
applicationContext- the application to get the url mappings- Returns:
- list of url mappings for an application
-
-