uk.co.petertribble.pkgview
Class PackageProfile

java.lang.Object
  extended by uk.co.petertribble.pkgview.PackageProfile

public class PackageProfile
extends java.lang.Object


Field Summary
static int IGNORED
          The operation was ignored because it was unnecessary.
static int SUCCESS
          The operation succeeded with no extra actions
static int SUCCESS_CHANGED_CLUSTERS
          The operation succeeded, and changed the cluster list
static int SUCCESS_CHANGED_PACKAGES
          The operation succeeded, and changed the package list
static int SUCCESS_DUPLICATE
          The operation succeeded, but did nothing because the requested change was a duplicate.
 
Constructor Summary
PackageProfile(ClusterToc ctoc)
          Create a Solaris Installation profile, consisting of a base MetaCluster, and then additional software clusters and packages that can fine tune the installed software.
PackageProfile(ClusterToc ctoc, MetaCluster mcluster)
          Create a Solaris Installation profile, consisting of a base MetaCluster, and then additional software clusters and packages that can fine tune the installed software.
 
Method Summary
 int addCluster(PackageCluster cluster)
          Add a software cluster to the list.
 int addPackage(SolarisPackage pkg)
          Add a software package to the list.
 java.util.Set<SolarisPackage> getPackages()
          Get the Set of packages contained in this profile.
 java.lang.String getPkglist()
          Write out a sorted list of packages contained in this profile.
 java.lang.String getProfile()
          Write out the installation profile
 void initialize(MetaCluster mcluster)
           
 int removeCluster(PackageCluster cluster)
          Remove a software cluster from the list.
 int removePackage(SolarisPackage pkg)
          Remove a software package from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
The operation succeeded with no extra actions

See Also:
Constant Field Values

IGNORED

public static final int IGNORED
The operation was ignored because it was unnecessary. This is the case if a package or cluster is added or removed and the parent cluster or metacluster already contains or excludes the package or cluster.

See Also:
Constant Field Values

SUCCESS_CHANGED_PACKAGES

public static final int SUCCESS_CHANGED_PACKAGES
The operation succeeded, and changed the package list

See Also:
Constant Field Values

SUCCESS_CHANGED_CLUSTERS

public static final int SUCCESS_CHANGED_CLUSTERS
The operation succeeded, and changed the cluster list

See Also:
Constant Field Values

SUCCESS_DUPLICATE

public static final int SUCCESS_DUPLICATE
The operation succeeded, but did nothing because the requested change was a duplicate.

See Also:
Constant Field Values
Constructor Detail

PackageProfile

public PackageProfile(ClusterToc ctoc)
Create a Solaris Installation profile, consisting of a base MetaCluster, and then additional software clusters and packages that can fine tune the installed software. With this constructor, the caller must explicitly specify the starting MetaCluster with the initialize() method.


PackageProfile

public PackageProfile(ClusterToc ctoc,
                      MetaCluster mcluster)
Create a Solaris Installation profile, consisting of a base MetaCluster, and then additional software clusters and packages that can fine tune the installed software.

Method Detail

initialize

public void initialize(MetaCluster mcluster)

addCluster

public int addCluster(PackageCluster cluster)
Add a software cluster to the list. Implicitly adds all the software packages contained in that cluster.


removeCluster

public int removeCluster(PackageCluster cluster)
Remove a software cluster from the list. Implicitly removes all the software packages contained in that cluster.


addPackage

public int addPackage(SolarisPackage pkg)
Add a software package to the list.


removePackage

public int removePackage(SolarisPackage pkg)
Remove a software package from the list.


getPackages

public java.util.Set<SolarisPackage> getPackages()
Get the Set of packages contained in this profile.


getProfile

public java.lang.String getProfile()
Write out the installation profile


getPkglist

public java.lang.String getPkglist()
Write out a sorted list of packages contained in this profile.