org.openxava.actions
Class BaseAction

java.lang.Object
  extended by org.openxava.actions.BaseAction
All Implemented Interfaces:
IAction, IChangeModeAction, IModuleContextAction, IRequestAction
Direct Known Subclasses:
AddColumnsAction, AddLiferayDocumentAction, CancelInListAction, ChangeModuleAction, ChangeSectionAction, DeleteLiferayDocumentAction, EditGalleryAction, EmptyAction, GoAddColumnsAction, GoAddColumnsPageAction, GoDetailAction, GoListAction, GoSplitAction, GoToURLAction, LoadLiferayDocumentAction, MaximizeImageAction, MinimizeImageAction, NavigationAction, OnChangePropertyBaseAction, RemoveImageFromGalleryAction, ResetPreviousControllersAction, RestoreDefaultColumnsAction, ReturnPreviousModuleAction, SearchAction, SetCustomViewAction, SetDefaultSchemaAction, SetLocaleAction, SetPersistenceUnitAction, SetUserAction, SortColumnsAction, ViewBaseAction

public abstract class BaseAction
extends java.lang.Object
implements IAction, IRequestAction, IModuleContextAction, IChangeModeAction

Author:
Javier Paniza

Field Summary
 
Fields inherited from interface org.openxava.actions.IChangeModeAction
DETAIL, LIST, PREVIOUS_MODE, SPLIT
 
Constructor Summary
BaseAction()
           
 
Method Summary
protected  void addActions(java.lang.String... qualifiedActions)
          Actions add added even if they are hidden.
protected  void addError(java.lang.String messageId, java.lang.Object... ids)
          If some id is a String between quotes (') it will be displayed literally, untranslated.
protected  void addErrors(Messages errors)
           
protected  void addInfo(java.lang.String messageId, java.lang.Object... ids)
          If some id is a String between quotes (') it will be displayed literally, untranslated.
protected  void addMessage(java.lang.String messageId, java.lang.Object... ids)
          If some id is a String between quotes (') it will be displayed literally, untranslated.
protected  void addMessages(Messages messages)
           
protected  void addWarning(java.lang.String messageId, java.lang.Object... ids)
          If some id is a String between quotes (') it will be displayed literally, untranslated.
protected  void clearActions()
           
 void executeAfter()
           
 void executeBefore()
           
protected  ModuleContext getContext()
           
 Environment getEnvironment()
           
 Messages getErrors()
           
protected  java.util.Locale getLocale()
          The Locale of the current request.
protected  ModuleManager getManager()
           
 Messages getMessages()
           
 java.lang.String getNextMode()
          LIST, DETAIL or PREVIOUS_MODE.
protected  HttpServletRequest getRequest()
          With this method you can access directly to the web application resources, but it ties you to implementation technology (servlets), hence it's better to avoid it if you have alternative and are thinking in migrating to another tecnology.
protected  void removeActions(java.lang.String... qualifiedActions)
           
protected  void resetDescriptionsCache()
          Reset the cache of all descriptions-list and others uses of descriptionsEditors.
protected  void returnToPreviousControllers()
           
 void setContext(ModuleContext context)
           
protected  void setControllers(java.lang.String... controllers)
           
protected  void setDefaultControllers()
          Set the default controllers of the current module.
 void setEnvironment(Environment environment)
           
 void setErrors(Messages errors)
           
 void setMessages(Messages messages)
           
protected  void setNextMode(java.lang.String nextMode)
           
 void setRequest(HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openxava.actions.IAction
execute
 
Methods inherited from interface org.openxava.actions.IAction
execute
 
Methods inherited from interface org.openxava.actions.IAction
execute
 

Constructor Detail

BaseAction

public BaseAction()
Method Detail

getErrors

public Messages getErrors()
Specified by:
getErrors in interface IAction

setErrors

public void setErrors(Messages errors)
Specified by:
setErrors in interface IAction

getMessages

public Messages getMessages()
Specified by:
getMessages in interface IAction

setMessages

public void setMessages(Messages messages)
Specified by:
setMessages in interface IAction

addErrors

protected void addErrors(Messages errors)

addMessages

protected void addMessages(Messages messages)

addError

protected void addError(java.lang.String messageId,
                        java.lang.Object... ids)
If some id is a String between quotes (') it will be displayed literally, untranslated.


addMessage

protected void addMessage(java.lang.String messageId,
                          java.lang.Object... ids)
If some id is a String between quotes (') it will be displayed literally, untranslated.


addInfo

protected void addInfo(java.lang.String messageId,
                       java.lang.Object... ids)
If some id is a String between quotes (') it will be displayed literally, untranslated.

Since:
4.3

addWarning

protected void addWarning(java.lang.String messageId,
                          java.lang.Object... ids)
If some id is a String between quotes (') it will be displayed literally, untranslated.

Since:
4.3

executeBefore

public void executeBefore()
                   throws java.lang.Exception
Throws:
java.lang.Exception

executeAfter

public void executeAfter()
                  throws java.lang.Exception
Throws:
java.lang.Exception

setEnvironment

public void setEnvironment(Environment environment)
Specified by:
setEnvironment in interface IAction

getEnvironment

public Environment getEnvironment()

resetDescriptionsCache

protected void resetDescriptionsCache()
Reset the cache of all descriptions-list and others uses of descriptionsEditors.


setRequest

public void setRequest(HttpServletRequest request)
Specified by:
setRequest in interface IRequestAction

getRequest

protected HttpServletRequest getRequest()
With this method you can access directly to the web application resources, but it ties you to implementation technology (servlets), hence it's better to avoid it if you have alternative and are thinking in migrating to another tecnology.

Since:
4m1

getLocale

protected java.util.Locale getLocale()
The Locale of the current request.


getContext

protected ModuleContext getContext()
Since:
4m1

setContext

public void setContext(ModuleContext context)
Specified by:
setContext in interface IModuleContextAction

getNextMode

public java.lang.String getNextMode()
Description copied from interface: IChangeModeAction
LIST, DETAIL or PREVIOUS_MODE.

Specified by:
getNextMode in interface IChangeModeAction
Since:
4m1

setNextMode

protected void setNextMode(java.lang.String nextMode)
Since:
4m1

getManager

protected ModuleManager getManager()
Since:
4m1

addActions

protected void addActions(java.lang.String... qualifiedActions)
Actions add added even if they are hidden.

Since:
4m2

removeActions

protected void removeActions(java.lang.String... qualifiedActions)
Since:
4m2

clearActions

protected void clearActions()
Since:
4m2

setControllers

protected void setControllers(java.lang.String... controllers)
Since:
4m2

returnToPreviousControllers

protected void returnToPreviousControllers()
Since:
4m2

setDefaultControllers

protected void setDefaultControllers()
Set the default controllers of the current module.

The defaults controllers are those declared in application.xml for the module, so the initial controllers when the module starts.
Also, this method clear the stack of controllers navigation, that is, if after calling to this method you call to returnToPreviousController() it will not have effect.

Since:
4m2