ch.sahits.model.gui
Interface IFormFileUpload

All Superinterfaces:
IFormButton, IFormElement, IFormInput, IFormInputElement

public interface IFormFileUpload
extends IFormInput, IFormButton

This input field defines a form field for file upload

Since:
0.9.4
Author:
Andi Hotz

Method Summary
 java.util.List<java.lang.String> acceptedTypes()
          Retrieve a list of accepted types
 void addAcceptedType(java.lang.String typePart)
          Add a type or part of one (for MIME e.g. text/htm, text/*).
 java.lang.String getButtonText()
          Retrieve the text for the button
 int getMaxFileSize()
          Retrieve the maximum size of the file
 boolean hasTypeRestriction()
          Check if the file upload is restricted to any types
 void setButtonText(java.lang.String text)
          Set the button text
 void setMaxFileSize(int size)
          Set the maximum file size
 
Methods inherited from interface ch.sahits.model.gui.IFormInput
getNoCols, getNoRows, getSize, setNoCols, setNoRows, setSize
 
Methods inherited from interface ch.sahits.model.gui.IFormInputElement
getDefaultValue, isEnabled, isVisible, setDefaultValue, setEnable, setVisible
 
Methods inherited from interface ch.sahits.model.gui.IFormElement
getId, getName, getTooltip, setId, setName, setTooltip
 

Method Detail

addAcceptedType

void addAcceptedType(java.lang.String typePart)
Add a type or part of one (for MIME e.g. text/htm, text/*).

Parameters:
typePart - type

acceptedTypes

java.util.List<java.lang.String> acceptedTypes()
Retrieve a list of accepted types

Returns:
List of types

hasTypeRestriction

boolean hasTypeRestriction()
Check if the file upload is restricted to any types

Returns:
true if any restriction exists

getMaxFileSize

int getMaxFileSize()
Retrieve the maximum size of the file

Returns:
max file size in bytes

setMaxFileSize

void setMaxFileSize(int size)
Set the maximum file size

Parameters:
size - of the file in bytes

setButtonText

void setButtonText(java.lang.String text)
Set the button text

Parameters:
text - for the button

getButtonText

java.lang.String getButtonText()
Retrieve the text for the button

Returns:
Button Text