Package com.aspectran.core.context.env
Class ContextEnvironment
- java.lang.Object
-
- com.aspectran.core.context.env.AbstractEnvironment
-
- com.aspectran.core.context.env.ContextEnvironment
-
- All Implemented Interfaces:
Environment
public class ContextEnvironment extends AbstractEnvironment
The Environment for ActivityContext
-
-
Constructor Summary
Constructors Constructor Description ContextEnvironment(ApplicationAdapter applicationAdapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationAdaptergetApplicationAdapter()Returns the application adapter.java.lang.StringgetBasePath()Returns the base path that the current application is mapped to.java.lang.ClassLoadergetClassLoader()Returns the class loader used by the current application.voidsetBasePath(java.lang.String basePath)Sets the application base path.voidsetClassLoader(java.lang.ClassLoader classLoader)java.lang.StringtoRealPath(java.lang.String filePath)Returns to convert the given file path with the real file path.java.io.FiletoRealPathAsFile(java.lang.String filePath)Returns to convert the given file path with the real file path.-
Methods inherited from class com.aspectran.core.context.env.AbstractEnvironment
acceptsProfiles, addPropertyItemRule, getActiveProfiles, getDefaultProfiles, getProperty, getPropertyItemRuleMap, setActiveProfiles, setDefaultProfiles, setPropertyItemRuleMap, validateProfile
-
-
-
-
Constructor Detail
-
ContextEnvironment
public ContextEnvironment(ApplicationAdapter applicationAdapter)
-
-
Method Detail
-
getApplicationAdapter
public ApplicationAdapter getApplicationAdapter()
Description copied from interface:EnvironmentReturns the application adapter.- Returns:
- the application adapter
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Description copied from interface:EnvironmentReturns the class loader used by the current application.- Returns:
- the class loader
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
-
getBasePath
public java.lang.String getBasePath()
Description copied from interface:EnvironmentReturns the base path that the current application is mapped to.- Returns:
- the application base path
-
setBasePath
public void setBasePath(java.lang.String basePath)
Sets the application base path.- Parameters:
basePath- the new application base path
-
toRealPath
public java.lang.String toRealPath(java.lang.String filePath) throws java.io.IOExceptionDescription copied from interface:EnvironmentReturns to convert the given file path with the real file path.- Parameters:
filePath- the specified file path- Returns:
- the real file path
- Throws:
java.io.IOException- if an I/O error has occurred
-
toRealPathAsFile
public java.io.File toRealPathAsFile(java.lang.String filePath) throws java.io.IOExceptionDescription copied from interface:EnvironmentReturns to convert the given file path with the real file path.- Parameters:
filePath- the specified file path- Returns:
- the real file path
- Throws:
java.io.IOException- if an I/O error has occurred
-
-