public class AntAction extends ActionBase
| Modifier and Type | Field and Description |
|---|---|
static String |
ANTCALL |
static String |
CONDITIONID_ATTR |
AFTERDELETION, AFTERPACK, AFTERPACKS, BEFOREDELETION, BEFOREPACK, BEFOREPACKS, messageID, order, ORDER, UNINSTALL_ORDER, uninstallOrder| Constructor and Description |
|---|
AntAction()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyFile(String propertyFile)
Adds one property file path to the internal list of property file paths.
|
void |
addTarget(String target)
Adds the given target to the target list which should be performed at installation time.
|
void |
addUninstallTarget(String target)
Adds the given target to the target list which should be performed at uninstallation time.
|
File |
getBuildDir()
Returns the build working directory.
|
File |
getBuildFile()
Returns the build file.
|
String |
getConditionId() |
File |
getLogFile()
Returns the current logfile path as string.
|
AntLogLevel |
getLogLevel()
Get Ant log priority level the action uses when logging.
|
Properties |
getProperties()
Returns the properties.
|
String |
getProperty(String name)
Returns the value for the property identified by the given name.
|
List<String> |
getPropertyFiles()
Returns the property file paths as list of strings.
|
Prompt.Type |
getSeverity()
Get severity of this action in case of errors
|
List<String> |
getTargets()
Returns the targets.
|
List<String> |
getUninstallTargets()
Returns the uninstaller targets.
|
boolean |
isQuiet()
Returns the quiet state.
|
boolean |
isVerbose()
Returns the verbose state.
|
void |
performAction(boolean uninstall)
Performs all defined actions.
|
void |
performInstallAction()
Performs all defined install actions.
|
void |
performUninstallAction()
Performs all defined uninstall actions.
|
void |
setBuildDir(File buildDir)
Sets the build working directory to be used to the given string.
|
void |
setBuildFile(File buildFile)
Sets the build file to be used to the given string.
|
void |
setConditionId(String conditionId) |
void |
setLogFile(File logFile,
boolean append)
Sets the logfile path to the given string.
|
void |
setLogLevel(AntLogLevel logLevel)
Set Ant log priority level the action should use when logging.
|
void |
setProperties(Properties properties)
Sets the internal properties to the given properties.
|
void |
setProperty(String name,
String value)
Sets the given value to the property identified by the given name.
|
void |
setPropertyFiles(List<String> propertyFiles)
Sets the property file path list to the given list.
|
void |
setQuiet(boolean quiet)
Sets whether the associated ant task should be performed quiet or not.
|
void |
setSeverity(Prompt.Type severity)
Set severity of this action in case of errors
|
void |
setTargets(ArrayList<String> targets)
Sets the targets which should be performed at installation time.
|
void |
setUninstallTargets(ArrayList<String> targets)
Sets the targets which should be performed at uninstallation time.
|
void |
setVerbose(boolean verbose)
Sets the verbose state.
|
void |
throwBuildException(IzPackException e)
Wraps a Ant
BuildException to an InstallerException. |
getMessageID, getOrder, getUninstallOrder, setMessageID, setOrder, setUninstallOrderpublic static final String CONDITIONID_ATTR
public static final String ANTCALL
public void performInstallAction()
throws IzPackException
ExceptionIzPackExceptionpublic void performUninstallAction()
throws IzPackException
IzPackException - for any errorpublic void performAction(boolean uninstall)
throws IzPackException
uninstall - An install/uninstall switch. If this is true only the uninstall
actions, otherwise only the install actions are being performed.IzPackException - for any errorfor calling all install actions.,
for calling all uninstall actions.public String getConditionId()
public void setConditionId(String conditionId)
public File getBuildFile()
public void setBuildFile(File buildFile)
buildFile - build file path to be usedpublic File getBuildDir()
public void setBuildDir(File buildDir)
buildDir - build working directory path to be usedpublic File getLogFile()
public void setLogFile(File logFile, boolean append)
logFile - to be setpublic List<String> getPropertyFiles()
public void addPropertyFile(String propertyFile)
propertyFile - to be addedpublic void setPropertyFiles(List<String> propertyFiles)
propertyFiles - list of property file paths to be setpublic Properties getProperties()
public void setProperties(Properties properties)
properties - properties to be setpublic void setProperty(String name, String value)
name - key of the propertyvalue - value to be used for the propertypublic String getProperty(String name)
name - name of the propertypublic boolean isQuiet()
public void setQuiet(boolean quiet)
quiet - quiet state to setpublic AntLogLevel getLogLevel()
Projectpublic void setLogLevel(AntLogLevel logLevel)
logLevel - Projectpublic Prompt.Type getSeverity()
public void setSeverity(Prompt.Type severity)
severity - public void setTargets(ArrayList<String> targets)
targets - list of targetspublic void addTarget(String target)
target - target to be addpublic List<String> getUninstallTargets()
public void setUninstallTargets(ArrayList<String> targets)
targets - list of targetspublic void addUninstallTarget(String target)
target - target to be addpublic boolean isVerbose()
public void setVerbose(boolean verbose)
verbose - state to be setpublic void throwBuildException(IzPackException e) throws InstallerException
BuildException to an InstallerException.
This is mainly done for the purpose of cutting of the location from the build failure message.
Locations should appear just in logs, not to the user.e - the IzPackException with the nested BuildExceptionInstallerExceptionCopyright © 2001–2025. All rights reserved.