lumis.content.table
Class ContentTableUpdateDataProcessActionHandler

Package class diagram package ContentTableUpdateDataProcessActionHandler
java.lang.Object
  extended by lumis.doui.processaction.ProcessActionHandler<TableSource>
      extended by lumis.doui.table.BaseTableDataProcessActionHandler
          extended by lumis.doui.table.TableUpdateDataProcessActionHandler
              extended by lumis.content.table.ContentTableUpdateDataProcessActionHandler
All Implemented Interfaces:
IProcessActionHandler, IParameters
Direct Known Subclasses:
BannerUpdateDataProcessActionHandler, PagePersonalizationContentTableEditProcessActionHandler

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class ContentTableUpdateDataProcessActionHandler
extends TableUpdateDataProcessActionHandler

This class is responsible for the generic updating process in the Content context. It executes the update query generated by ContentQueryBuilder and calls ContentMetaDataController, so it will handle meta data information appropriately. When versioning is enabled, this class is responsible for modifying the parameters and use ContentQueryBuilder to build a insertion query, instead of update. It also is responsible for updating search index according to the changes made to the content.

Since:
4.0.4

Field Summary
protected  String newVersionPrimaryKeyValue
           
protected  Locale previousLocale
           
protected  String previousNotificationContentId
           
protected  String previousVersionPrimaryKeyValue
           
protected  String primaryKeyFieldId
           
protected  String versionActiveFieldId
           
 
Fields inherited from class lumis.doui.table.TableUpdateDataProcessActionHandler
queryBuilder
 
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
ContentTableUpdateDataProcessActionHandler()
           
 
Method Summary
protected  QueryBase buildQuery()
          Builds query using ContentQueryBuilder created.
protected  QueryBuilder createQueryBuilder()
          Creates ContentQueryBuilder object for building update (or insert) query.
protected  void execute(QueryBase queryBase)
          Executes the query given.
protected  void indexData()
          Updates search index information for modified content.
 void init(Node processActionNode, ProcessActionContainer processActionContainer)
          Initiates the process action handler object.
protected  void postUpdate()
          Executes all post update (or post insert, if using versioning) necessary to manage meta data after editing the content, including calling MetaDataController.
protected  void sendPreNotifications()
          Sends pre-execution notifications to PortalEventManager.
protected  void sendRenderDataChangedNotification()
          Notifies observers that the render data may have changed.
 
Methods inherited from class lumis.doui.table.TableUpdateDataProcessActionHandler
doUpdate, preUpdate, processAction, processActionWithoutResponse, sendPostNotifications
 
Methods inherited from class lumis.doui.table.BaseTableDataProcessActionHandler
addToIndex, 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, localize, processHyperLinkResponse, processPopupInterfaceResponse, resolveFieldValueNode, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionActiveFieldId

protected String versionActiveFieldId

primaryKeyFieldId

protected String primaryKeyFieldId

previousVersionPrimaryKeyValue

protected String previousVersionPrimaryKeyValue

newVersionPrimaryKeyValue

protected String newVersionPrimaryKeyValue

previousNotificationContentId

protected String previousNotificationContentId

previousLocale

protected Locale previousLocale
Constructor Detail

ContentTableUpdateDataProcessActionHandler

public ContentTableUpdateDataProcessActionHandler()
Method Detail

init

public void init(Node processActionNode,
                 ProcessActionContainer processActionContainer)
          throws PortalException
Initiates the process action handler object.

Specified by:
init in interface IProcessActionHandler
Overrides:
init in class ProcessActionHandler<TableSource>
Parameters:
processActionNode -
processActionContainer -
Throws:
PortalException

execute

protected void execute(QueryBase queryBase)
                throws PortalException
Executes the query given. If versioning is enabled, consider the query as an insert statemente, otherwise as an update statement.

Overrides:
execute in class TableUpdateDataProcessActionHandler
Parameters:
queryBase -
Throws:
PortalException

postUpdate

protected void postUpdate()
                   throws PortalException
Executes all post update (or post insert, if using versioning) necessary to manage meta data after editing the content, including calling MetaDataController.

Overrides:
postUpdate in class TableUpdateDataProcessActionHandler
Throws:
PortalException

createQueryBuilder

protected QueryBuilder createQueryBuilder()
                                   throws PortalException
Creates ContentQueryBuilder object for building update (or insert) query.

Overrides:
createQueryBuilder in class BaseTableDataProcessActionHandler
Throws:
PortalException

buildQuery

protected QueryBase buildQuery()
                        throws PortalException
Builds query using ContentQueryBuilder created. If there is versioning, the primary key parameter is removed from the parameters so the ContentQueryBuilder will generate a new primary key for the inserted row. After that the value is reinserted as the new primary key.

Overrides:
buildQuery in class TableUpdateDataProcessActionHandler
Returns:
Throws:
PortalException

indexData

protected void indexData()
                  throws PortalException
Description copied from class: TableUpdateDataProcessActionHandler
Updates search index information for modified content.

Overrides:
indexData in class TableUpdateDataProcessActionHandler
Throws:
PortalException

sendPreNotifications

protected void sendPreNotifications()
                             throws PortalException
Sends pre-execution notifications to PortalEventManager.

Overrides:
sendPreNotifications in class TableUpdateDataProcessActionHandler
Throws:
PortalException

sendRenderDataChangedNotification

protected void sendRenderDataChangedNotification()
                                          throws PortalException
Description copied from class: TableUpdateDataProcessActionHandler
Notifies observers that the render data may have changed.

Overrides:
sendRenderDataChangedNotification in class TableUpdateDataProcessActionHandler
Throws:
PortalException


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