public abstract class AbstractNutConfig extends Object implements NutConfig
| Modifier and Type | Field and Description |
|---|---|
protected ActionChainMaker |
chainMaker |
protected Class<?> |
mainModule |
protected SessionProvider |
sessionProvider |
protected UrlMapping |
urlMapping |
protected ViewMaker[] |
viewMakers |
| Constructor and Description |
|---|
AbstractNutConfig(javax.servlet.ServletContext context) |
| Modifier and Type | Method and Description |
|---|---|
Loading |
createLoading()
根据 MainModule 中的 '@LoadingBy' 得到一个加载逻辑的实现类
|
protected List<String> |
enum2list(Enumeration<?> enums) |
ActionChainMaker |
getActionChainMaker() |
String |
getAppRoot() |
AtMap |
getAtMap()
在你的模块中通过 '@At' 声明的入口函数,可以存储在 AtMap 中,这个函数提供一个 AtMap 的实例
|
Object |
getAttribute(String name)
获取上下文环境中的属性对象
|
<T> T |
getAttributeAs(Class<T> type,
String name)
获取上下文环境中的属性对象,并自动转成指定类型
|
List<String> |
getAttributeNames()
获取上下文环境中属性名称的列表
|
Ioc |
getIoc() |
Context |
getLoadingContext()
加载时上下文包括环境变量,以及 "app.root" 等信息
|
Class<?> |
getMainModule()
获取配置的主模块,一般的说是存放在 initParameter 集合下的 "modules" 属性 值为一个 class 的全名
|
SessionProvider |
getSessionProvider() |
UrlMapping |
getUrlMapping() |
ViewMaker[] |
getViewMakers() |
void |
setActionChainMaker(ActionChainMaker acm) |
void |
setAttribute(String name,
Object obj)
在上下文环境中设置属性对象
|
void |
setAttributeIgnoreNull(String name,
Object obj)
在上下文环境中设置属性对象,如果值为 null,则忽略
|
void |
setMainModule(Class<?> mainModule) |
void |
setSessionProvider(SessionProvider provider) |
void |
setUrlMapping(UrlMapping urlMapping) |
void |
setViewMakers(ViewMaker[] makers) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAppName, getInitParameter, getInitParameterNames, getServletContextprotected SessionProvider sessionProvider
protected UrlMapping urlMapping
protected ActionChainMaker chainMaker
protected ViewMaker[] viewMakers
protected Class<?> mainModule
public Loading createLoading()
NutConfigcreateLoading in interface NutConfigpublic Context getLoadingContext()
NutConfiggetLoadingContext in interface NutConfigpublic String getAppRoot()
getAppRoot in interface NutConfigpublic Object getAttribute(String name)
NutConfiggetAttribute in interface NutConfigname - - 属性名public List<String> getAttributeNames()
NutConfiggetAttributeNames in interface NutConfigpublic <T> T getAttributeAs(Class<T> type, String name)
NutConfiggetAttributeAs in interface NutConfigT - 类型type - 类型name - 属性名public void setAttribute(String name, Object obj)
NutConfigsetAttribute in interface NutConfigname - 属性名obj - 属性值public void setAttributeIgnoreNull(String name, Object obj)
NutConfigsetAttributeIgnoreNull in interface NutConfigname - 属性名obj - 属性值public Class<?> getMainModule()
NutConfiggetMainModule in interface NutConfigpublic AtMap getAtMap()
NutConfigprotected List<String> enum2list(Enumeration<?> enums)
public void setSessionProvider(SessionProvider provider)
setSessionProvider in interface NutConfigpublic SessionProvider getSessionProvider()
getSessionProvider in interface NutConfigpublic UrlMapping getUrlMapping()
getUrlMapping in interface NutConfigpublic void setUrlMapping(UrlMapping urlMapping)
setUrlMapping in interface NutConfigpublic ActionChainMaker getActionChainMaker()
getActionChainMaker in interface NutConfigpublic void setActionChainMaker(ActionChainMaker acm)
setActionChainMaker in interface NutConfigpublic void setViewMakers(ViewMaker[] makers)
setViewMakers in interface NutConfigpublic ViewMaker[] getViewMakers()
getViewMakers in interface NutConfigpublic void setMainModule(Class<?> mainModule)
setMainModule in interface NutConfigCopyright © 2017. All rights reserved.