net.sf.jpkgmk
Class PkgInfo

java.lang.Object
  extended by net.sf.jpkgmk.AbstractFileCreatorAdapter
      extended by net.sf.jpkgmk.PkgInfo
All Implemented Interfaces:
FileHandler.ContentWriter

public class PkgInfo
extends AbstractFileCreatorAdapter

Object representation for a pkginfo file.

For details refer to http://docs.sun.com/app/docs/doc/817-0683/6mgff29br?a=view.

Since:
1.0
Version:
$Revision: 2 $ $Date: 2008-08-20 21:14:19 +0200 (Mi, 20 Aug 2008) $
Author:
gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $

Field Summary
static java.lang.String CATEGORY_APPLICATION
           
static java.lang.String CATEGORY_SYSTEM
           
static java.lang.String LINE_SEPARATOR
           
static java.lang.String PKG_INFO
           
 
Constructor Summary
PkgInfo()
           
PkgInfo(java.lang.String pkg, java.lang.String name, java.lang.String version, java.lang.String arch, java.lang.String category)
          Constructor taking the mandatory parameters for this class
PkgInfo(java.lang.String pkg, java.lang.String name, java.lang.String version, java.lang.String arch, java.lang.String category, java.lang.String desc, java.lang.String basedir, java.lang.String vendor, java.util.List<java.lang.String> optionList)
           
 
Method Summary
 void addOption(java.lang.String option)
           
 java.lang.String generateFilename()
           
 java.lang.String getArch()
           
 java.lang.String getCategory()
           
 java.lang.String getDesc()
           
 FileHandler getFileHandler(java.io.File targetDir)
           
 java.lang.String getName()
           
 java.util.List<java.lang.String> getOptionList()
           
 java.lang.String getPkg()
           
 java.lang.String getPkgInfoBasedir()
           
 java.lang.String getVendor()
           
 java.lang.String getVersion()
           
 void setArch(java.lang.String arch)
           
 void setCategory(java.lang.String category)
           
 void setDesc(java.lang.String desc)
           
 void setName(java.lang.String name)
           
 void setOptionList(java.util.List<java.lang.String> optionList)
           
 void setPkg(java.lang.String pkg)
           
 void setPkgInfoBasedir(java.lang.String pkgInfoBasedir)
           
 void setVendor(java.lang.String vendor)
           
 void setVersion(java.lang.String version)
           
 java.lang.String toString()
           
 void validate()
           
 void writeContent(java.io.Writer writer)
          write pkginfo
 
Methods inherited from class net.sf.jpkgmk.AbstractFileCreatorAdapter
clean, create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PKG_INFO

public static final java.lang.String PKG_INFO
See Also:
Constant Field Values

CATEGORY_APPLICATION

public static final java.lang.String CATEGORY_APPLICATION
See Also:
Constant Field Values

CATEGORY_SYSTEM

public static final java.lang.String CATEGORY_SYSTEM
See Also:
Constant Field Values

LINE_SEPARATOR

public static final java.lang.String LINE_SEPARATOR
Constructor Detail

PkgInfo

public PkgInfo()

PkgInfo

public PkgInfo(java.lang.String pkg,
               java.lang.String name,
               java.lang.String version,
               java.lang.String arch,
               java.lang.String category)
Constructor taking the mandatory parameters for this class

Parameters:
pkg -
name -
version -
arch -

PkgInfo

public PkgInfo(java.lang.String pkg,
               java.lang.String name,
               java.lang.String version,
               java.lang.String arch,
               java.lang.String category,
               java.lang.String desc,
               java.lang.String basedir,
               java.lang.String vendor,
               java.util.List<java.lang.String> optionList)
Parameters:
pkg -
name -
version -
arch -
category -
desc -
basedir -
vendor -
optionList - addition options, for example "SUMW_PRODNAME=XyOS", "SUMW_PRODVERS=5.10"
Method Detail

validate

public void validate()

getPkg

public java.lang.String getPkg()

setPkg

public void setPkg(java.lang.String pkg)

getVersion

public java.lang.String getVersion()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getArch

public java.lang.String getArch()

getDesc

public java.lang.String getDesc()

getPkgInfoBasedir

public java.lang.String getPkgInfoBasedir()

getCategory

public java.lang.String getCategory()

getVendor

public java.lang.String getVendor()

getOptionList

public java.util.List<java.lang.String> getOptionList()

setOptionList

public void setOptionList(java.util.List<java.lang.String> optionList)

addOption

public void addOption(java.lang.String option)

setVersion

public void setVersion(java.lang.String version)

setArch

public void setArch(java.lang.String arch)

setDesc

public void setDesc(java.lang.String desc)

setPkgInfoBasedir

public void setPkgInfoBasedir(java.lang.String pkgInfoBasedir)

setCategory

public void setCategory(java.lang.String category)

setVendor

public void setVendor(java.lang.String vendor)

getFileHandler

public FileHandler getFileHandler(java.io.File targetDir)
Specified by:
getFileHandler in class AbstractFileCreatorAdapter

writeContent

public void writeContent(java.io.Writer writer)
                  throws java.io.IOException
write pkginfo

Parameters:
target -
Throws:
java.io.IOException

generateFilename

public java.lang.String generateFilename()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2007-2008. All Rights Reserved.