|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.install4j.api.DirectoryValidator
public abstract class DirectoryValidator
If you define a directory validatory derived from this class on the "Advanced tasks" tab in the install4j GUI it will be instantiated and used to modify the behavior of the the "Installation location" screen of the installer. This is useful if the standard behavior of accepting non-existing directories and emitting a warning for existing directories is not suitable for your needs. Also, if you wish to change the installation directory after the user has made a selection, this validator can be used.
| Constructor Summary | |
|---|---|
DirectoryValidator()
|
|
| Method Summary | |
|---|---|
abstract boolean |
canValidate()
If you wish to validate directory selections of the user, return true here. |
abstract java.io.File |
getInstallationDirectory(java.io.File selectedDirectory,
java.lang.String defaultDirectoryName)
After the user selection for the installation directory has been accepted, this method will be queried to obtain the actual installation directory. |
InstallerContext |
getInstallerContext()
Returns the InstallerContext that the framework has associated with this validator in setInstallerContext. |
void |
setInstallerContext(InstallerContext context)
This method is called by the framework to set the InstallerContext. |
abstract boolean |
validate(java.io.File selectedDirectory)
Validate the user selection for the installation directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectoryValidator()
| Method Detail |
|---|
public InstallerContext getInstallerContext()
public void setInstallerContext(InstallerContext context)
context - the context.public abstract boolean canValidate()
public abstract boolean validate(java.io.File selectedDirectory)
Note: No further warning message will be displayed when returning false.
selectedDirectory - the directory selected by the user.
public abstract java.io.File getInstallationDirectory(java.io.File selectedDirectory,
java.lang.String defaultDirectoryName)
selectedDirectory - the user selection for the installation directory.defaultDirectoryName - the default installation directory name as defined in the install4j GUI.
|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||