com.threerings.jpkg.ant.dpkg.scripts.standard
Class AbstractTypeScript
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.threerings.antidote.field.BaseComponent
com.threerings.antidote.field.BaseField
com.threerings.jpkg.ant.dpkg.scripts.BaseTemplateScript
com.threerings.jpkg.ant.dpkg.scripts.TemplateScript
com.threerings.jpkg.ant.dpkg.scripts.standard.AbstractTypeScript
- All Implemented Interfaces:
- Field, ReferenceField, RequiresValidation, PackageScript, ValidationScript, VelocityTemplate, Cloneable
- Direct Known Subclasses:
- PostInst, PostRm, PreInst, PreRm
public abstract class AbstractTypeScript
- extends TemplateScript
An abstract TemplateScript
for defining the script source from either a file or a
single command listed as a string.
Methods inherited from class com.threerings.antidote.field.BaseComponent |
appendViolation, appendViolationList, getReferencedField, isReference, registerField, reportConflictingProperties, reportUnsetDependentFields, reportUnsetDependentProperties, reportUnsetField, setReference, validate, validateChildFields, validateChildFields, validateOptionalProperties, validateProperties, validateProperties |
Methods inherited from class org.apache.tools.ant.Task |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
AbstractTypeScript
public AbstractTypeScript(MaintainerScript.Type type)
getTemplateName
public String getTemplateName()
- Description copied from interface:
VelocityTemplate
- Returns the name of the template, as found in the classpath.
getSource
public InputStream getSource(DpkgData data)
throws IOException
- Description copied from interface:
PackageScript
- Returns the script text source.
- Specified by:
getSource
in interface PackageScript
- Overrides:
getSource
in class TemplateScript
- Throws:
IOException
failOnError
public boolean failOnError()
- Description copied from interface:
PackageScript
- Whether to report the failure of this script to the package system. If true, then a failure
in this script will fail the package installation or removal.
setCommand
public void setCommand(String value)
- Ant setter field: the command line.
setSource
public void setSource(String value)
- Ant setter field: the source file.
setFailonerror
public void setFailonerror(String value)
- Ant setter field: failonerror.
validateField
protected void validateField()
- Description copied from class:
BaseComponent
- Give each subclass a chance to do field specific validation.
- Specified by:
validateField
in class BaseComponent
Copyright © 2007-2008 Three Rings Design, Inc.
All Rights Reserved. Released under a BSD license.