Class ExecutionPlanBuilderImpl
- java.lang.Object
-
- org.apache.jackrabbit.vault.packaging.registry.impl.ExecutionPlanBuilderImpl
-
- All Implemented Interfaces:
ExecutionPlanBuilder
public class ExecutionPlanBuilderImpl extends Object implements ExecutionPlanBuilder
ExecutionPlanBuilderImpl...
-
-
Field Summary
Fields Modifier and Type Field Description static doubleSUPPORTED_VERSIONprotected doubleversion
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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.Set<PackageId>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 ExecutionPlanBuilderwith(@NotNull Session session)Sets the JCR session for this execution plan.@NotNull ExecutionPlanBuilderwith(@NotNull ProgressTrackerListener listener)Sets the progress tracker listener for this plan.ExecutionPlanBuilderwith(Set<PackageId> externalPackages)Sets packages handled externally ahead of execution for prevalidation of plan
-
-
-
Field Detail
-
SUPPORTED_VERSION
public static final double SUPPORTED_VERSION
- See Also:
- Constant Field Values
-
version
protected double version
-
-
Method Detail
-
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
@NotNull public @NotNull PackageTaskBuilder 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
@NotNull public @NotNull ExecutionPlanBuilder with(@NotNull @NotNull Session session)
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
@NotNull public @NotNull ExecutionPlanBuilder validate() throws IOException, PackageException
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
@NotNull public @NotNull ExecutionPlan execute() throws IOException, PackageException
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
public ExecutionPlanBuilder with(Set<PackageId> externalPackages)
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
public Set<PackageId> preview() throws IOException, PackageException
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.
-
-