SourceDeleteDataProcessActionHandler
due to
the encapsulation of delete operation on Source
. This class is kept only for backwards compatibility with
custom classes extending it and may not be compatible with new features. If you are extending this process action
handler for customizing some of its behavior on basic delete operation, consider extending the Source
and
using the standard process action handlers. If you are extending this process action only for parameter values
adjustments, consider extending SourceDeleteDataProcessActionHandler
instead.@Deprecated @StableMinor(version="12.4", sinceVersion="10.3") public class TableDeleteDataProcessActionHandler extends BaseTableDataProcessActionHandler
Modifier and Type | Field and Description |
---|---|
protected QueryBuilder |
queryBuilder
Deprecated.
|
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 and Description |
---|
TableDeleteDataProcessActionHandler()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected QueryBase |
buildQuery()
Deprecated.
Builds a delete statement.
|
protected IPortalEvent |
createRenderDataChangedEvent(Object itemId)
Deprecated.
Creates a render data changed event.
|
protected TableSource |
createTableSource(Node sourceDefinitionNode,
ISourceContext sourceContext)
Deprecated.
Creates a table source object.
|
protected void |
deleteRelatedData(Collection<String> itemIdsTemp,
Node currentSourceDefinitionNode,
String foreignPrimaryKeyFieldId,
ITransaction transaction)
Deprecated.
Deletes all data related to the given primary key ids.
|
protected void |
deleteRelatedFiles(Collection<String> itemIdsTemp,
Node currentSourceDefinitionNode,
String primaryKeyFieldId,
ITransaction transaction)
Deprecated.
Deletes all the files that are related to the current item.
|
protected void |
execute(QueryBase queryBase)
Deprecated.
Executes the delete statement.
|
protected void |
postDelete()
Deprecated.
Hook for inheriting classes to be able to perform actions after deletion.
|
protected void |
preDelete(QueryBase queryBase)
Deprecated.
Hook placed in that does not perform any action.
|
void |
processAction()
Deprecated.
Executes the process action.
|
protected void |
processActionWithoutResponse()
Deprecated.
Sends pre-notifications, executes the process action followed by post-notifications.
|
protected void |
sendPostNotifications()
Deprecated.
Sends post notifications to registered observers.
|
protected void |
sendPreNotifications()
Deprecated.
Sends notifications before the delete operation execution.
|
protected void |
sendRenderDataChangedNotification()
Deprecated.
Identifies all the interfaces that may need to be updated and sends a notification.
|
void |
setParameter(String name,
Object value)
Deprecated.
Detects if the given parameter is a primary key.
|
createQueryBuilder, getIndexConfig, indexData, isSearchEnabled, readSelectedData, sendRenderDataChangedNotification, shouldSendRenderDataChangedNotification
addDefaultResponse, addResponseParameter, checkServiceInstancePermission, checkServiceInstancePermission, containsParameter, getId, getParameter, getParameter, getResource, getServiceInterfaceHyperLink, getUrl, init, localize, processHyperLinkResponse, processPopupInterfaceResponse, resolveFieldValueNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asParameters, emptyParameters
protected QueryBuilder queryBuilder
public TableDeleteDataProcessActionHandler()
public void processAction() throws PortalException
IProcessActionHandler
This method may execute the process action based on the parameters and node specifications passed to it earlier.
PortalException
public void setParameter(String name, Object value)
setParameter
in interface IProcessActionHandler
setParameter
in class ProcessActionHandler<TableSource>
protected void processActionWithoutResponse() throws PortalException
PortalException
protected QueryBase buildQuery() throws PortalException
PortalException
protected void preDelete(QueryBase queryBase) throws PortalException
This method exists for classes that extend this class to be able to perform actions before the deletion occurs.
queryBase
- PortalException
protected void deleteRelatedData(Collection<String> itemIdsTemp, Node currentSourceDefinitionNode, String foreignPrimaryKeyFieldId, ITransaction transaction) throws PortalException
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.
itemIdsTemp
- currentSourceDefinitionNode
- foreignPrimaryKeyFieldId
- transaction
- PortalException
protected void deleteRelatedFiles(Collection<String> itemIdsTemp, Node currentSourceDefinitionNode, String primaryKeyFieldId, ITransaction transaction) throws PortalException
Detects if the douidefinition has any file data types. If so, this method retrieves the file id and calls the FileManager to delete the appropriate file.
itemIdsTemp
- currentSourceDefinitionNode
- primaryKeyFieldId
- transaction
- PortalException
protected TableSource createTableSource(Node sourceDefinitionNode, ISourceContext sourceContext) throws PortalException
sourceDefinitionNode
- sourceContext
- PortalException
protected void sendPreNotifications() throws PortalException
PortalException
protected void execute(QueryBase queryBase) throws PortalException
queryBase
- PortalException
protected void postDelete() throws PortalException
PortalException
protected void sendPostNotifications() throws PortalException
PortalException
protected IPortalEvent createRenderDataChangedEvent(Object itemId) throws PortalException
BaseTableDataProcessActionHandler
BaseTableDataProcessActionHandler.sendRenderDataChangedNotification(Object)
.createRenderDataChangedEvent
in class BaseTableDataProcessActionHandler
itemId
- the itemId parameter value for the event.PortalException
protected void sendRenderDataChangedNotification() throws PortalException
PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.