public class SmartContext extends HashMap<String,Object> implements Serializable
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
static String |
SMART_USER |
static String |
SMART_USER_ID |
| Constructor and Description |
|---|
SmartContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
authorize(AuthenticatedUser user) |
SmartBindingResult |
bind(Object object) |
SmartBindingResult |
bind(Object object,
String objectName) |
SmartBindingResult |
bind(Object object,
String objectName,
String[] allowedFields,
String[] disallowedFields) |
SmartBindingResult |
bind(String objectName,
String objectClass,
String channel,
String[] allowedFields,
String[] disallowedFields,
String scope) |
boolean |
canTryAutoLogin() |
String |
code(String key) |
String |
conf(String key) |
String |
css(String less) |
Datetime |
date() |
Datetime |
date(String date) |
boolean |
dateEquals(Datetime t1,
Datetime t2,
String format) |
void |
deauthorize(AuthenticatedUser user) |
String |
eval(Map map,
String script) |
String |
eval(String script) |
boolean |
evalRule(Map map,
String rule) |
boolean |
evalRule(String rule) |
org.springframework.context.ApplicationContext |
getApplicationContext() |
Object |
getBean(String ref) |
org.springframework.web.servlet.support.BindStatus |
getBindStatus(String path) |
org.springframework.web.servlet.support.BindStatus |
getBindStatus(String path,
String propertyName) |
String |
getBrowser() |
String |
getClientData(String key) |
SmartController |
getController() |
Exception |
getException() |
String |
getRef() |
String |
getReferer() |
javax.servlet.http.HttpServletRequest |
getRequest() |
org.springframework.web.servlet.support.RequestContext |
getRequestContext() |
org.springframework.core.io.Resource |
getResource(String path) |
javax.servlet.http.HttpServletResponse |
getResponse() |
Map |
getSession() |
SmartApp |
getSmartApp() |
SmartRequest |
getSmartRequest() |
SmartRequest |
getStoredRequest() |
String |
getURI() |
String |
getURI(String ref) |
SmartUserAgent |
getUserAgent() |
Number |
getUserId() |
String |
getVersion() |
int |
intParam(String key) |
boolean |
isAuthenticated() |
boolean |
isBreak() |
boolean |
isDevice() |
boolean |
isHilited(String ref) |
boolean |
isLoginRequest() |
boolean |
isLogoutRequest() |
boolean |
isRedirected() |
boolean |
isStoredRequest() |
List<SmartController> |
level(int i) |
String |
limit(String text,
int limit) |
void |
load(String objectName,
String objectClass,
String channel,
String scope) |
void |
loadRequest() |
void |
logout() |
List |
newList() |
Map |
newMap() |
Pager |
newPager(List list,
int pageNumber) |
Pager |
newPager(List list,
int pageNumber,
int linksNum,
int itemsForPageNum) |
String |
now() |
String |
param(String key) |
Datetime |
parseDate(String date) |
String |
plainText(String html) |
int |
rand() |
int |
rand(int num) |
void |
redirect(String ref) |
void |
reverse(List list) |
void |
sendError(String errorMessageKey,
String errorMessage) |
void |
sendmail(String email,
String name,
boolean starttl) |
void |
sendRedirect(String uri) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBreak(boolean isBreak) |
void |
setClientData(String key,
String value) |
void |
setException(Exception exception) |
void |
setRef(String ref) |
void |
setRef(String name,
String extension) |
void |
setSmartApp(SmartApp smartApp) |
void |
shuffle(List list) |
void |
stop() |
void |
storeRequest() |
Datetime |
toDate(String s) |
org.json.JSONArray |
toJsonArray(String array) |
org.json.JSONObject |
toJsonObject(String object) |
Long |
toLong(String s) |
String |
tr(String key) |
String |
tr(String key,
Object target) |
void |
tryAutoLogin() |
boolean |
tryLogin(boolean always) |
boolean |
tryLogout() |
String |
utf7(String text) |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic static final String SMART_USER
public static final String SMART_USER_ID
public SmartContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public String getVersion()
public org.json.JSONArray toJsonArray(String array)
public org.json.JSONObject toJsonObject(String object)
public boolean isBreak()
public void setBreak(boolean isBreak)
public void stop()
public Exception getException()
public void setException(Exception exception)
public String getReferer()
public SmartApp getSmartApp()
public void setSmartApp(SmartApp smartApp)
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
public SmartRequest getSmartRequest()
public Map getSession()
public void storeRequest()
public SmartRequest getStoredRequest()
public boolean isStoredRequest()
public void loadRequest()
public org.springframework.web.servlet.support.RequestContext getRequestContext()
public List<SmartController> level(int i) throws SmartControllerNotFoundException
SmartControllerNotFoundExceptionpublic boolean isHilited(String ref)
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public String getRef()
public void setRef(String ref)
public String getURI() throws SmartControllerNotFoundException
SmartControllerNotFoundExceptionpublic org.springframework.core.io.Resource getResource(String path)
public int intParam(String key)
public Number getUserId()
public void authorize(AuthenticatedUser user) throws Exception
Exceptionpublic void deauthorize(AuthenticatedUser user) throws Exception
Exceptionpublic void redirect(String ref) throws IOException
IOExceptionpublic void sendRedirect(String uri) throws IOException
IOExceptionpublic boolean isRedirected()
public SmartController getController() throws SmartControllerNotFoundException
SmartControllerNotFoundExceptionpublic SmartBindingResult bind(String objectName, String objectClass, String channel, String[] allowedFields, String[] disallowedFields, String scope) throws Exception
Exceptionpublic void load(String objectName, String objectClass, String channel, String scope) throws Exception
Exceptionpublic SmartBindingResult bind(Object object, String objectName, String[] allowedFields, String[] disallowedFields) throws Exception
Exceptionpublic SmartBindingResult bind(Object object, String objectName) throws Exception
Exceptionpublic SmartBindingResult bind(Object object) throws Exception
Exceptionpublic int rand(int num)
public org.springframework.web.servlet.support.BindStatus getBindStatus(String path)
public org.springframework.web.servlet.support.BindStatus getBindStatus(String path, String propertyName)
public String now()
public Datetime date()
public void reverse(List list)
public void shuffle(List list)
public void sendmail(String email, String name, boolean starttl) throws Exception
Exceptionpublic void setClientData(String key, String value) throws Exception
Exceptionpublic String getBrowser()
public boolean isDevice()
public SmartUserAgent getUserAgent()
public void sendError(String errorMessageKey, String errorMessage) throws Exception
Exceptionpublic Map newMap()
public List newList()
Copyright © 2015. All rights reserved.