jet.html.impl
Class JetFile

java.lang.Object
  extended by jet.html.core.JetComponent
      extended by jet.html.core.JetChildComponent
          extended by jet.html.impl.JetFile
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Decodeable, JetChildComponent, JetComponent, JetFile

public class JetFile
extends JetChildComponent
implements JetFile

Author:
Markus.Meisters@web.de
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface jet.html.JetChildComponent
JetChildComponent.HasNoParent
 
Field Summary
private  JetFileUploaded fileContent
          Holds the file data
private  java.lang.String messageKey
          Holds the message key to use for labeling the button
 
Fields inherited from class jet.html.core.JetComponent
eventSupport
 
Constructor Summary
JetFile(java.lang.String identifier)
          Creates new Component - name and styleclass would be the same as identifier
JetFile(java.lang.String identifier, java.lang.String styleclass)
          Creates new Component
JetFile(java.lang.String identifier, java.lang.String name, java.lang.String styleclass)
          Creates new Component
 
Method Summary
 java.lang.Object clone()
          This method retruns a clone from the component
 void decodeForm(java.lang.StringBuilder builder, JetContext jetContext)
          This method decodes the form to the given buffer
 void encode(java.util.Map requestParameters)
          Encodes the needed parameteters
 JetFileUploaded getFileContent()
          Returns a filecontet Object
 java.lang.String getMessageKey()
          Returns the message key for localizer file to use
 void reset()
          Method to reset the component to reuse
 void setFileContent(JetFileUploaded fileContent)
          Set the file content
 void setMessageKey(java.lang.String messageKey)
          Set the message key to use for labeling the button
 
Methods inherited from class jet.html.core.JetChildComponent
getForm, getParent, isHidden, setParent, toggleHidden
 
Methods inherited from class jet.html.core.JetComponent
addListener, addListener, componentChanged, findComponent, findComponents, getGeneratedComponentIdentifier, getIdentifier, getName, getNewIdentifier, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jet.html.JetChildComponent
getForm, getParent, isHidden, setParent, toggleHidden
 
Methods inherited from interface jet.html.JetComponent
addListener, addListener, componentChanged, findComponent, findComponents, getIdentifier, getName, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass
 

Field Detail

messageKey

private java.lang.String messageKey
Holds the message key to use for labeling the button


fileContent

private JetFileUploaded fileContent
Holds the file data

Constructor Detail

JetFile

public JetFile(java.lang.String identifier)
Creates new Component - name and styleclass would be the same as identifier

Parameters:
identifier - the identifier

JetFile

public JetFile(java.lang.String identifier,
               java.lang.String styleclass)
Creates new Component

Parameters:
identifier - the identifier
styleclass - the css style class

JetFile

public JetFile(java.lang.String identifier,
               java.lang.String name,
               java.lang.String styleclass)
Creates new Component

Parameters:
identifier - the identifier
name - the name of the component if different to identifier
styleclass - the css style class
Method Detail

decodeForm

public void decodeForm(java.lang.StringBuilder builder,
                       JetContext jetContext)
This method decodes the form to the given buffer

Specified by:
decodeForm in interface Decodeable
Specified by:
decodeForm in interface JetComponent
Specified by:
decodeForm in interface JetFile
Specified by:
decodeForm in class JetComponent
Parameters:
builder - builder to use

clone

public java.lang.Object clone()
This method retruns a clone from the component

Specified by:
clone in interface JetComponent
Specified by:
clone in interface JetFile
Specified by:
clone in class JetComponent
Returns:
the cloned object

getMessageKey

public java.lang.String getMessageKey()
Returns the message key for localizer file to use

Specified by:
getMessageKey in interface JetFile
Returns:
String message key

setMessageKey

public void setMessageKey(java.lang.String messageKey)
Set the message key to use for labeling the button

Specified by:
setMessageKey in interface JetFile

encode

public void encode(java.util.Map requestParameters)
Encodes the needed parameteters

Specified by:
encode in interface JetFile
Parameters:
requestParameters - request parameters

getFileContent

public JetFileUploaded getFileContent()
Returns a filecontet Object

Specified by:
getFileContent in interface JetFile
Returns:
file content

setFileContent

public void setFileContent(JetFileUploaded fileContent)
Set the file content

Specified by:
setFileContent in interface JetFile
Parameters:
fileContent -

reset

public void reset()
Method to reset the component to reuse

Specified by:
reset in interface JetFile