com.threerings.jpkg.debian
Class PackageDescription

java.lang.Object
  extended by com.threerings.jpkg.debian.PackageDescription
All Implemented Interfaces:
ControlFileData

public class PackageDescription
extends Object
implements ControlFileData

Holds and parses the Debian package description.

See Also:
Debian Policy Manual

Constructor Summary
PackageDescription(String description)
          Construct a new PackageDescription with the supplied text for the brief initial part of the description.
 
Method Summary
 void addBlankLine()
          Append a blank new line to the extended description.
 void addParagraph(String line)
          Append a line of text to the extended package description.
 void addVerbatimParagraph(String line)
          Append a line of text to the extended package description.
 String getField()
          Returns the field of the Debian control file this data belongs in.
 String getFieldValue()
          Returns the data in this class formatted for the Debian control file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageDescription

public PackageDescription(String description)
                   throws ControlDataInvalidException
Construct a new PackageDescription with the supplied text for the brief initial part of the description. This is recommended to be under 80 characters. If the string contains any new lines or tabs, a ControlDataInvalidException will be thrown.

Throws:
ControlDataInvalidException
Method Detail

getField

public String getField()
Description copied from interface: ControlFileData
Returns the field of the Debian control file this data belongs in.

Specified by:
getField in interface ControlFileData

getFieldValue

public String getFieldValue()
Description copied from interface: ControlFileData
Returns the data in this class formatted for the Debian control file.

Specified by:
getFieldValue in interface ControlFileData

addParagraph

public void addParagraph(String line)
                  throws ControlDataInvalidException
Append a line of text to the extended package description. This line will be word wrapped by any Debian tool displaying the package description. If the line contains any new lines or tabs, a ControlDataInvalidException will be thrown.

Throws:
ControlDataInvalidException

addVerbatimParagraph

public void addVerbatimParagraph(String line)
                          throws ControlDataInvalidException
Append a line of text to the extended package description. This line will be NOT be word wrapped by any Debian tool displaying the package description. If the line contains any new lines or tabs, a ControlDataInvalidException will be thrown.

Throws:
ControlDataInvalidException

addBlankLine

public void addBlankLine()
Append a blank new line to the extended description.



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