| |
|
| java.lang.Object org.tp23.antinstaller.runtime.exe.PropertyLoaderFilter
All known Subclasses: org.tp23.antinstaller.runtime.exe.EmbeddablePropertyLoaderFilter,
PropertyLoaderFilter | public class PropertyLoaderFilter implements ExecuteFilter(Code) | | Loads properties from a file of default properties if found.
the Installer element should define an attribute
loadDefaults with one of the following values.
false - do not look for defaults
prompt - look for properties and ask if they should be used if found
true - look for defaults if found load them
prompt-auto - weird case where installer permits zero user interaction running only from antinstaller-config.xml defaults
N.B. this is not a generic property loader but one specifically for properties files
generated by a previous run of an identical installer or one that according to the version
number is compatible, see PropertyTask for loading other property sets
author: teknopaul |
DEFAULT_PROPERTIES_FILE_PROPERTY | final public static String DEFAULT_PROPERTIES_FILE_PROPERTY(Code) | | |
PropertyLoaderFilter | public PropertyLoaderFilter()(Code) | | Default constructor required for an ExecuteFilter implementation.
The default property name given by @see{DEFAULT_PROPERTIES_FILE_PROPERTY}
is used with this constructor
|
PropertyLoaderFilter | public PropertyLoaderFilter(String fileNameProperty)(Code) | | Constructor that allows the name of the property containg the properties file
to be specified
Parameters: fileNameProperty - property containing the name of file |
getPropertiesFoundCount | protected int getPropertiesFoundCount()(Code) | | |
isPropertiesLoaded | protected boolean isPropertiesLoaded()(Code) | | Check if external properties have been loaded
true if an external properties file was configured and containedat least one property |
loadPredefinedProperties | protected Properties loadPredefinedProperties(InstallerContext context, String fileNamePropertyName) throws InstallException(Code) | | Load properties from a properties file if present.
The name of the properties file is checked for in the following order.
If the parameter fileNamePropertyName is not null:
- the environment is checked for an environment variable with that name
- java system properties are checked for a property with that name
If the file name has not been found, or if fileNamePropertyName == null
then the default file name is used - @see{org.tp23.antinstaller.PropertiesFileRenderer#PROPERTIES_FILE_NAME}
In embedded installer screen this method can be overriden to load properties
Parameters: context - installer context Parameters: fileNamePropertyName - name of environment variable or java system property containing thename of the properties file to be loaded or null properties throws: InstallException - if the properties file is missing or an error occurs loading it |
|
|
|