|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.threerings.jpkg.ant.dpkg.scripts.runner.ScriptRunner
public class ScriptRunner
Handles compiling PackageScript
maintainer scripts into a single master script which
executes each individual script in turn.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.threerings.jpkg.debian.MaintainerScript |
---|
MaintainerScript.Type |
Constructor Summary | |
---|---|
ScriptRunner(MaintainerScript.Type type,
List<PackageScript> scripts,
DpkgData data)
Construct a new ScriptRunner for the associated Type , using the list of
PackageScript scripts. |
Method Summary | |
---|---|
long |
getSize()
Returns the number of bytes of data in the InputStream . |
InputStream |
getStream()
Returns the InputStream with the script contents for this type. |
String |
getTemplateName()
Returns the name of the template, as found in the classpath. |
MaintainerScript.Type |
getType()
Returns the MaintainerScript.Type of script this instance is. |
void |
populateContext(VelocityContext context)
Provides the template a VelocityContext to populate with e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptRunner(MaintainerScript.Type type, List<PackageScript> scripts, DpkgData data) throws IOException, UnexpectedScriptTypeException
Type
, using the list of
PackageScript
scripts. The class will verify all supplied scripts
match the type given.
type
- The Type
of all scripts being encoded.scripts
- The list of PackageScript
scripts to encode.data
- The DpkgData
to pass to each script being encoded.
IOException
- If any i/o errors occur.
UnexpectedScriptTypeException
- If any script type in the supplied list does not match the type
provided as the first parameter to the constructor.Method Detail |
---|
public MaintainerScript.Type getType()
MaintainerScript
MaintainerScript.Type
of script this instance is.
getType
in interface MaintainerScript
public InputStream getStream() throws IOException
MaintainerScript
InputStream
with the script contents for this type.
getStream
in interface MaintainerScript
IOException
public long getSize()
MaintainerScript
InputStream
.
getSize
in interface MaintainerScript
public String getTemplateName()
VelocityTemplate
getTemplateName
in interface VelocityTemplate
public void populateContext(VelocityContext context)
VelocityTemplate
VelocityContext
to populate with e.g. key/value substitutions.
populateContext
in interface VelocityTemplate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |