Class ExportAction<T extends Help>
Object
Action
ExportAction<T>
- All Implemented Interfaces:
Help
public class ExportAction<T extends Help>
extends Action
This action starts exporting or archiving. It's a programmatic version
of the same action available in UI. As such it allows user to schedule the
action in calculation flow formula.
Obtain it with CalculationFlowActionBuilder.addExportAction(String), then call doExport(String) or
doArchive(String) with the label of an export or archiving template from Import / Export / Archiving. The
action has no setCalculate() method: it runs when one of these two methods names a template. Each run
creates a new export or archiving job with the label passed to addExportAction() and the configuration of
the template. If no template has this label, no job starts and the Calculation Flow does not report an error.
Example:
def date = (new Date()).format("yyyy-MM-dd'T'HH:mm:ss")
actionBuilder.addExportAction('ArchiveCompetitionData_' + date)
.doArchive('Template_ArchiveCompetitionData')
- See Also:
-
Field Summary
Fields inherited from class Action
jobs -
Constructor Summary
ConstructorsConstructorDescriptionExportAction(T backLink, Invocations<MethodInvocationRecord> invocations, String jobName) Not intended for public use. -
Method Summary
Modifier and TypeMethodDescriptionback()Returns the builder that added this action, so that the logic can add the next action in the same chain.Notifies system that archiving for selected template should be started.Notifies system that export for selected template should be started.Gets the label of the job that this action creates.Not intended for public use.Gets the label of the template set withdoExport(String)ordoArchive(String).Gets whether this action starts an archiving job.isExport()Gets whether this action starts an export.toString()Returns a text representation of this action for debugging.
-
Constructor Details
-
ExportAction
Not intended for public use. An action created with this constructor is not added to the Calculation Flow, so it never runs. UseactionBuilder.addExportAction()instead.- See Also:
-
-
Method Details
-
doExport
Notifies system that export for selected template should be started. A later call todoArchive(String)replaces this setting.- Parameters:
templateName- template to use: the label of an export template- Returns:
- this action, for further configuration
-
doArchive
Notifies system that archiving for selected template should be started. A later call todoExport(String)replaces this setting.- Parameters:
templateName- template to use: the label of an archiving template- Returns:
- this action, for further configuration
-
back
Returns the builder that added this action, so that the logic can add the next action in the same chain.- Returns:
- the
actionBuilderthat added this action - See Also:
-
getObjectName
Not intended for public use.- Returns:
- the name of the builder that added this action, followed by
".ExportAction"
-
getJobName
Gets the label of the job that this action creates.- Returns:
- the label passed to
CalculationFlowActionBuilder.addExportAction(String)
-
getTemplateName
Gets the label of the template set withdoExport(String)ordoArchive(String).- Returns:
- the label of the template, or
nulluntildoExport(String)ordoArchive(String)is called
-
isExport
Gets whether this action starts an export.- Returns:
trueafterdoExport(String), otherwisefalse
-
isArchive
Gets whether this action starts an archiving job.- Returns:
trueafterdoArchive(String), otherwisefalse
-
toString
Returns a text representation of this action for debugging.
-