Class ExecutionPlanBuilderImpl
java.lang.Object
org.apache.jackrabbit.vault.packaging.registry.impl.ExecutionPlanBuilderImpl
- All Implemented Interfaces:
ExecutionPlanBuilder
ExecutionPlanBuilderImpl...-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NotNull PackageTaskBuilderaddTask()Adds a new task to this builder.@NotNull ExecutionPlanexecute()Builds an executes the plan synchronously.@NotNull ExecutionPlanBuilderload(@NotNull InputStream in) Loads the tasks from a serialized plan and replaces the plans already in this builder.preview()Triggers validation and returnsPackageIds of all packages to be installed by this builder@NotNull ExecutionPlanBuildersave(@NotNull OutputStream out) Serializes the tasks of this plan.@NotNull ExecutionPlanBuildervalidate()Validates this plan.@NotNull ExecutionPlanBuilderSets the JCR session for this execution plan.@NotNull ExecutionPlanBuilderwith(@NotNull ProgressTrackerListener listener) Sets the progress tracker listener for this plan.Sets packages handled externally ahead of execution for prevalidation of plan
-
Field Details
-
SUPPORTED_VERSION
public static final double SUPPORTED_VERSION- See Also:
-
version
protected double version
-
-
Method Details
-
save
@NotNull public @NotNull ExecutionPlanBuilder save(@NotNull @NotNull OutputStream out) throws IOException, PackageException Description copied from interface:ExecutionPlanBuilderSerializes the tasks of this plan.- Specified by:
savein interfaceExecutionPlanBuilder- Parameters:
out- the output stream- Returns:
- this
- Throws:
IOException- if an I/O error occurrs.PackageException- if this builder does not have valid tasks.
-
load
@NotNull public @NotNull ExecutionPlanBuilder load(@NotNull @NotNull InputStream in) throws IOException Description copied from interface:ExecutionPlanBuilderLoads the tasks from a serialized plan and replaces the plans already in this builder.- Specified by:
loadin interfaceExecutionPlanBuilder- Parameters:
in- input stream to the data.- Returns:
- this
- Throws:
IOException- if an I/O error occurrs.
-
addTask
Description copied from interface:ExecutionPlanBuilderAdds a new task to this builder.- Specified by:
addTaskin interfaceExecutionPlanBuilder- Returns:
- an package task builder that helps to assemble the task.
-
with
Description copied from interface:ExecutionPlanBuilderSets the JCR session for this execution plan.- Specified by:
within interfaceExecutionPlanBuilder- Parameters:
session- the session- Returns:
- this
-
with
@NotNull public @NotNull ExecutionPlanBuilder with(@NotNull @NotNull ProgressTrackerListener listener) Description copied from interface:ExecutionPlanBuilderSets the progress tracker listener for this plan.- Specified by:
within interfaceExecutionPlanBuilder- Parameters:
listener- the listener- Returns:
- this
-
validate
Description copied from interface:ExecutionPlanBuilderValidates this plan.- Specified by:
validatein interfaceExecutionPlanBuilder- Returns:
- this
- Throws:
IOException- if an I/O error occurrs.PackageException- if the plan is not valid.
-
execute
Description copied from interface:ExecutionPlanBuilderBuilds an executes the plan synchronously. Does not throw an exception in case one or multiple task executions fail, therefore the caller should checkExecutionPlan.hasErrors()after calling this method.- Specified by:
executein interfaceExecutionPlanBuilder- Returns:
- the execution plan.
- Throws:
IOException- if an I/O error occurs.PackageException- if the plan contains an unsupported task.
-
with
Description copied from interface:ExecutionPlanBuilderSets packages handled externally ahead of execution for prevalidation of plan- Specified by:
within interfaceExecutionPlanBuilder- Parameters:
externalPackages- Set of package ids handled by other builder- Returns:
- this
-
preview
Description copied from interface:ExecutionPlanBuilderTriggers validation and returnsPackageIds of all packages to be installed by this builder- Specified by:
previewin interfaceExecutionPlanBuilder- Returns:
- Set of packages to be installed by this builder.
- Throws:
IOException- if an I/O error occurs.PackageException- if the plan is not valid.
-