JSCAPE MFT Server

com.jscape.inet.mft.subsystems.transport.http.uploadforms
Class MultiselectElement

java.lang.Object
  extended by com.jscape.inet.mft.subsystems.transport.http.uploadforms.MultiselectElement
All Implemented Interfaces:
FormElement<MultiselectElement.Visitor>, com.jscape.util.Visitable<MultiselectElement.Visitor>

public class MultiselectElement
extends java.lang.Object
implements FormElement<MultiselectElement.Visitor>

Multi-select form element.

Author:
Alex Usun

Nested Class Summary
static interface MultiselectElement.Visitor
           
 
Nested classes/interfaces inherited from interface com.jscape.util.Visitable
com.jscape.util.Visitable.VisitorBase, com.jscape.util.Visitable.VisitorException
 
Constructor Summary
MultiselectElement()
          Creates a new element instance.
MultiselectElement(java.lang.String name, java.lang.String label, java.lang.String[] values, boolean required)
          Creates a new element instance.
 
Method Summary
 java.lang.Object accept(MultiselectElement.Visitor visitor)
          Backwards dispatching entry point.
 FormElement copy()
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getLabel()
          Return an element label.
 java.lang.String getName()
          Returns an element name.
 java.lang.String[] getValues()
          Returns element values.
 int hashCode()
           
 boolean isRequired()
          Returns element required flag.
 void setLabel(java.lang.String value)
          Sets a new element label.
 void setName(java.lang.String value)
          Sets a new element name.
 void setRequired(boolean value)
          Sets element required flag.
 void setValues(java.lang.String[] values)
          Sets new element values.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiselectElement

public MultiselectElement(java.lang.String name,
                          java.lang.String label,
                          java.lang.String[] values,
                          boolean required)
Creates a new element instance.

Parameters:
name - an element name
label - an element label
values - available values
required - if true element is marked as required

MultiselectElement

public MultiselectElement()
Creates a new element instance. Used by serialization sub-system.

Method Detail

getName

public java.lang.String getName()
Description copied from interface: FormElement
Returns an element name.

Specified by:
getName in interface FormElement<MultiselectElement.Visitor>
Returns:
an element name

setName

public void setName(java.lang.String value)
Sets a new element name.

Parameters:
value - a new element name

getLabel

public java.lang.String getLabel()
Description copied from interface: FormElement
Return an element label.

Specified by:
getLabel in interface FormElement<MultiselectElement.Visitor>
Returns:
an element label

setLabel

public void setLabel(java.lang.String value)
Sets a new element label.

Parameters:
value - a new element label

isRequired

public boolean isRequired()
Description copied from interface: FormElement
Returns element required flag.

Specified by:
isRequired in interface FormElement<MultiselectElement.Visitor>
Returns:
true if element is required

copy

public FormElement copy()
Specified by:
copy in interface FormElement<MultiselectElement.Visitor>

setRequired

public void setRequired(boolean value)
Sets element required flag.

Parameters:
value - if true element is marked as required

getValues

public java.lang.String[] getValues()
Returns element values.

Returns:
element values

setValues

public void setValues(java.lang.String[] values)
Sets new element values.

Parameters:
values - new element values

accept

public java.lang.Object accept(MultiselectElement.Visitor visitor)
                        throws com.jscape.util.Visitable.VisitorException
Description copied from interface: com.jscape.util.Visitable
Backwards dispatching entry point.

Specified by:
accept in interface com.jscape.util.Visitable<MultiselectElement.Visitor>
Parameters:
visitor - a visitor instance
Returns:
a visit result if any
Throws:
com.jscape.util.Visitable.VisitorException - if an error occurs

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

JSCAPE MFT Server

Copyright © JSCAPE LLC. 1999-2015. All Rights Reserved