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, wait
getAppName, getInitParameter, getInitParameterNames, getServletContext
protected SessionProvider sessionProvider
protected UrlMapping urlMapping
protected ActionChainMaker chainMaker
protected ViewMaker[] viewMakers
protected Class<?> mainModule
public Loading createLoading()
NutConfig
createLoading
in interface NutConfig
public Context getLoadingContext()
NutConfig
getLoadingContext
in interface NutConfig
public String getAppRoot()
getAppRoot
in interface NutConfig
public Object getAttribute(String name)
NutConfig
getAttribute
in interface NutConfig
name
- - 属性名public List<String> getAttributeNames()
NutConfig
getAttributeNames
in interface NutConfig
public <T> T getAttributeAs(Class<T> type, String name)
NutConfig
getAttributeAs
in interface NutConfig
T
- 类型type
- 类型name
- 属性名public void setAttribute(String name, Object obj)
NutConfig
setAttribute
in interface NutConfig
name
- 属性名obj
- 属性值public void setAttributeIgnoreNull(String name, Object obj)
NutConfig
setAttributeIgnoreNull
in interface NutConfig
name
- 属性名obj
- 属性值public Class<?> getMainModule()
NutConfig
getMainModule
in interface NutConfig
public AtMap getAtMap()
NutConfig
protected List<String> enum2list(Enumeration<?> enums)
public void setSessionProvider(SessionProvider provider)
setSessionProvider
in interface NutConfig
public SessionProvider getSessionProvider()
getSessionProvider
in interface NutConfig
public UrlMapping getUrlMapping()
getUrlMapping
in interface NutConfig
public void setUrlMapping(UrlMapping urlMapping)
setUrlMapping
in interface NutConfig
public ActionChainMaker getActionChainMaker()
getActionChainMaker
in interface NutConfig
public void setActionChainMaker(ActionChainMaker acm)
setActionChainMaker
in interface NutConfig
public void setViewMakers(ViewMaker[] makers)
setViewMakers
in interface NutConfig
public ViewMaker[] getViewMakers()
getViewMakers
in interface NutConfig
public void setMainModule(Class<?> mainModule)
setMainModule
in interface NutConfig
Copyright © 2017. All rights reserved.