lumis.doui.table
Class TableAddDataProcessActionHandler

Package class diagram package TableAddDataProcessActionHandler
java.lang.Object
  extended by lumis.doui.processaction.ProcessActionHandler<TableSource>
      extended by lumis.doui.table.BaseTableDataProcessActionHandler
          extended by lumis.doui.table.TableAddDataProcessActionHandler
All Implemented Interfaces:
IProcessActionHandler, IParameters
Direct Known Subclasses:
AddSocialNetworkProcessActionHandler, ContentTableAddDataProcessActionHandler, FileListAddProcessActionHandler, TableAddFileMultiRowDataProcessActionHandler, TableAddMultiRowDataProcessActionHandler

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class TableAddDataProcessActionHandler
extends BaseTableDataProcessActionHandler

This class is responsible for the generic inserting process in the Content context. It executes the insert query generated by ContentQueryBuilder. It also is responsible for adding the new content to search index.

Since:
4.0.0

Field Summary
 
Fields inherited from class lumis.doui.processaction.ProcessActionHandler
douiContext, id, localizationManager, parameters, processActionContainer, processActionNode, RESPONSE_TYPE_CLOSE_WINDOW, RESPONSE_TYPE_HYPERLINK, RESPONSE_TYPE_MESSAGE, RESPONSE_TYPE_POPUP_INTERFACE, RESPONSE_TYPE_PREVIEW, RESPONSE_TYPE_REFRESH_PARENT, RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_MESSAGE, RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_PROCESS_ACTION_ID, RESPONSE_TYPE_RUN_JAVASCRIPT, RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES, RESPONSE_TYPE_SET_REQUEST_PARAMETERS, RESPONSE_TYPE_SET_RESPONSE_PARAMETERS, RESPONSE_TYPE_STANDARD_COMMIT, RESPONSE_TYPE_STANDARD_EMBEDDED, RESPONSE_TYPE_STANDARD_POPUP, RESPONSE_TYPE_VALIDATE_PROCESS_ACTION_ON_RENDER, sessionConfig, source, sourceContainer, transaction
 
Constructor Summary
TableAddDataProcessActionHandler()
           
 
Method Summary
protected  void doInsert()
          The process of insertion in the database is done in this method.
protected  void execute(QueryInsert queryInsert)
          This method actually executes the insert statement.
protected  void indexData()
          Calls the method BaseTableDataProcessActionHandler.addToIndex() to index data.
protected  void postInsert(String primaryKey)
          Sets the primary key render parameter.
protected  void preInsert(QueryInsert queryInsert)
          Called before the insert action is taken.
 void processAction()
          Processes the required action calling processActionWithoutResponse() and subsequently calls the ProcessActionHandler.addDefaultResponse() method.
protected  void processActionWithoutResponse()
          Processes the insert action.
protected  void sendPostNotifications(String primaryKey)
          Sends process action execution and interface changed notifications.
protected  void sendPreNotifications(String primaryKey)
          Called before the insert action is taken.
protected  void setPrimaryKeyAttribute(String primaryKey)
          Sets the primary key value in the request attribute.
protected  void setPrimaryKeyParameter(Object primaryKeyValue)
          The primary key value of the inserted data is placed in the process action parameters.
protected  void setPrimaryKeyRenderParameter(String primaryKey)
          Deprecated. Since 4.0.10 the primary key is no longer stored as a render parameter. This method was replaced by setPrimaryKeyAttribute(String). For backward compatibility, this method calls setPrimaryKeyAttribute(String).
 
Methods inherited from class lumis.doui.table.BaseTableDataProcessActionHandler
addToIndex, createQueryBuilder, createRenderDataChangedEvent, getIndexConfig, isSearchEnabled, readSelectedData, removeFromIndex, sendRenderDataChangedNotification, shouldSendRenderDataChangedNotification
 
Methods inherited from class lumis.doui.processaction.ProcessActionHandler
addDefaultResponse, addResponseParameter, checkServiceInstancePermission, checkServiceInstancePermission, getId, getParameter, getParameter, getResource, getServiceInterfaceHyperLink, getUrl, init, localize, processHyperLinkResponse, processPopupInterfaceResponse, resolveFieldValueNode, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableAddDataProcessActionHandler

public TableAddDataProcessActionHandler()
Method Detail

processAction

public void processAction()
                   throws PortalException
Processes the required action calling processActionWithoutResponse() and subsequently calls the ProcessActionHandler.addDefaultResponse() method.

Throws:
PortalException

processActionWithoutResponse

protected void processActionWithoutResponse()
                                     throws PortalException
Processes the insert action.

Here the doInsert() method is called to perform the insert.

Throws:
PortalException
Since:
4.0.11

doInsert

protected void doInsert()
                 throws PortalException
The process of insertion in the database is done in this method.

This method sends pre notifications, performs the insert, sends post notifications and finally indexes the data.

Throws:
PortalException
Since:
4.0.11

setPrimaryKeyParameter

protected void setPrimaryKeyParameter(Object primaryKeyValue)
                               throws PortalException
The primary key value of the inserted data is placed in the process action parameters.

Parameters:
primaryKeyValue -
Throws:
PortalException
Since:
4.0.11

preInsert

protected void preInsert(QueryInsert queryInsert)
                  throws PortalException
Called before the insert action is taken.

No action is taken here. This is simply a hook for objects that extend this class.

Parameters:
queryInsert -
Throws:
PortalException
Since:
4.0.11

sendPreNotifications

protected void sendPreNotifications(String primaryKey)
                             throws PortalException
Called before the insert action is taken.

No action is taken here. This is simply a hook for objects that extend this class.

Parameters:
queryInsert -
Throws:
PortalException
Since:
4.0.11

execute

protected void execute(QueryInsert queryInsert)
                throws PortalException
This method actually executes the insert statement.

Parameters:
queryInsert -
Throws:
PortalException
Since:
4.0.11

postInsert

protected void postInsert(String primaryKey)
                   throws PortalException
Sets the primary key render parameter.

Parameters:
primaryKey -
Throws:
PortalException
Since:
4.0.11

setPrimaryKeyRenderParameter

@Deprecated
protected void setPrimaryKeyRenderParameter(String primaryKey)
                                     throws PortalException
Deprecated. Since 4.0.10 the primary key is no longer stored as a render parameter. This method was replaced by setPrimaryKeyAttribute(String). For backward compatibility, this method calls setPrimaryKeyAttribute(String).

Throws:
PortalException

setPrimaryKeyAttribute

protected void setPrimaryKeyAttribute(String primaryKey)
                               throws PortalException
Sets the primary key value in the request attribute. This way other process actions that require the primary key value may obtain it.

Parameters:
primaryKey - the primary key value. If null this method does nothing.
Throws:
PortalException
Since:
4.0.10

indexData

protected void indexData()
                  throws PortalException
Calls the method BaseTableDataProcessActionHandler.addToIndex() to index data.

Overrides:
indexData in class BaseTableDataProcessActionHandler
Throws:
PortalException

sendPostNotifications

protected void sendPostNotifications(String primaryKey)
                              throws PortalException
Sends process action execution and interface changed notifications.

Parameters:
primaryKey -
Throws:
PortalException
Since:
4.0.11


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.