|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.pkg.client.Image.ImagePlan
public class Image.ImagePlan
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 | |
---|---|
int |
computeTransferFiles()
Computes the total number of files that will be downloaded during execute() . |
long |
computeTransferSize()
Computes the total number of bytes that will be downloaded during execute() . |
void |
execute()
Executes the plan with the empty callback. |
void |
execute(boolean download,
boolean apply)
Executes the plan with the empty callback. |
void |
execute(ImagePlanProgressTracker tracker)
Execute the actions required to bring about the plan. |
void |
execute(ImagePlanProgressTracker tracker,
boolean download,
boolean apply)
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 |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public Fmri[] getProposedFmris()
public long computeTransferSize()
execute()
.
public int computeTransferFiles()
execute()
.
public void execute() throws java.io.IOException
See execute(ImagePlanProgressTracker)
for the exact semantics of the method.
java.io.IOException
public void execute(boolean download, boolean apply) throws java.io.IOException
See execute(ImagePlanProgressTracker)
for the exact semantics of the method.
download
- boolean variable to trigger downloadapply
- boolean variable to trigger installtion for downloaded packages
java.io.IOException
public void execute(ImagePlanProgressTracker tracker) throws java.io.IOException
This results in the installation or uninstallation as specified by the plan.
tracker
- The object that receives the progress of the execution. Must not be null.
java.io.IOException
public void execute(ImagePlanProgressTracker tracker, boolean download, boolean apply) throws java.io.IOException
This results in the installation or uninstallation as specified by the plan.
tracker
- The object that receives the progress of the execution. Must not be null.download
- boolean variable to trigger downloadapply
- boolean variable to trigger installtion for downloaded packages
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |