com.izforge.izpack.panels.userinput.field.file
Class AbstractFileField

java.lang.Object
  extended by com.izforge.izpack.panels.userinput.field.Field
      extended by com.izforge.izpack.panels.userinput.field.file.AbstractFileField
Direct Known Subclasses:
DirField, FileField, MultipleFileField

public class AbstractFileField
extends Field

Common file field functionality.

Author:
Tim Anderson

Field Summary
protected  boolean allowEmptyValue
          Determines if empty input values are allowed.
protected  boolean mustExist
          Determines if the file must exist
 
Constructor Summary
AbstractFileField(FileFieldConfig config, InstallData installData)
          Constructs an AbstractFileField.
 
Method Summary
 File getAbsoluteFile(String path)
          Returns the absolute file for the specified path, expanding any unix home reference (~).
 boolean getAllowEmptyValue()
          Determines if empty input values are allowed.
 String getFileExtension()
          Returns the file extension.
 String getFileExtensionDescription()
          Returns the file extension description.
 boolean isMustExist()
          Determines if the file must exist
 
Methods inherited from class com.izforge.izpack.panels.userinput.field.Field
getDefaultValue, getDescription, getDescription, getInitialValue, getInstallData, getLabel, getLabel, getOmitFromAuto, getOsModels, getPacks, getProcessors, getSize, getSummaryKey, getTooltip, getValue, getVariable, isConditionTrue, isEffectiveDisplayHidden, isEffectiveReadonly, replaceVariables, setSaving, setValue, setVariable, validate, validate, wrapDefaultValue, wrapInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowEmptyValue

protected final boolean allowEmptyValue
Determines if empty input values are allowed.


mustExist

protected final boolean mustExist
Determines if the file must exist

Constructor Detail

AbstractFileField

public AbstractFileField(FileFieldConfig config,
                         InstallData installData)
Constructs an AbstractFileField.

Parameters:
config - the configuration to get field information from
installData - the installation data
Throws:
IzPackException - if the field cannot be read
Method Detail

getFileExtension

public String getFileExtension()
Returns the file extension.

Returns:
the file extension. May be null

getFileExtensionDescription

public String getFileExtensionDescription()
Returns the file extension description.

Returns:
the file extension description. May be null

getAllowEmptyValue

public boolean getAllowEmptyValue()
Determines if empty input values are allowed.

Returns:
true if empty input values are allowed; otherwise false

isMustExist

public boolean isMustExist()
Determines if the file must exist

Returns:
true if the file must exist, otherwise false

getAbsoluteFile

public File getAbsoluteFile(String path)
Returns the absolute file for the specified path, expanding any unix home reference (~).

Parameters:
path - the path
Returns:
the absolute file for the path


Copyright © 2018. All rights reserved.