com.threerings.jpkg.debian
Class PackageInfo

java.lang.Object
  extended by com.threerings.jpkg.debian.PackageInfo

public class PackageInfo
extends Object

Stores meta information needed to create a new Debian package.

See Also:
Debian Policy Manual

Field Summary
static PackagePriority DEFAULT_PRIORITY
          The default package priority.
static PackageSection DEFAULT_SECTION
          The default package section.
 
Constructor Summary
PackageInfo(PackageName name, PackageVersion version, PackageArchitecture architecture, PackageMaintainer maintainer, PackageDescription description)
          Construct a PackageInfo object with the supplied data.
PackageInfo(PackageName name, PackageVersion version, PackageArchitecture architecture, PackageMaintainer maintainer, PackageDescription description, PackageSection section, PackagePriority priority)
          Construct a fully populated PackageInfo with all required fields.
 
Method Summary
 void addConflict(PackageConflict conflict)
          Add a package conflict for this package.
 void addDependency(PackageDependency dependency)
          Add a package dependency for this package.
 void addDependencyAlternative(DependencyAlternatives alternative)
          Add a dependency alternative for this package.
 void addPathPermissions(String path, PathPermissions permissions)
          Add a PathPermissions object associated with a given path.
 void addReplacement(PackageReplacement replacement)
          Add a package replacement for this package.
 InternetHeaders getControlHeaders()
          Add the defined package data to an RFC822 formatted header formatted for a Debian package control file.
 Map<MaintainerScript.Type,MaintainerScript> getMaintainerScripts()
          Returns the MaintainerScripts defined for this package.
 PermissionsMap getPermissionsMap()
          Return the PermissionsMap modifying the package referred to by this PackageInfo.
 void setMaintainerScript(MaintainerScript script)
          Sets a maintainer script for this package, replacing any existing script for that type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SECTION

public static final PackageSection DEFAULT_SECTION
The default package section.


DEFAULT_PRIORITY

public static final PackagePriority DEFAULT_PRIORITY
The default package priority.

Constructor Detail

PackageInfo

public PackageInfo(PackageName name,
                   PackageVersion version,
                   PackageArchitecture architecture,
                   PackageMaintainer maintainer,
                   PackageDescription description)
Construct a PackageInfo object with the supplied data. Default values will be set for the package section and priority.

See Also:
DEFAULT_SECTION, DEFAULT_PRIORITY

PackageInfo

public PackageInfo(PackageName name,
                   PackageVersion version,
                   PackageArchitecture architecture,
                   PackageMaintainer maintainer,
                   PackageDescription description,
                   PackageSection section,
                   PackagePriority priority)
Construct a fully populated PackageInfo with all required fields.

Method Detail

addPathPermissions

public void addPathPermissions(String path,
                               PathPermissions permissions)
Add a PathPermissions object associated with a given path.

Throws:
InvalidPathException - If the supplied path is invalid.
See Also:
PermissionsMap.addPathPermissions(String, PathPermissions)

addDependency

public void addDependency(PackageDependency dependency)
Add a package dependency for this package.


addDependencyAlternative

public void addDependencyAlternative(DependencyAlternatives alternative)
Add a dependency alternative for this package.


addConflict

public void addConflict(PackageConflict conflict)
Add a package conflict for this package.


addReplacement

public void addReplacement(PackageReplacement replacement)
Add a package replacement for this package.


getControlHeaders

public InternetHeaders getControlHeaders()
Add the defined package data to an RFC822 formatted header formatted for a Debian package control file. Order of fields determined from: Debian Policy Manual


getPermissionsMap

public PermissionsMap getPermissionsMap()
Return the PermissionsMap modifying the package referred to by this PackageInfo.


setMaintainerScript

public void setMaintainerScript(MaintainerScript script)
Sets a maintainer script for this package, replacing any existing script for that type.


getMaintainerScripts

public Map<MaintainerScript.Type,MaintainerScript> getMaintainerScripts()
Returns the MaintainerScripts defined for this package.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2008 Three Rings Design, Inc. All Rights Reserved. Released under a BSD license.