@PublicSpi
public interface StructureGenerator
Modifier and Type | Interface and Description |
---|---|
static interface |
StructureGenerator.ApplicabilityChecker |
static interface |
StructureGenerator.Context |
static interface |
StructureGenerator.EffectContext |
static interface |
StructureGenerator.Extender |
static interface |
StructureGenerator.Filter |
static interface |
StructureGenerator.GenerationContext |
static interface |
StructureGenerator.Grouper |
static interface |
StructureGenerator.HandlingContext |
static interface |
StructureGenerator.Inserter
An implementor inserts new items into the containing structure.
|
static interface |
StructureGenerator.ItemChangeFilterContext |
static interface |
StructureGenerator.Sorter |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultFormParameters(Map<String,Object> form)
Fills the parameter map for the edit form Velocity template with default
values for a new generator item of this type.
|
void |
addParametersForSummary(Map<String,Object> parameters,
Map<String,Object> summaryParameters)
Given the generator-specific parameters, fills the parameter map for
the summary Velocity template.
|
void |
addParametersToForm(Map<String,Object> parameters,
Map<String,Object> form)
Given the generator-specific parameters, fills the parameter map for
the edit form Velocity template.
|
Map<String,Object> |
buildParametersFromForm(Map<String,Object> form,
ErrorCollection errors)
Validates the parameters from the edit HTML form and constructs a
serializable map of generator-specific parameters.
|
boolean |
isAvailable()
Checks if this generator is currently available in the Automation menu on UI.
|
void addDefaultFormParameters(@NotNull Map<String,Object> form) throws GeneratorUnavailableException
form
- form template parameters (output)GeneratorUnavailableException
- if the operation cannot be performedvoid addParametersToForm(@NotNull Map<String,Object> parameters, @NotNull Map<String,Object> form) throws GeneratorUnavailableException
parameters
- generator parameters (input)form
- edit form template parameters (output)GeneratorUnavailableException
- if the operation cannot be performed@NotNull Map<String,Object> buildParametersFromForm(@NotNull Map<String,Object> form, @NotNull ErrorCollection errors) throws GeneratorUnavailableException
Validates the parameters from the edit HTML form and constructs a serializable map of generator-specific parameters.
Any errors for invalid input parameters must be reported to the provided
ErrorCollection
; if it contains any error messages after this
method is called, they are reported to the user and the resulting map
is ignored.
The resulting parameter map could be stored in the database or transferred over the wire, so it must be serializable to JSON. We advise that you put in only simple objects (strings, numbers, booleans), serializable maps, or lists thereof.
form
- the parameters from the edit HTML form (input)errors
- the collector for error messages (output)GeneratorUnavailableException
- if the operation cannot be performedvoid addParametersForSummary(@NotNull Map<String,Object> parameters, @NotNull Map<String,Object> summaryParameters)
Given the generator-specific parameters, fills the parameter map for the summary Velocity template.
parameters
- generator parameters (input)summaryParameters
- summary template parameters (output)boolean isAvailable()
Checks if this generator is currently available in the Automation menu on UI.
For example, a generator can be unavailable when a certain plug-in is missing, or a certain application feature is disabled.
Note that Structure doesn't stop work of existing generator items if the generator is unavailable. Structure only hides the generator from the Automation menu so users can't create new items from UI.
Copyright © 2024 Tempo Software. All Rights Reserved.