Class SeriesFactory<T extends Series>
java.lang.Object
com.inet.taskplanner.server.api.common.AbstractFactory<T, SeriesDefinition, SeriesInfo, SummaryInfo>
com.inet.taskplanner.server.api.common.SeriesIndependentFactory<T, SeriesDefinition, SeriesInfo, SummaryInfo>
com.inet.taskplanner.server.api.series.SeriesFactory<T>
- All Implemented Interfaces:
com.inet.plugin.NamedExtension
- Direct Known Subclasses:
DbSeriesFactory, FolderSeriesFactory, JsonSeriesFactory
public abstract class SeriesFactory<T extends Series>
extends SeriesIndependentFactory<T, SeriesDefinition, SeriesInfo, SummaryInfo>
Base class for factories producing
Series components.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nonnull TcreateFrom(@Nonnull SeriesDefinition definition, @Nullable Map<String, String> triggerProperties, @Nullable com.inet.id.GUID taskID) Creates a series with trigger expressions resolved before the implementation parses its parameters.getKeys(@Nonnull SeriesDefinition definition) Get a set of keys that can be used in placeholder.protected final @Nonnull SummaryInfogetTriggerPlaceholderSummary(@Nonnull SeriesDefinition definition) Describes a configuration whose result cannot be previewed without a trigger.protected final booleanhasTriggerPlaceholder(@Nonnull SeriesDefinition definition, @Nonnull String key) Checks one parameter for supported trigger expressions.final booleanhasTriggerPlaceholders(@Nonnull SeriesDefinition definition) Checks for trigger expressions in fields that support placeholder substitution.Methods inherited from class SeriesIndependentFactory
createFrom, updateValues, validateMethods inherited from class AbstractFactory
checkDefinitionArgument, createInstanceFrom, createInstanceFrom, getExtensionName, getInformation, getInformation, getKeywords, getSummary, isAvailable, isSupportedForSystemTasks
-
Constructor Details
-
SeriesFactory
Creates a new SeriesFactory instance.- Parameters:
extensionName- the unique extensionName for this Series.- Since:
- taskplanner 3.0
-
-
Method Details
-
createFrom
public @Nonnull T createFrom(@Nonnull SeriesDefinition definition, @Nullable Map<String, String> triggerProperties, @Nullable com.inet.id.GUID taskID) throws ValidationExceptionCreates a series with trigger expressions resolved before the implementation parses its parameters. The saved definition is never modified. Custom series still receive the trigger-property hook. A defensive copy of the trigger metadata is passed to the series so one execution cannot affect another.- Parameters:
definition- configured expressionstriggerProperties- metadata of the trigger that fired, ornullfor a manual executiontaskID- owning task, ornull- Returns:
- the series for this execution
- Throws:
ValidationException- if a required trigger value is missing or the resolved configuration is invalid- Since:
- 26.10
-
hasTriggerPlaceholders
Checks for trigger expressions in fields that support placeholder substitution.- Parameters:
definition- series configuration- Returns:
- whether trigger values are needed to evaluate the configuration
- Since:
- 26.10
-
hasTriggerPlaceholder
protected final boolean hasTriggerPlaceholder(@Nonnull SeriesDefinition definition, @Nonnull String key) Checks one parameter for supported trigger expressions.- Parameters:
definition- configured serieskey- parameter key- Returns:
- whether this parameter needs trigger metadata
- Since:
- 26.10
-
getTriggerPlaceholderSummary
protected final @Nonnull SummaryInfo getTriggerPlaceholderSummary(@Nonnull SeriesDefinition definition) Describes a configuration whose result cannot be previewed without a trigger.- Parameters:
definition- configured expressions- Returns:
- parameter values and the preview explanation
- Since:
- 26.10
-
getKeys
Get a set of keys that can be used in placeholder.- Parameters:
definition- the definition that describes the series- Returns:
- a key set
- Since:
- taskplanner 3.0
-