net.sf.jpkgmk.prototype
Class Prototype
java.lang.Object
net.sf.jpkgmk.AbstractFileCreatorAdapter
net.sf.jpkgmk.prototype.Prototype
- All Implemented Interfaces:
- FileHandler.ContentWriter
public class Prototype
- extends AbstractFileCreatorAdapter
Pure java impl for the creation of a prototype which is normally done with "pkgproto" on unix.
Used for "pkgmk" on unix
- 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 |
PROTOTYPE
|
|
Constructor Summary |
Prototype()
Default constructor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PROTOTYPE
public static final java.lang.String PROTOTYPE
- See Also:
- Constant Field Values
Prototype
public Prototype()
- Default constructor
getVariableMap
public VariableMap getVariableMap()
setVariableMap
public void setVariableMap(VariableMap variableMap)
writeContent
public void writeContent(java.io.Writer writer)
throws java.io.IOException
- Throws:
java.io.IOException
getFileHandler
public FileHandler getFileHandler(java.io.File targetDir)
- Specified by:
getFileHandler in class AbstractFileCreatorAdapter
add
public void add(PrototypeEntry entry)
- Adds a prototype entry. Does not create the physical file yet
- Parameters:
entry - New entry to add
add
public void add(int insertIndex,
PrototypeEntry entry)
- Adds a prototype entry. Does not create the physical file yet
- Parameters:
insertIndex - The index where to insert the given entryentry - New entry to add
remove
public boolean remove(PrototypeEntry entry)
contains
public boolean contains(PrototypeEntry entry)
getPrototypeEntryList
public java.util.List<PrototypeEntry> getPrototypeEntryList()
- Returns:
- Returs the list of prototype entries in the order they were added before
createPackage
public PkgMap createPackage(java.io.File targetDir)
throws java.io.IOException
- Creates the package which includes the creation of all files that contain to the package
as well as the java object
PkgMap. Note that the physical pkgmap file is not created.
- Parameters:
targetDir - The directory where all target files are copied to/created in.
- Returns:
- The object representation
PkgMap of the pkgmap file.
- Throws:
java.io.IOException
createPkgMap
public PkgMap createPkgMap(java.io.File targetDir)
- Parameters:
targetDir - The directory in which the physical files for the pkgMapEntries are located
- Returns:
- The result pkgmap object
createFiles
public void createFiles(java.io.File targetDir)
throws java.io.IOException
- Throws:
java.io.IOException
toPrettyString
public java.lang.String toPrettyString()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2007-2008. All Rights Reserved.