|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.loom.action.AbstractAction
public abstract class AbstractAction
Abstract superclass that provides some methods for the most common use.
Constructor Summary | |
---|---|
AbstractAction()
|
Method Summary | |
---|---|
Message |
addError(Message message)
Deprecated. use addMessage() instead |
Message |
addError(java.lang.String messageKey)
Deprecated. use error() instead |
Message |
addError(java.lang.String normalizedPropertyPath,
java.lang.String messageKey)
Deprecated. use error() instead |
Message |
addMessage(Message message)
|
protected Message |
error(java.lang.String messageKey)
|
protected Message |
error(java.lang.String propertyPath,
java.lang.String messageKey)
|
protected ForwardResolution |
forward()
Forwards to a page name with the same name of the current event |
protected ForwardResolution |
forward(java.lang.String pageName)
Forwards to the provided JSP page name. |
protected ForwardResolution |
forwardWithLocale(java.lang.String pageName)
Forward to a page, with preference for a localized page if possible. |
ActionContext |
getContext()
|
MessagesRepository |
getMessagesRepository()
|
protected java.lang.String |
getParam(java.lang.String propertyPath)
Deprecated. use getPropertyAsString instead |
protected java.lang.String |
getPropertyAsString(java.lang.String propertyPath)
Returns the value of the given property as a UrlParameter to be added to a Resolution |
LoomServletRequest |
getRequest()
|
LoomServletResponse |
getResponse()
|
javax.servlet.http.HttpSession |
getSession()
|
javax.servlet.http.HttpSession |
getSession(boolean create)
|
boolean |
hasAnyError()
|
boolean |
hasAnyError(java.lang.String propertyPath)
|
protected Message |
info(java.lang.String messageKey)
|
protected JacksonResolution |
json(java.lang.Object contents)
|
protected RedirectResolution |
redirect(java.lang.Class<? extends Action> actionClass)
Redirects to the provided action, default event |
protected RedirectResolution |
redirect(java.lang.Class<? extends Action> actionClass,
java.lang.String event)
Redirects to the provided action and event. |
protected RedirectResolution |
redirect(java.lang.String uri)
Redirects to the provided url |
protected RedirectResolution |
redirect(java.lang.String action,
java.lang.String event)
Redirects to the provided action and event. |
protected PersistentFileResolution |
send(PersistentFile file)
Send a file to the browser. |
protected StringResolution |
send(java.lang.String results)
Return a simple text as the response. |
protected InputStreamResolution |
send(java.lang.String filename,
java.io.InputStream input)
Send a file to the browser. |
void |
setContext(ActionContext context)
|
protected Message |
warn(java.lang.String messageKey)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractAction()
Method Detail |
---|
public void setContext(ActionContext context)
setContext
in interface Action
public MessagesRepository getMessagesRepository()
public boolean hasAnyError()
public boolean hasAnyError(java.lang.String propertyPath)
propertyPath
- the property path to search error for
protected ForwardResolution forward(java.lang.String pageName)
protected ForwardResolution forwardWithLocale(java.lang.String pageName)
pageName
- the name of the resource to forward to
LocaleForwardResolution
protected ForwardResolution forward()
protected RedirectResolution redirect(java.lang.String uri)
protected RedirectResolution redirect(java.lang.Class<? extends Action> actionClass, java.lang.String event)
protected RedirectResolution redirect(java.lang.Class<? extends Action> actionClass)
protected RedirectResolution redirect(java.lang.String action, java.lang.String event)
protected PersistentFileResolution send(PersistentFile file)
protected InputStreamResolution send(java.lang.String filename, java.io.InputStream input)
protected StringResolution send(java.lang.String results)
results
- the result to be handled to the browser as is.protected java.lang.String getPropertyAsString(java.lang.String propertyPath)
protected java.lang.String getParam(java.lang.String propertyPath)
public ActionContext getContext()
getContext
in interface Action
public LoomServletRequest getRequest()
public LoomServletResponse getResponse()
public javax.servlet.http.HttpSession getSession()
public javax.servlet.http.HttpSession getSession(boolean create)
public Message addError(java.lang.String normalizedPropertyPath, java.lang.String messageKey)
public Message addError(java.lang.String messageKey)
public Message addError(Message message)
public Message addMessage(Message message)
protected Message error(java.lang.String propertyPath, java.lang.String messageKey)
protected Message error(java.lang.String messageKey)
protected Message info(java.lang.String messageKey)
protected Message warn(java.lang.String messageKey)
protected JacksonResolution json(java.lang.Object contents)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |