org.openxava.actions
Class SaveElementInCollectionAction

java.lang.Object
  extended by org.openxava.actions.BaseAction
      extended by org.openxava.actions.ViewBaseAction
          extended by org.openxava.actions.CollectionElementViewBaseAction
              extended by org.openxava.actions.SaveElementInCollectionAction
All Implemented Interfaces:
IAction, IChangeModeAction, IModuleContextAction, IRequestAction
Direct Known Subclasses:
AddElementsToCollectionAction, SaveElementInTreeViewAction

public class SaveElementInCollectionAction
extends CollectionElementViewBaseAction

To save a collection element.

The case of collections of entities with @AsEmbedded (or with as-aggregate="true") is treated by AddElementsToCollectionAction.

Author:
Javier Paniza

Field Summary
 
Fields inherited from interface org.openxava.actions.IChangeModeAction
DETAIL, LIST, PREVIOUS_MODE, SPLIT
 
Constructor Summary
SaveElementInCollectionAction()
           
 
Method Summary
protected  void associateEntity(java.util.Map keyValues)
           
 void execute()
           
 java.lang.String getNextAction()
           
protected  java.util.Map getValuesToSave()
           
protected  java.util.Map saveIfNotExists(View view)
           
 
Methods inherited from class org.openxava.actions.CollectionElementViewBaseAction
closeDialog, getCollectionElementView, getParentView, getView, getViewObject, isCloseDialogDisallowed, isEntityReferencesCollection, setCloseDialogDisallowed, setViewObject, showDialog
 
Methods inherited from class org.openxava.actions.ViewBaseAction
getModelName, getPreviousView, getPreviousViews, resetDescriptionsCache, returnToPreviousView, setControllers, setPreviousViews, setView, showDialog, showNewView, showView
 
Methods inherited from class org.openxava.actions.BaseAction
addActions, addError, addErrors, addInfo, addMessage, addMessages, addWarning, clearActions, executeAfter, executeBefore, getContext, getEnvironment, getErrors, getLocale, getManager, getMessages, getNextMode, getRequest, removeActions, returnToPreviousControllers, setContext, setDefaultControllers, setEnvironment, setErrors, setMessages, setNextMode, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveElementInCollectionAction

public SaveElementInCollectionAction()
Method Detail

execute

public void execute()
             throws java.lang.Exception
Specified by:
execute in interface IAction
Specified by:
execute in class CollectionElementViewBaseAction
Throws:
java.lang.Exception

getValuesToSave

protected java.util.Map getValuesToSave()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

associateEntity

protected void associateEntity(java.util.Map keyValues)
                        throws ValidationException,
                               XavaException,
                               ObjectNotFoundException,
                               FinderException,
                               java.rmi.RemoteException
Throws:
ValidationException
XavaException
ObjectNotFoundException
FinderException
java.rmi.RemoteException

saveIfNotExists

protected java.util.Map saveIfNotExists(View view)
                                 throws java.lang.Exception
Returns:
The saved object
Throws:
java.lang.Exception

getNextAction

public java.lang.String getNextAction()
                               throws java.lang.Exception
Throws:
java.lang.Exception