public class AntAction extends ActionBase
Modifier and Type | Field and Description |
---|---|
static String |
ANTACTION |
static String |
ANTACTIONS |
static String |
ANTCALL |
private String |
buildFile |
private String |
logFile |
private Properties |
properties |
private List |
propertyFiles |
private boolean |
quiet |
private static long |
serialVersionUID |
private List |
targets |
private List |
uninstallTargets |
private boolean |
verbose |
ACTION, AFTERDELETION, AFTERPACK, AFTERPACKS, ARCH, ASKFALSE, ASKTRUE, BEFOREDELETION, BEFOREPACK, BEFOREPACKS, BUILDFILE, CASESENSITIVE, COPY, EXCLUDE, EXCLUDES, FALSE, FAMILY, FILESET, INCLUDE, INCLUDES, LOGFILE, MAC, messageID, MESSAGEID, MOVE, NAME, NO, NOTHING, ONDEST, order, ORDER, OS, OVERRIDE, PACK, PATH, PROPERTY, PROPERTYFILE, QUIET, REMOVE, REWIND, SRCDIR, TARGET, TARGETDIR, TOUCH, TRUE, UNINSTALL_ACTION, UNINSTALL_ORDER, UNINSTALL_TARGET, uninstallOrder, UNIX, UPDATE, VALUE, VERBOSE, VERSION, WINDOWS, YES
Constructor and Description |
---|
AntAction()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
addProperties(org.apache.tools.ant.Project proj,
Properties props) |
private void |
addPropertiesFromPropertyFiles(org.apache.tools.ant.Project proj) |
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.
|
private org.apache.tools.ant.BuildLogger |
createLogger() |
String |
getBuildFile()
Returns the build file.
|
String |
getLogFile()
Returns the current logfile path as string.
|
Properties |
getProperties()
Returns the properties.
|
String |
getProperty(String name)
Returns the value for the property identified by the given name.
|
List |
getPropertyFiles()
Returns the property file paths as list of strings.
|
List |
getTargets()
Returns the targets.
|
List |
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 |
setBuildFile(String buildFile)
Sets the build file to be used to the given string.
|
void |
setLogFile(String logFile)
Sets the logfile path to the given string.
|
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 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 |
setTargets(ArrayList targets)
Sets the targets which should be performed at installation time.
|
void |
setUninstallTargets(ArrayList targets)
Sets the targets which should be performed at uninstallation time.
|
void |
setVerbose(boolean verbose)
Sets the verbose state.
|
getMessageID, getOrder, getUninstallOrder, setMessageID, setOrder, setUninstallOrder
private static final long serialVersionUID
public static final String ANTACTIONS
public static final String ANTACTION
public static final String ANTCALL
private boolean quiet
private boolean verbose
private Properties properties
private List uninstallTargets
private List propertyFiles
public AntAction()
public void performInstallAction() throws Exception
Exception
public void performUninstallAction() throws Exception
Exception
public void performAction(boolean uninstall) throws Exception
uninstall
- An install/uninstall switch. If this is true only the uninstall
actions, otherwise only the install actions are being performed.Exception
for calling all install actions.
,
for calling all uninstall actions.
public String getBuildFile()
public void setBuildFile(String buildFile)
buildFile
- build file path to be usedpublic String getLogFile()
public void setLogFile(String logFile)
logFile
- to be setpublic List getPropertyFiles()
public void addPropertyFile(String propertyFile)
propertyFile
- to be addedpublic void setPropertyFiles(List 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 List getTargets()
public void setTargets(ArrayList targets)
targets
- list of targetspublic void addTarget(String target)
target
- target to be addpublic List getUninstallTargets()
public void setUninstallTargets(ArrayList 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 setprivate org.apache.tools.ant.BuildLogger createLogger()
private void addProperties(org.apache.tools.ant.Project proj, Properties props)
private void addPropertiesFromPropertyFiles(org.apache.tools.ant.Project proj) throws Exception
Exception
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses