org.jwarp.flow.form.model
Interface IForm

All Superinterfaces:
IComponent, IContainer, IExceptionProvider
All Known Implementing Classes:
Form

public interface IForm
extends IExceptionProvider, IContainer


Field Summary
static int STATE_ACCEPTED
          Status: The form data was returned with a accepted request (can be severals)
static int STATE_ACTIVE
          Status: The form is shown and now possibly edited by the user.
static int STATE_CANCELLED
          Status: The form data was sent with a cancel request (can be severals).
static int STATE_CREATED
          Status: The form is created but not sent to the user
 
Method Summary
 void addFormListener(IFormListener listener)
          Add a listener to the form.
 void addFormListener(IFormListener listener, int position)
          Add a listener to the form.
 void addValidator(IClientValidator validator)
          Add a new client level validator.
 IActivity getActivity()
          Gets the user to which this form instance was presented.
 int getID()
          Return the unique id of this form instance
 int getListenersCount()
          The current number of registered listeners
 int getState()
          Returns the current form status.
 java.util.Iterator getValidators()
          Get the defined validators on the client level.
 void removeFormListener(IFormListener listener)
          Remove a listener from the form.
 void removeValidator(IClientValidator validator)
          Remove a client level validator.
 void setState(int state)
          Set the forms internal state.
 
Methods inherited from interface org.jwarp.common.IExceptionProvider
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener
 
Methods inherited from interface org.jwarp.flow.form.model.IContainer
add, add, addContainerListener, contains, getComponent, getComponentCount, getComponents, remove, remove, removeAll, removeContainerListener
 
Methods inherited from interface org.jwarp.flow.form.model.IComponent
addComponentListener, getDescription, getFullName, getListeners, getLocale, getName, getParent, getXMLTree, handleEvent, isEnabled, removeComponentListener, setEnabled, setFlowData, setLocale
 

Field Detail

STATE_CREATED

public static final int STATE_CREATED
Status: The form is created but not sent to the user

STATE_ACTIVE

public static final int STATE_ACTIVE
Status: The form is shown and now possibly edited by the user.

STATE_CANCELLED

public static final int STATE_CANCELLED
Status: The form data was sent with a cancel request (can be severals).

STATE_ACCEPTED

public static final int STATE_ACCEPTED
Status: The form data was returned with a accepted request (can be severals)
Method Detail

getID

public int getID()
Return the unique id of this form instance
Specified by:
getID in interface IComponent
Returns:
The instance id

getState

public int getState()
Returns the current form status.
Returns:
The current status.

addFormListener

public void addFormListener(IFormListener listener)
Add a listener to the form. A form sends form events describing its activities.
Parameters:
listener - The new listener

addFormListener

public void addFormListener(IFormListener listener,
                            int position)
Add a listener to the form. A form sends form events describing its activities.
Parameters:
listener - The new listener

getListenersCount

public int getListenersCount()
The current number of registered listeners
Returns:
The current listeners count

removeFormListener

public void removeFormListener(IFormListener listener)
Remove a listener from the form. A form sends form events describing its activities.
Parameters:
listener - The listener to be removed

addValidator

public void addValidator(IClientValidator validator)
Add a new client level validator.
Parameters:
validator - The new validator

removeValidator

public void removeValidator(IClientValidator validator)
Remove a client level validator.
Parameters:
validator - The new validator

getValidators

public java.util.Iterator getValidators()
Get the defined validators on the client level.
Returns:
The client validators

getActivity

public IActivity getActivity()
                      throws java.lang.SecurityException
Gets the user to which this form instance was presented.
Returns:
the currently owning user
Throws:
java.lang.SecurityException - If access to this operation was denied

setState

public void setState(int state)
Set the forms internal state.

©   O R C A   S y s t e m s