|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsxp.framework.Context
public class Context
The Class Context. Default implementation of a context.
The context is automatically instantiated by the framework. You can access it with
getContext()
. Do not create an instance yourself.
Field Summary | |
---|---|
protected static java.lang.String |
PREVIOUS_INPUT_PARAMETERS
The Constant PREVIOUS_INPUT_PARAMETERS. |
protected static java.lang.String |
RESTORE_PREVIOUS_INPUT
The Constant RESTORE_PREVIOUS_INPUT. |
Constructor Summary | |
---|---|
protected |
Context()
Instantiates a new context. |
Method Summary | ||
---|---|---|
void |
addDebugMessage(java.lang.String message)
Adds the debug message. |
|
void |
addDeveloperWarningMessage(java.lang.String message)
Adds a developer warning. |
|
void |
addFlashErrorMessage(java.lang.String message)
Adds the flash message. |
|
void |
addFlashInformationMessage(java.lang.String message)
Adds the flash message. |
|
void |
addFlashWarningMessage(java.lang.String message)
Adds the flash message. |
|
void |
clearRedirect()
|
|
java.lang.String |
getCommandId()
Gets the command id if this is a command request |
|
static
|
getContext()
Gets the context. |
|
java.lang.String |
getContextPath()
Gets the context path. |
|
java.util.Locale |
getCurrentLocale()
Gets the current locale. |
|
java.util.List<java.lang.String> |
getDebugMessages()
Gets the debug messages. |
|
java.lang.String |
getDelocalizedRequestUri()
|
|
java.util.List<java.lang.String> |
getDeveloperWarnings()
Gets the developer warnings. |
|
FlashMessages |
getFlashMessages()
Gets the flash messages. |
|
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Gets the http servlet request. |
|
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Gets the http servlet response. |
|
javax.servlet.http.HttpSession |
getHttpSession()
Gets the http session. |
|
ViewAlias |
getLastView()
Gets the last view. |
|
java.lang.String |
getLocalizedRequestUri()
|
|
ViewController |
getRedirectViewController()
Gets the redirect view control if context was set for redirect. |
|
java.util.List<java.lang.String> |
getRemoveIds()
Gets the removed IDs. |
|
java.util.Map<java.lang.String,java.lang.Object[]> |
getRequestInputParameter()
Gets the request input parameter. |
|
java.util.Locale |
getRequestLocale()
Gets the request locale. |
|
java.util.Map<java.lang.String,java.lang.Object[]> |
getSavedPreviousInput()
|
|
Scopes<java.lang.String,java.lang.Object> |
getScopes()
Gets the scopes. |
|
javax.servlet.Servlet |
getServlet()
Gets the servlet. |
|
javax.servlet.ServletConfig |
getServletConfig()
Gets the servlet config. |
|
javax.servlet.ServletContext |
getServletContext()
Gets the servlet context. |
|
java.util.List<java.lang.String> |
getUpdateIds()
Gets the update ids. |
|
UserContext |
getUserContext()
Gets the current user context. |
|
boolean |
isCommandRequest()
|
|
boolean |
isPartialRequest()
|
|
boolean |
isPreviousInputSaved()
|
|
boolean |
isRedirect()
|
|
void |
redirect(java.lang.String url,
boolean clientRedirect,
java.util.Map<java.lang.String,java.lang.Object[]> redirectParameter)
Marks the request for redirect to another url. |
|
void |
redirect(ViewAlias viewAlias,
boolean clientRedirect)
Marks the request for redirect to a view alias target. |
|
void |
redirect(ViewController redirectViewController,
boolean clientRedirect,
java.util.Map<java.lang.String,java.lang.Object[]> redirectParameter)
Marks the request for redirect to another view. |
|
void |
saveInputToRestoreLater()
Activate/deactivate the restoration of the previous input in the next request. |
|
void |
setDelocalizedRequestUri(java.lang.String delocalizedRequestUri)
|
|
void |
setLocalizedRequestUri(java.lang.String localizedRequestUri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String PREVIOUS_INPUT_PARAMETERS
protected static final java.lang.String RESTORE_PREVIOUS_INPUT
Constructor Detail |
---|
protected Context()
getContext()
instead.
Method Detail |
---|
public static <T extends Context> T getContext()
public void addDebugMessage(java.lang.String message)
message
- the messageDebugMessagesXhtmlController
public void addDeveloperWarningMessage(java.lang.String message)
message
- the messageDeveloperWarningsXhtmlController
public void addFlashErrorMessage(java.lang.String message)
message
- the messageFlashMessagesXhtmlController
public void addFlashInformationMessage(java.lang.String message)
message
- the messageFlashMessagesXhtmlController
public void addFlashWarningMessage(java.lang.String message)
message
- the messageFlashMessagesXhtmlController
public void clearRedirect()
public java.lang.String getCommandId()
public java.lang.String getContextPath()
public java.util.Locale getCurrentLocale()
setRequestLocale(Locale)
or it will try to find the best fitting locale regarding to the applications supported locales and the preferred locales from
the user context. If nothing is found it will return the default application locale.
public java.util.List<java.lang.String> getDebugMessages()
DebugMessagesXhtmlController
public java.lang.String getDelocalizedRequestUri()
public java.util.List<java.lang.String> getDeveloperWarnings()
DeveloperWarningsXhtmlController
public FlashMessages getFlashMessages()
FlashMessagesXhtmlController
,
FlashMessages
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
public javax.servlet.http.HttpSession getHttpSession()
public ViewAlias getLastView()
public java.lang.String getLocalizedRequestUri()
public final ViewController getRedirectViewController()
public java.util.List<java.lang.String> getRemoveIds()
public java.util.Map<java.lang.String,java.lang.Object[]> getRequestInputParameter()
public java.util.Locale getRequestLocale()
public java.util.Map<java.lang.String,java.lang.Object[]> getSavedPreviousInput()
public Scopes<java.lang.String,java.lang.Object> getScopes()
public javax.servlet.Servlet getServlet()
public javax.servlet.ServletConfig getServletConfig()
public javax.servlet.ServletContext getServletContext()
public java.util.List<java.lang.String> getUpdateIds()
public UserContext getUserContext()
public boolean isCommandRequest()
public boolean isPartialRequest()
public boolean isPreviousInputSaved()
public boolean isRedirect()
public final void redirect(java.lang.String url, boolean clientRedirect, java.util.Map<java.lang.String,java.lang.Object[]> redirectParameter)
url
- the urlclientRedirect
- true if the redirect is a client side redirect, otherwise it is a server side redirectredirectParameter
- the redirect parameterpublic final void redirect(ViewAlias viewAlias, boolean clientRedirect)
viewAlias
- clientRedirect
- public final void redirect(ViewController redirectViewController, boolean clientRedirect, java.util.Map<java.lang.String,java.lang.Object[]> redirectParameter)
redirectViewController
- the redirect view controlclientRedirect
- true if the redirect is a client side redirect, otherwise it is a server side redirectredirectParameter
- the redirect parameterpublic void saveInputToRestoreLater()
public void setDelocalizedRequestUri(java.lang.String delocalizedRequestUri)
public void setLocalizedRequestUri(java.lang.String localizedRequestUri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |