Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.pkg.client
Class Image.ImagePlan

    java.lang.Object
      com.sun.pkg.client.Image.ImagePlan

Enclosing class:
  Image

    public class Image.ImagePlan

extends java.lang.Object

An `ImagePlan` takes a list of requested packages, an Image (and its policy restrictions), and returns the set of package operations needed to transform the Image to the list of requested packages.

Use of an ImagePlan involves the identification of the Image, the Catalogs (implicitly), and a set of complete or partial package FMRIs. The Image's policy, which is derived from its type and configuration will cause the formulation of the plan or an exception state.

XXX In the current formulation, an ImagePlan can handle [null -> PkgFmri] and [PkgFmri@Version1 -> PkgFmri@Version2], for a set of PkgFmri objects. With a correct Action object definition, deletion should be able to be represented as [PkgFmri@V1 -> null].

XXX Should we allow downgrades? There's an "arrow of time" associated with the smf(5) configuration method, so it's better to direct manipulators to snapshot-based rollback, but if people are going to do "pkg delete fmri; pkg install fmri@v(n - 1)", then we'd better have a plan to identify when this operation is safe or unsafe.

Method Summary
`void` | `execute()` Execute the actions required to bring about the plan.
`Fmri[]` | `getProposedFmris()` Return the Fmris that are proposed for installation as part of this plan.
`java.lang.String` | `toString()` Generate a string representation for the ImagePlan.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### toString

    public java.lang.String toString()

  Generate a string representation for the ImagePlan.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a String representing the ImagePlan

### getProposedFmris

    public Fmri[] getProposedFmris()

  Return the Fmris that are proposed for installation as part of this plan.

  Returns:
    the list of proposed Fmris

### execute

    public void execute()
                 throws java.io.IOException

  Execute the actions required to bring about the plan.

  This results in the installation or uninstallation as specified by the plan.

  Throws:
    `java.io.IOException`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD