public abstract class AbstractAgrosystAction
extends com.opensymphony.xwork2.ActionSupport
implements org.apache.struts2.interceptor.ServletRequestAware, org.apache.struts2.interceptor.ServletResponseAware, org.apache.struts2.interceptor.ParameterAware
| Modifier and Type | Field and Description |
|---|---|
protected AgrosystWebConfig |
config |
protected com.google.gson.Gson |
gson
gson (can be used into non json action to initialize json data).
|
static com.google.gson.GsonBuilder |
GSON_BUILDER |
protected static com.google.common.collect.Multimap<Class<?>,String> |
GSON_EXCLUSIONS |
protected static com.google.gson.TypeAdapter<Integer> |
INTEGER_ADAPTER |
protected NavigationContextService |
navigationContextService |
protected Map<String,String[]> |
parameters |
protected RichNavigationContext |
richNavigationContext |
protected javax.servlet.http.HttpServletRequest |
servletRequest |
protected javax.servlet.http.HttpServletResponse |
servletResponse |
protected AgrosystWebSession |
session |
| Constructor and Description |
|---|
AbstractAgrosystAction() |
| Modifier and Type | Method and Description |
|---|---|
AgrosystWebConfig |
getConfig() |
protected <T> Map<T,String> |
getEnumAsMap(T[] values)
Transform enumeration values into map with i18n value for each enum value.
|
com.google.gson.Gson |
getGson() |
protected NavigationContext |
getNavigationContext() |
RichNavigationContext |
getRichNavigationContext() |
AgrosystWebSession |
getSession() |
protected void |
initForInput() |
protected NavigationContext |
readNavigationContextCookie() |
void |
setConfig(AgrosystWebConfig config) |
void |
setNavigationContextService(NavigationContextService navigationContextService) |
void |
setParameters(Map<String,String[]> parameters) |
void |
setServletRequest(javax.servlet.http.HttpServletRequest servletRequest) |
void |
setServletResponse(javax.servlet.http.HttpServletResponse servletResponse) |
void |
setSession(AgrosystWebSession session) |
String |
toJson(Object element) |
protected NavigationContext |
verifyAndSaveNavigationContext(NavigationContext navigationContext) |
protected void |
writeNavigationContextCookie(NavigationContext navigationContext) |
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validateprotected static final com.google.common.collect.Multimap<Class<?>,String> GSON_EXCLUSIONS
public static final com.google.gson.GsonBuilder GSON_BUILDER
protected static final com.google.gson.TypeAdapter<Integer> INTEGER_ADAPTER
protected AgrosystWebConfig config
protected AgrosystWebSession session
protected NavigationContextService navigationContextService
protected javax.servlet.http.HttpServletRequest servletRequest
protected javax.servlet.http.HttpServletResponse servletResponse
protected RichNavigationContext richNavigationContext
protected com.google.gson.Gson gson
public com.google.gson.Gson getGson()
public void setServletRequest(javax.servlet.http.HttpServletRequest servletRequest)
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAwarepublic void setServletResponse(javax.servlet.http.HttpServletResponse servletResponse)
setServletResponse in interface org.apache.struts2.interceptor.ServletResponseAwarepublic void setParameters(Map<String,String[]> parameters)
setParameters in interface org.apache.struts2.interceptor.ParameterAwarepublic void setConfig(AgrosystWebConfig config)
public void setSession(AgrosystWebSession session)
public void setNavigationContextService(NavigationContextService navigationContextService)
public AgrosystWebConfig getConfig()
public AgrosystWebSession getSession()
protected NavigationContext getNavigationContext()
protected NavigationContext verifyAndSaveNavigationContext(NavigationContext navigationContext)
protected NavigationContext readNavigationContextCookie()
protected void writeNavigationContextCookie(NavigationContext navigationContext)
public RichNavigationContext getRichNavigationContext()
protected <T> Map<T,String> getEnumAsMap(T[] values)
values - values to transformprotected void initForInput()
Copyright © 2013 Inra. All rights reserved.