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 ApplicationAdapter
getApplicationAdapter()
Returns the application adapter.java.lang.String
getBasePath()
Returns the base path that the current application is mapped to.java.lang.ClassLoader
getClassLoader()
Returns the class loader used by the current application.void
setBasePath(java.lang.String basePath)
Sets the application base path.void
setClassLoader(java.lang.ClassLoader classLoader)
java.lang.String
toRealPath(java.lang.String filePath)
Returns to convert the given file path with the real file path.java.io.File
toRealPathAsFile(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, addPropertyItemRuleMap, getActiveProfiles, getDefaultProfiles, getProperty, getProperty, getPropertyItemRuleMap, setActiveProfiles, setDefaultProfiles, setPropertyItemRuleMap, validateProfile
-
-
-
-
Constructor Detail
-
ContextEnvironment
public ContextEnvironment(ApplicationAdapter applicationAdapter)
-
-
Method Detail
-
getApplicationAdapter
public ApplicationAdapter getApplicationAdapter()
Description copied from interface:Environment
Returns the application adapter.- Returns:
- the application adapter
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Description copied from interface:Environment
Returns 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:Environment
Returns 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.IOException
Description copied from interface:Environment
Returns 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.IOException
Description copied from interface:Environment
Returns 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
-
-