uk.co.petertribble.pkgview
Class SolarisPackage

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

public class SolarisPackage
extends java.lang.Object


Constructor Summary
SolarisPackage(java.lang.String pkgname)
          Create a Solaris package container
SolarisPackage(java.lang.String pkgroot, java.lang.String pkgname)
          Create a Solaris package container
 
Method Summary
 void addCategory(java.lang.String category)
          Add a category.
 void addDependency(java.lang.String pkg, java.lang.String type)
          Add a dependency
 java.util.Map<java.lang.String,java.lang.String> dependMap()
          Parse the depend file.
 boolean exists()
          Returns whether this package exists, by seeing whether the directory corresponding to its name exists.
 void forceSelected()
          Sets whether this package must be selected.
 java.lang.String getDepend()
          Returns the depend file associated with this package as a String
 java.util.Set<SolarisPackage> getDependantSet()
          Return the set of packages that are dependant on this package.
 java.util.Set<java.lang.String> getDependencySet()
          Return the Set of package names that this package is dependent on.
 java.lang.String getDescription()
          The long name, or description of this package
 java.lang.String getInfoItem(java.lang.String s)
          Get the specified property from the pkginfo file
 java.lang.String getName()
          The name of this package
 boolean getSelected()
          Gets whether this package is selected
 java.util.Set<SolarisPackage> getSelectedDependantSet()
          Return the Set of packages that are dependant on this package and are selected.
 java.lang.String getVersion()
          Get the version of this package
 java.util.Map<java.lang.String,java.lang.String> infoMap()
          Parse the pkginfo file
 boolean mustBeSelected()
          Gets whether this package must be selected.
 void setCategories(java.lang.String categories)
          Add a list of categories.
 void setDependantSet(java.util.Set<SolarisPackage> depSet)
          Define the set of packages that are dependant on this package.
 void setDescription(java.lang.String description)
          Set the long name, or description, of this package.
 void setName(java.lang.String name)
          Set the descriptive name of this package
 void setSelected(boolean selected)
          Sets whether this package is selected.
 void setVersion(java.lang.String version)
          Set the version of this package.
 java.lang.String toString()
          The name of this package
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SolarisPackage

public SolarisPackage(java.lang.String pkgname)
Create a Solaris package container


SolarisPackage

public SolarisPackage(java.lang.String pkgroot,
                      java.lang.String pkgname)
Create a Solaris package container

Method Detail

getName

public java.lang.String getName()
The name of this package


setName

public void setName(java.lang.String name)
Set the descriptive name of this package


toString

public java.lang.String toString()
The name of this package

Overrides:
toString in class java.lang.Object

setDescription

public void setDescription(java.lang.String description)
Set the long name, or description, of this package.


getDescription

public java.lang.String getDescription()
The long name, or description of this package


setVersion

public void setVersion(java.lang.String version)
Set the version of this package.


getVersion

public java.lang.String getVersion()
Get the version of this package


addDependency

public void addDependency(java.lang.String pkg,
                          java.lang.String type)
Add a dependency


setCategories

public void setCategories(java.lang.String categories)
Add a list of categories.

Parameters:
categories - A string containing a list of categories separated by commas.

addCategory

public void addCategory(java.lang.String category)
Add a category.


dependMap

public java.util.Map<java.lang.String,java.lang.String> dependMap()
Parse the depend file. FIXME it's incompatible with addDependency - is this a problem


getDependencySet

public java.util.Set<java.lang.String> getDependencySet()
Return the Set of package names that this package is dependent on.


setDependantSet

public void setDependantSet(java.util.Set<SolarisPackage> depSet)
Define the set of packages that are dependant on this package.


getDependantSet

public java.util.Set<SolarisPackage> getDependantSet()
Return the set of packages that are dependant on this package.


getSelectedDependantSet

public java.util.Set<SolarisPackage> getSelectedDependantSet()
Return the Set of packages that are dependant on this package and are selected.


infoMap

public java.util.Map<java.lang.String,java.lang.String> infoMap()
Parse the pkginfo file


getInfoItem

public java.lang.String getInfoItem(java.lang.String s)
Get the specified property from the pkginfo file


exists

public boolean exists()
Returns whether this package exists, by seeing whether the directory corresponding to its name exists.


getDepend

public java.lang.String getDepend()
Returns the depend file associated with this package as a String


setSelected

public void setSelected(boolean selected)
Sets whether this package is selected. If the package must be selected, the selected status will be set to true.


getSelected

public boolean getSelected()
Gets whether this package is selected


forceSelected

public void forceSelected()
Sets whether this package must be selected.


mustBeSelected

public boolean mustBeSelected()
Gets whether this package must be selected. Packages and clusters in the SUNWCmreq metacluster must be selected.