lumis.content.table
Class ContentTableDeleteDataProcessActionHandler

Package class diagram package ContentTableDeleteDataProcessActionHandler
java.lang.Object
  extended by lumis.doui.processaction.ProcessActionHandler<TableSource>
      extended by lumis.doui.table.BaseTableDataProcessActionHandler
          extended by lumis.doui.table.TableDeleteDataProcessActionHandler
              extended by lumis.content.table.ContentTableDeleteDataProcessActionHandler
All Implemented Interfaces:
IProcessActionHandler, IParameters
Direct Known Subclasses:
BannerDeleteDataProcessActionHandler, CancelPublicSubscriptionProcessActionHandler, DeleteRelationCommentProcessActionHandler, DeleteWidgetProcessActionHandler, DocumentDeleteProcessActionHandler, ImageDeleteProcessActionHandler, UserCancelSubscriptionProcessActionHandler, UserCancelSubscriptionProcessActionHandler

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class ContentTableDeleteDataProcessActionHandler
extends TableDeleteDataProcessActionHandler

This class is responsible for the generic deleting process in the Content context. It executes the delete query generated by ContentQueryBuilder and calls MetaDataController so it will handle meta data and information appropriately. When versioning is enabled, this class is responsible for modifying the primary key parameter values to build a delete query, so it will remove all versions of the selected items. It also is responsible for updating search index according to the changes made to the content.

Since:
4.0.0

Field Summary
protected  String primaryKeyFieldId
           
protected  String versionActiveFieldId
           
protected  ArrayList<String> versionContentIds
           
 
Fields inherited from class lumis.doui.table.TableDeleteDataProcessActionHandler
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
ContentTableDeleteDataProcessActionHandler()
           
 
Method Summary
protected  QueryBase buildQuery()
          Builds query using ContentQueryBuilder created.
protected  QueryBuilder createQueryBuilder()
          Creates ContentQueryBuilder object for building delete query.
protected  void deleteRelatedData(Collection<String> itemIds, Node currentSourceDefinitionNode, String foreignPrimaryKeyFieldId, ITransaction transaction)
          Deletes all data related to the given primary key ids.
protected  void indexData()
          Updates search index information for modified content.
protected  void postDelete()
          Executes all post delete necessary to manage meta data after removing the content, including calling MetaDataController.
protected  void preDelete(QueryBase queryBase)
          Hook placed in that does not perform any action.
protected  void sendRenderDataChangedNotification(Object pks)
          Notifies observers that the render data may have changed.
 
Methods inherited from class lumis.doui.table.TableDeleteDataProcessActionHandler
createRenderDataChangedEvent, createTableSource, deleteRelatedFiles, execute, processAction, processActionWithoutResponse, sendPostNotifications, sendPreNotifications, sendRenderDataChangedNotification, setParameter
 
Methods inherited from class lumis.doui.table.BaseTableDataProcessActionHandler
addToIndex, getIndexConfig, isSearchEnabled, readSelectedData, removeFromIndex, shouldSendRenderDataChangedNotification
 
Methods inherited from class lumis.doui.processaction.ProcessActionHandler
addDefaultResponse, addResponseParameter, checkServiceInstancePermission, checkServiceInstancePermission, getId, getParameter, getParameter, getResource, getServiceInterfaceHyperLink, getUrl, init, localize, processHyperLinkResponse, processPopupInterfaceResponse, resolveFieldValueNode
 
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

versionContentIds

protected ArrayList<String> versionContentIds
Constructor Detail

ContentTableDeleteDataProcessActionHandler

public ContentTableDeleteDataProcessActionHandler()
Method Detail

postDelete

protected void postDelete()
                   throws PortalException
Executes all post delete necessary to manage meta data after removing the content, including calling MetaDataController.

Overrides:
postDelete in class TableDeleteDataProcessActionHandler
Throws:
PortalException

indexData

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

Overrides:
indexData in class TableDeleteDataProcessActionHandler
Throws:
PortalException

deleteRelatedData

protected void deleteRelatedData(Collection<String> itemIds,
                                 Node currentSourceDefinitionNode,
                                 String foreignPrimaryKeyFieldId,
                                 ITransaction transaction)
                          throws PortalException
Description copied from class: TableDeleteDataProcessActionHandler
Deletes all data related to the given primary key ids.

This method looks up all the relations of the data being deleted. If any of them have the attribute cascadeOnDelete set to true, the related source data is automatically deleted.

Overrides:
deleteRelatedData in class TableDeleteDataProcessActionHandler
Throws:
PortalException

createQueryBuilder

protected QueryBuilder createQueryBuilder()
                                   throws PortalException
Creates ContentQueryBuilder object for building delete 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 values are replaced with the primary key of all versions associated with the selected contents so they all are removed.

Overrides:
buildQuery in class TableDeleteDataProcessActionHandler
Returns:
Throws:
PortalException

sendRenderDataChangedNotification

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

Overrides:
sendRenderDataChangedNotification in class BaseTableDataProcessActionHandler
Throws:
PortalException

preDelete

protected void preDelete(QueryBase queryBase)
                  throws PortalException
Description copied from class: TableDeleteDataProcessActionHandler
Hook placed in that does not perform any action.

This method exists for classes that extend this class to be able to perform actions before the deletion occurs.

Overrides:
preDelete in class TableDeleteDataProcessActionHandler
Throws:
PortalException


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