mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 21:20:45 +00:00
Checkpoitn
This commit is contained in:
@ -98,8 +98,13 @@ public class DMLAuditAction extends AbstractQActionFunction<DMLAuditInput, DMLAu
|
||||
return (output);
|
||||
}
|
||||
|
||||
String contextSuffix = "";
|
||||
Optional<AbstractActionInput> actionInput = QContext.getFirstActionInStack();
|
||||
String contextSuffix = "";
|
||||
if(StringUtils.hasContent(input.getAuditContext()))
|
||||
{
|
||||
contextSuffix = " " + input.getAuditContext();
|
||||
}
|
||||
|
||||
Optional<AbstractActionInput> actionInput = QContext.getFirstActionInStack();
|
||||
if(actionInput.isPresent() && actionInput.get() instanceof RunProcessInput runProcessInput)
|
||||
{
|
||||
String processName = runProcessInput.getProcessName();
|
||||
|
@ -23,6 +23,7 @@ package com.kingsrook.qqq.backend.core.actions.customizers;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.delete.DeleteInput;
|
||||
import com.kingsrook.qqq.backend.core.model.data.QRecord;
|
||||
|
||||
@ -55,7 +56,7 @@ public abstract class AbstractPostDeleteCustomizer
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
public abstract List<QRecord> apply(List<QRecord> records);
|
||||
public abstract List<QRecord> apply(List<QRecord> records) throws QException;
|
||||
|
||||
|
||||
|
||||
|
@ -23,6 +23,7 @@ package com.kingsrook.qqq.backend.core.actions.customizers;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||
import com.kingsrook.qqq.backend.core.model.actions.tables.insert.InsertInput;
|
||||
import com.kingsrook.qqq.backend.core.model.data.QRecord;
|
||||
|
||||
@ -50,7 +51,7 @@ public abstract class AbstractPostInsertCustomizer
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
public abstract List<QRecord> apply(List<QRecord> records);
|
||||
public abstract List<QRecord> apply(List<QRecord> records) throws QException;
|
||||
|
||||
|
||||
|
||||
|
@ -137,7 +137,8 @@ public class UpdateAction
|
||||
{
|
||||
DMLAuditInput dmlAuditInput = new DMLAuditInput()
|
||||
.withTableActionInput(updateInput)
|
||||
.withRecordList(updateOutput.getRecords());
|
||||
.withRecordList(updateOutput.getRecords())
|
||||
.withAuditContext(updateInput.getAuditContext());
|
||||
oldRecordList.ifPresent(l -> dmlAuditInput.setOldRecordList(l));
|
||||
new DMLAuditAction().execute(dmlAuditInput);
|
||||
}
|
||||
|
@ -38,6 +38,8 @@ public class DMLAuditInput extends AbstractActionInput implements Serializable
|
||||
private List<QRecord> oldRecordList;
|
||||
private AbstractTableActionInput tableActionInput;
|
||||
|
||||
private String auditContext = null;
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -131,4 +133,35 @@ public class DMLAuditInput extends AbstractActionInput implements Serializable
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for auditContext
|
||||
*******************************************************************************/
|
||||
public String getAuditContext()
|
||||
{
|
||||
return (this.auditContext);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for auditContext
|
||||
*******************************************************************************/
|
||||
public void setAuditContext(String auditContext)
|
||||
{
|
||||
this.auditContext = auditContext;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for auditContext
|
||||
*******************************************************************************/
|
||||
public DMLAuditInput withAuditContext(String auditContext)
|
||||
{
|
||||
this.auditContext = auditContext;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ public class UpdateInput extends AbstractTableActionInput
|
||||
private Boolean areAllValuesBeingUpdatedTheSame = null;
|
||||
|
||||
private boolean omitDmlAudit = false;
|
||||
private String auditContext = null;
|
||||
|
||||
|
||||
|
||||
@ -187,4 +188,35 @@ public class UpdateInput extends AbstractTableActionInput
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for auditContext
|
||||
*******************************************************************************/
|
||||
public String getAuditContext()
|
||||
{
|
||||
return (this.auditContext);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for auditContext
|
||||
*******************************************************************************/
|
||||
public void setAuditContext(String auditContext)
|
||||
{
|
||||
this.auditContext = auditContext;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for auditContext
|
||||
*******************************************************************************/
|
||||
public UpdateInput withAuditContext(String auditContext)
|
||||
{
|
||||
this.auditContext = auditContext;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user