com.clickntap.smart
Class SmartApp
java.lang.Object
com.clickntap.tool.types.AbstractComponent
com.clickntap.smart.SmartApp
- All Implemented Interfaces:
- Component
public class SmartApp
- extends AbstractComponent
|
Method Summary |
void |
addError(Throwable error)
|
void |
addExecutionTimes(long millis)
|
static SmartBindingResult |
bind(Object params,
Map map,
Object object,
String objectName,
String[] allowedFields,
String[] disallowedFields)
|
static SmartBindingResult |
bind(SmartContext ctx,
Object object,
String objectName,
String[] allowedFields,
String[] disallowedFields)
|
SmartBindingResult |
bind(SmartContext ctx,
String objectName,
String objectClass,
String channel,
String[] allowedFields,
String[] disallowedFields,
String scope)
|
void |
clearErrors()
|
String |
conf(String key)
|
String |
eval(Map ctx,
String script)
|
boolean |
evalRule(Map ctx,
String rule)
|
SmartController |
getController(SmartContext context)
|
org.springframework.core.io.Resource |
getDocRoot()
|
List<Long> |
getExecutionTimes()
|
List<String> |
getLastErrors()
|
SmartController |
getMapper()
|
SmartController |
getRoot()
|
Object |
load(SmartContext ctx,
String objectName,
String objectClass,
String channel,
String scope)
|
void |
setControllerDir(org.springframework.core.io.Resource controllerDir)
|
void |
setDocRoot(org.springframework.core.io.Resource docRoot)
|
void |
setEnvResource(org.springframework.core.io.Resource envResource)
|
void |
setEvalEngine(ScriptEngine scriptEngine)
|
void |
start()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartApp
public SmartApp()
getDocRoot
public org.springframework.core.io.Resource getDocRoot()
setDocRoot
public void setDocRoot(org.springframework.core.io.Resource docRoot)
setEnvResource
public void setEnvResource(org.springframework.core.io.Resource envResource)
setEvalEngine
public void setEvalEngine(ScriptEngine scriptEngine)
start
public void start()
throws Exception
- Throws:
Exception
getRoot
public SmartController getRoot()
getController
public SmartController getController(SmartContext context)
setControllerDir
public void setControllerDir(org.springframework.core.io.Resource controllerDir)
eval
public String eval(Map ctx,
String script)
throws Exception
- Throws:
Exception
evalRule
public boolean evalRule(Map ctx,
String rule)
throws Exception
- Throws:
Exception
load
public Object load(SmartContext ctx,
String objectName,
String objectClass,
String channel,
String scope)
throws Exception
- Throws:
Exception
bind
public SmartBindingResult bind(SmartContext ctx,
String objectName,
String objectClass,
String channel,
String[] allowedFields,
String[] disallowedFields,
String scope)
throws Exception
- Throws:
Exception
bind
public static SmartBindingResult bind(SmartContext ctx,
Object object,
String objectName,
String[] allowedFields,
String[] disallowedFields)
bind
public static SmartBindingResult bind(Object params,
Map map,
Object object,
String objectName,
String[] allowedFields,
String[] disallowedFields)
conf
public String conf(String key)
getMapper
public SmartController getMapper()
addError
public void addError(Throwable error)
addExecutionTimes
public void addExecutionTimes(long millis)
getExecutionTimes
public List<Long> getExecutionTimes()
getLastErrors
public List<String> getLastErrors()
clearErrors
public void clearErrors()
Copyright © 2014. All rights reserved.