mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-21 14:38:43 +00:00
Replace QProcessMetaData.addStep and addOptionalStep with .withStep and .withOptionalStep
This commit is contained in:
@ -984,16 +984,16 @@ public class QInstanceEnricher
|
||||
.withCode(new QCodeReference(BulkInsertReceiveValueMappingStep.class));
|
||||
|
||||
int i = 0;
|
||||
process.addStep(i++, prepareFileUploadStep);
|
||||
process.addStep(i++, uploadScreen);
|
||||
process.withStep(i++, prepareFileUploadStep);
|
||||
process.withStep(i++, uploadScreen);
|
||||
|
||||
process.addStep(i++, prepareFileMappingStep);
|
||||
process.addStep(i++, fileMappingScreen);
|
||||
process.addStep(i++, receiveFileMappingStep);
|
||||
process.withStep(i++, prepareFileMappingStep);
|
||||
process.withStep(i++, fileMappingScreen);
|
||||
process.withStep(i++, receiveFileMappingStep);
|
||||
|
||||
process.addStep(i++, prepareValueMappingStep);
|
||||
process.addStep(i++, valueMappingScreen);
|
||||
process.addStep(i++, receiveValueMappingStep);
|
||||
process.withStep(i++, prepareValueMappingStep);
|
||||
process.withStep(i++, valueMappingScreen);
|
||||
process.withStep(i++, receiveValueMappingStep);
|
||||
|
||||
process.getFrontendStep(StreamedETLWithFrontendProcess.STEP_NAME_REVIEW).setRecordListFields(editableFields);
|
||||
|
||||
@ -1053,7 +1053,7 @@ public class QInstanceEnricher
|
||||
Fields whose switches are off will not be updated."""))
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.BULK_EDIT_FORM));
|
||||
|
||||
process.addStep(0, editScreen);
|
||||
process.withStep(0, editScreen);
|
||||
process.getFrontendStep("review").setRecordListFields(editableFields);
|
||||
qInstance.addProcess(process);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public class QProcessMetaData implements QAppChildMetaData, MetaDataWithPermissi
|
||||
{
|
||||
if(stepList != null)
|
||||
{
|
||||
stepList.forEach(this::addStep);
|
||||
stepList.forEach(this::withStep);
|
||||
}
|
||||
|
||||
return (this);
|
||||
@ -231,7 +231,7 @@ public class QProcessMetaData implements QAppChildMetaData, MetaDataWithPermissi
|
||||
{
|
||||
index = this.stepList.size();
|
||||
}
|
||||
addStep(index, step);
|
||||
withStep(index, step);
|
||||
|
||||
return (this);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public class ScriptsMetaDataProvider
|
||||
.withLoadStepClass(RunRecordScriptLoadStep.class)
|
||||
.getProcessMetaData();
|
||||
|
||||
processMetaData.addStep(0, new QFrontendStepMetaData()
|
||||
processMetaData.withStep(0, new QFrontendStepMetaData()
|
||||
.withName("input")
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.EDIT_FORM))
|
||||
.withFormField(new QFieldMetaData("scriptId", QFieldType.INTEGER).withPossibleValueSourceName(Script.TABLE_NAME)
|
||||
|
@ -83,8 +83,8 @@ public class BasicETLProcess
|
||||
|
||||
return new QProcessMetaData()
|
||||
.withName(PROCESS_NAME)
|
||||
.addStep(extractFunction)
|
||||
.addStep(transformFunction)
|
||||
.addStep(loadFunction);
|
||||
.withStep(extractFunction)
|
||||
.withStep(transformFunction)
|
||||
.withStep(loadFunction);
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,6 @@ public class StreamedETLProcess
|
||||
|
||||
return new QProcessMetaData()
|
||||
.withName(PROCESS_NAME)
|
||||
.addStep(etlFunction);
|
||||
.withStep(etlFunction);
|
||||
}
|
||||
}
|
||||
|
@ -191,11 +191,11 @@ public class StreamedETLWithFrontendProcess
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.PROCESS_SUMMARY_RESULTS));
|
||||
|
||||
return new QProcessMetaData()
|
||||
.addStep(previewStep)
|
||||
.addStep(reviewStep)
|
||||
.addStep(validateStep)
|
||||
.addStep(executeStep)
|
||||
.addStep(resultStep);
|
||||
.withStep(previewStep)
|
||||
.withStep(reviewStep)
|
||||
.withStep(validateStep)
|
||||
.withStep(executeStep)
|
||||
.withStep(resultStep);
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class GarbageCollectorProcessMetaDataProducer
|
||||
.withInputData(new QFunctionInputMetaData()
|
||||
.withField(new QFieldMetaData("joinedTablesToAlsoDelete", QFieldType.STRING).withDefaultValue(joinedTablesToAlsoDelete)));
|
||||
|
||||
processMetaData.addStep(0, new QFrontendStepMetaData()
|
||||
processMetaData.withStep(0, new QFrontendStepMetaData()
|
||||
.withName("input")
|
||||
.withLabel("Input")
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.HELP_TEXT).withValue("text", """
|
||||
|
@ -81,10 +81,10 @@ public class BasicRunReportProcess
|
||||
return new QProcessMetaData()
|
||||
.withName(PROCESS_NAME)
|
||||
.withIsHidden(true)
|
||||
.addStep(prepareStep)
|
||||
.addStep(inputStep)
|
||||
.addStep(executeStep)
|
||||
.addStep(accessStep);
|
||||
.withStep(prepareStep)
|
||||
.withStep(inputStep)
|
||||
.withStep(executeStep)
|
||||
.withStep(accessStep);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -109,10 +109,10 @@ public class RunReportForRecordProcess
|
||||
|
||||
return new QProcessMetaData()
|
||||
.withName(PROCESS_NAME)
|
||||
.addStep(prepareStep)
|
||||
.addStep(inputStep)
|
||||
.addStep(executeStep)
|
||||
.addStep(accessStep);
|
||||
.withStep(prepareStep)
|
||||
.withStep(inputStep)
|
||||
.withStep(executeStep)
|
||||
.withStep(accessStep);
|
||||
}
|
||||
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class RenderSavedReportMetaDataProducer implements MetaDataProducerInterf
|
||||
.withTableName(SavedReport.TABLE_NAME)
|
||||
.withIcon(new QIcon().withName("print"))
|
||||
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("pre")
|
||||
.withInputData(new QFunctionInputMetaData()
|
||||
.withField(new QFieldMetaData(SES_PROVIDER_NAME, QFieldType.STRING))
|
||||
@ -86,7 +86,7 @@ public class RenderSavedReportMetaDataProducer implements MetaDataProducerInterf
|
||||
.withRecordListMetaData(new QRecordListMetaData().withTableName(SavedReport.TABLE_NAME)))
|
||||
.withCode(new QCodeReference(RenderSavedReportPreStep.class)))
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("input")
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.EDIT_FORM))
|
||||
.withFormField(new QFieldMetaData(FIELD_NAME_REPORT_FORMAT, QFieldType.STRING)
|
||||
@ -97,13 +97,13 @@ public class RenderSavedReportMetaDataProducer implements MetaDataProducerInterf
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.WIDGET)
|
||||
.withValue("widgetName", SavedReportsMetaDataProvider.RENDER_REPORT_PROCESS_VALUES_WIDGET)))
|
||||
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("execute")
|
||||
.withInputData(new QFunctionInputMetaData().withRecordListMetaData(new QRecordListMetaData()
|
||||
.withTableName(SavedReport.TABLE_NAME)))
|
||||
.withCode(new QCodeReference(RenderSavedReportExecuteStep.class)))
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("output")
|
||||
.withComponent(new QFrontendComponentMetaData().withType(QComponentType.DOWNLOAD_FORM))
|
||||
.withComponent(new NoCodeWidgetFrontendComponentMetaData()
|
||||
|
@ -59,13 +59,13 @@ public class RunScheduledReportMetaDataProducer implements MetaDataProducerInter
|
||||
.withTableName(ScheduledReport.TABLE_NAME)
|
||||
.withIcon(new QIcon().withName("print"))
|
||||
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("execute")
|
||||
.withInputData(new QFunctionInputMetaData().withRecordListMetaData(new QRecordListMetaData()
|
||||
.withTableName(ScheduledReport.TABLE_NAME)))
|
||||
.withCode(new QCodeReference(RunScheduledReportExecuteStep.class)))
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("results")
|
||||
.withComponent(new NoCodeWidgetFrontendComponentMetaData()
|
||||
.withOutput(new WidgetHtmlLine().withVelocityTemplate("Success")))); // todo!!!
|
||||
|
@ -366,7 +366,7 @@ public class RunProcessTest extends BaseTest
|
||||
// only put back1 in the step list. //
|
||||
//////////////////////////////////////
|
||||
))
|
||||
.addOptionalStep(front1)
|
||||
.withOptionalStep(front1)
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -164,13 +164,13 @@ public class RunProcessUpdateStepListTest extends BaseTest
|
||||
.withName(STEP_END)
|
||||
));
|
||||
|
||||
process.addOptionalStep(new QFrontendStepMetaData().withName(STEP_A));
|
||||
process.addOptionalStep(new QBackendStepMetaData().withName(STEP_B).withCode(new QCodeReference(NoopBackendStep.class)));
|
||||
process.addOptionalStep(new QFrontendStepMetaData().withName(STEP_C));
|
||||
process.withOptionalStep(new QFrontendStepMetaData().withName(STEP_A));
|
||||
process.withOptionalStep(new QBackendStepMetaData().withName(STEP_B).withCode(new QCodeReference(NoopBackendStep.class)));
|
||||
process.withOptionalStep(new QFrontendStepMetaData().withName(STEP_C));
|
||||
|
||||
process.addOptionalStep(new QBackendStepMetaData().withName(STEP_1).withCode(new QCodeReference(NoopBackendStep.class)));
|
||||
process.addOptionalStep(new QFrontendStepMetaData().withName(STEP_2));
|
||||
process.addOptionalStep(new QBackendStepMetaData().withName(STEP_3).withCode(new QCodeReference(NoopBackendStep.class)));
|
||||
process.withOptionalStep(new QBackendStepMetaData().withName(STEP_1).withCode(new QCodeReference(NoopBackendStep.class)));
|
||||
process.withOptionalStep(new QFrontendStepMetaData().withName(STEP_2));
|
||||
process.withOptionalStep(new QBackendStepMetaData().withName(STEP_3).withCode(new QCodeReference(NoopBackendStep.class)));
|
||||
|
||||
return (process);
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ class QInstanceEnricherTest extends BaseTest
|
||||
QProcessMetaData process = new QProcessMetaData();
|
||||
process.setName("test");
|
||||
process.withStepList(List.of(new QBackendStepMetaData().withName("execute").withCode(new QCodeReference(TestUtils.IncreaseBirthdateStep.class))));
|
||||
process.addOptionalStep(new QFrontendStepMetaData()
|
||||
process.withOptionalStep(new QFrontendStepMetaData()
|
||||
.withName("screen")
|
||||
.withViewField(new QFieldMetaData("myField", QFieldType.STRING)));
|
||||
qInstance.addProcess(process);
|
||||
|
@ -327,11 +327,11 @@ public class TestUtils
|
||||
.withName(PROCESS_NAME_INCREASE_BIRTHDATE)
|
||||
.withTableName(TABLE_NAME_PERSON_MEMORY)
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("preview")
|
||||
)
|
||||
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("doWork")
|
||||
.withCode(new QCodeReference(IncreaseBirthdateStep.class))
|
||||
.withInputData(new QFunctionInputMetaData()
|
||||
@ -340,7 +340,7 @@ public class TestUtils
|
||||
.withFieldList(List.of(new QFieldMetaData("outputMessage", QFieldType.STRING).withDefaultValue("Success!"))))
|
||||
)
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("results")
|
||||
.withFormField(new QFieldMetaData("outputMessage", QFieldType.STRING))
|
||||
);
|
||||
@ -1144,7 +1144,7 @@ public class TestUtils
|
||||
return new QProcessMetaData()
|
||||
.withName(PROCESS_NAME_GREET_PEOPLE)
|
||||
.withTableName(TABLE_NAME_PERSON_MEMORY)
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("prepare")
|
||||
.withCode(new QCodeReference()
|
||||
.withName(MockBackendStep.class.getName())
|
||||
@ -1175,13 +1175,13 @@ public class TestUtils
|
||||
.withName(PROCESS_NAME_GREET_PEOPLE_INTERACTIVE)
|
||||
.withTableName(TABLE_NAME_PERSON)
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("setup")
|
||||
.withFormField(new QFieldMetaData("greetingPrefix", QFieldType.STRING))
|
||||
.withFormField(new QFieldMetaData("greetingSuffix", QFieldType.STRING))
|
||||
)
|
||||
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("doWork")
|
||||
.withCode(new QCodeReference()
|
||||
.withName(MockBackendStep.class.getName())
|
||||
@ -1200,7 +1200,7 @@ public class TestUtils
|
||||
.withFieldList(List.of(new QFieldMetaData("outputMessage", QFieldType.STRING))))
|
||||
)
|
||||
|
||||
.addStep(new QFrontendStepMetaData()
|
||||
.withStep(new QFrontendStepMetaData()
|
||||
.withName("results")
|
||||
.withFormField(new QFieldMetaData("outputMessage", QFieldType.STRING))
|
||||
);
|
||||
@ -1221,7 +1221,7 @@ public class TestUtils
|
||||
return new QProcessMetaData()
|
||||
.withName(PROCESS_NAME_ADD_TO_PEOPLES_AGE)
|
||||
.withTableName(TABLE_NAME_PERSON)
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("getAgeStatistics")
|
||||
.withCode(new QCodeReference()
|
||||
.withName(GetAgeStatistics.class.getName())
|
||||
@ -1235,7 +1235,7 @@ public class TestUtils
|
||||
.withFieldList(List.of(
|
||||
new QFieldMetaData("minAge", QFieldType.INTEGER),
|
||||
new QFieldMetaData("maxAge", QFieldType.INTEGER)))))
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("addAge")
|
||||
.withCode(new QCodeReference()
|
||||
.withName(AddAge.class.getName())
|
||||
@ -1265,7 +1265,7 @@ public class TestUtils
|
||||
.withTableName(defineTableBasepull().getName()))
|
||||
.withName(PROCESS_NAME_BASEPULL)
|
||||
.withTableName(TABLE_NAME_PERSON)
|
||||
.addStep(new QBackendStepMetaData()
|
||||
.withStep(new QBackendStepMetaData()
|
||||
.withName("prepare")
|
||||
.withCode(new QCodeReference()
|
||||
.withName(MockBackendStep.class.getName())
|
||||
|
Reference in New Issue
Block a user