Interface IProvisioningPlan


  • public interface IProvisioningPlan
    A provisioning plan describes a proposed set of changes to a profile. The proposed changes may represent a valid and consistent set of changes, or it may represent a set of changes that would cause errors if executed. In this case the plan contains information about the severity and explanation for the problems.
    Since:
    2.0
    Restriction:
    This interface is not intended to be implemented by clients.
    Restriction:
    This interface is not intended to be extended by clients.
    • Method Detail

      • getAdditions

        IQueryable<IInstallableUnit> getAdditions()
        Returns the proposed set of installable units to be added to the profile.
        Returns:
        The proposed profile additions
      • getContext

        ProvisioningContext getContext()
        Returns the provisioning context in which this plan was created.
        Returns:
        The plan's provisioning context
      • getInstallerPlan

        IProvisioningPlan getInstallerPlan()
        Returns a plan describing the proposed set of changes to the provisioning infrastructure required by this plan. The installer changes must be performed before this plan can be successfully executed.
        Returns:
        The installer plan.
      • getProfile

        IProfile getProfile()
        Returns the profile that this plan will operate on.
        Returns:
        The target profile for this plan
      • getFutureState

        IQueryable<IInstallableUnit> getFutureState()
        Returns the set of IUs that will constitute the profile if the plan is executed successfully.
        Returns:
        The set of the IUs that will constitute the profile after the plan is executed successfully, or @null if the plan is in error or the value has not been set.
        Since:
        2.2
      • getRemovals

        IQueryable<IInstallableUnit> getRemovals()
        Returns the proposed set of installable units to be removed from this profile.
        Returns:
        The proposed profile removals.
      • getStatus

        IStatus getStatus()
        Returns the overall plan status. The severity of this status indicates whether the plan can be successfully executed or not:
        • A status of IStatus.OK indicates that the plan can be executed successfully.
        • A status of IStatus.INFO or IStatus.WARNING indicates that the plan can be executed but may cause problems.
        • A status of IStatus.ERROR indicates that the plan cannot be executed successfully.
        • A status of IStatus.CANCEL indicates that the plan computation was canceled and is incomplete. A canceled plan cannot be executed.
        Returns:
        The overall plan status.
      • isEmpty

        boolean isEmpty()
        Returns true if the plan contains no operations, false otherwise.
        Returns:
        true if the plan contains no operations, false otherwise.
      • addInstallableUnit

        void addInstallableUnit​(IInstallableUnit iu)
        Adds an installable unit to the plan. This will cause the given installable unit to be installed into the profile when this plan is executed by the engine.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        iu - the installable unit to add
      • removeInstallableUnit

        void removeInstallableUnit​(IInstallableUnit iu)
        Removes an installable unit from the plan. This will cause the given installable unit to be remove from the profile when this plan is executed by the engine.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        iu - the installable unit to add
      • setInstallableUnitProfileProperty

        void setInstallableUnitProfileProperty​(IInstallableUnit iu,
                                               String name,
                                               String value)
        Adds a profile property corresponding to the given installable unit to the plan. This will cause the given installable unit property to be installed into the profile when this plan is executed by the engine.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        iu - the installable unit to set a property for
        name - the property name
        value - the property value
      • setInstallerPlan

        void setInstallerPlan​(IProvisioningPlan installerPlan)
        Sets the installer plan for this plan. The installer plan describes the set of changes that must be made to the provisioning agent in order for this plan to execute successfully.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        installerPlan - the plan describing changes to the provisioning agent
      • setProfileProperty

        void setProfileProperty​(String name,
                                String value)
        Sets a profile property in the plan. This will cause the given property to be added to the profile when this plan is executed by the engine.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        name - the profile property name
        value - the profile property value
      • setStatus

        void setStatus​(IStatus status)
        Sets the overall plan status, describing whether the planner constructing this plan believes it will install successfully, or whether it contains errors or the plan computation has been canceled.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        status - the plan status
      • updateInstallableUnit

        void updateInstallableUnit​(IInstallableUnit from,
                                   IInstallableUnit to)
        Adds an instruction to replace one installable unit in the profile with another. This will cause the 'from' installable unit property to be uninstalled from the profile and the 'to' installable unit to be added to the profile when this plan is executed by the engine.

        This is an advanced operation that should only be performed by clients crafting their own custom plan. Most clients should instead use a planner service to construct a valid plan based on a profile change request.

        Parameters:
        from - the installable unit to remove
        to - the installable unit to add
      • setFuturePlan

        void setFuturePlan​(IQueryable<IInstallableUnit> futureState)
        Sets the value that is returned by the method getFutureState. Note that this method is a simple setter and will not cause any update to the other fields of this object. This field can be set to @null.
        Parameters:
        futureState - A set of IU representing the future plan if the plan is executed successfully.
        Since:
        2.2