|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.doui.processaction.ProcessActionHandler<TableSource> lumis.doui.table.BaseTableDataProcessActionHandler lumis.doui.table.TableDeleteDataProcessActionHandler
@StableMinor(version="6.2", sinceVersion="4.0") public class TableDeleteDataProcessActionHandler
Handles deletion of data
Field Summary | |
---|---|
protected QueryBuilder |
queryBuilder
|
Constructor Summary | |
---|---|
TableDeleteDataProcessActionHandler()
|
Method Summary | |
---|---|
protected QueryBase |
buildQuery()
Builds a delete statement. |
protected IPortalEvent |
createRenderDataChangedEvent(Object itemId)
Creates a render data changed event. |
protected TableSource |
createTableSource(Node sourceDefinitionNode,
ISourceContext sourceContext)
Creates a table source object. |
protected void |
deleteRelatedData(Collection<String> itemIdsTemp,
Node currentSourceDefinitionNode,
String foreignPrimaryKeyFieldId,
ITransaction transaction)
Deletes all data related to the given primary key ids. |
protected void |
deleteRelatedFiles(Collection<String> itemIdsTemp,
Node currentSourceDefinitionNode,
String primaryKeyFieldId,
ITransaction transaction)
Deletes all the files that are related to the current item. |
protected void |
execute(QueryBase queryBase)
Executes the delete statement. |
protected void |
indexData()
Updates search index information for modified content. |
protected void |
postDelete()
Hook for inheriting classes to be able to perform actions after deletion. |
protected void |
preDelete(QueryBase queryBase)
Hook placed in that does not perform any action. |
void |
processAction()
Executes the process action. |
protected void |
processActionWithoutResponse()
Sends pre-notifications, executes the process action followed by post-notifications. |
protected void |
sendPostNotifications()
Sends post notifications to registered observers. |
protected void |
sendPreNotifications()
Sends notifications before the delete operation execution. |
protected void |
sendRenderDataChangedNotification()
Identifies all the interfaces that may need to be updated and sends a notification. |
void |
setParameter(String name,
Object value)
Detects if the given parameter is a primary key. |
Methods inherited from class lumis.doui.table.BaseTableDataProcessActionHandler |
---|
addToIndex, createQueryBuilder, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected QueryBuilder queryBuilder
Constructor Detail |
---|
public TableDeleteDataProcessActionHandler()
Method Detail |
---|
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 interface IParameters
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 indexData() throws PortalException
indexData
in class BaseTableDataProcessActionHandler
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |