com.ptc.core.components.forms
Class FormResult

java.lang.Object
  extended by com.ptc.core.components.forms.FormResult
All Implemented Interfaces:
Serializable

public class FormResult
extends Object
implements Serializable

A class used to pass feedback from one form processor to another or from a form processor back to the WizardServlet after processing completes. This class contains status and nextAction flags to indicate what the disposition of the wizard window should be and how the parent window should be refreshed. It can contain feedback messages for the user and javascript to be executed in the response page.

This class also contains methods that are called by the WizardServlet to write the wizard response page.



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 void addException(Throwable t)
          

Supported API: true
 void addFeedbackMessage(FeedbackMessage mess)
          

Supported API: true
 List<Throwable> getExceptions()
          

Supported API: true
 List<FeedbackMessage> getFeedbackMessages()
          

Supported API: true
 String getJavascript()
          

Supported API: true
 FormResultAction getNextAction()
          

Supported API: true
 FormProcessingStatus getStatus()
          

Supported API: true
 String getURL()
          

Supported API: true
 void mergeResults(FormResult sourceResult)
          Adds the messages and exceptions from a source FormResult to this FormResult.
 void setJavascript(String javascriptString)
          

Supported API: true
 void setNextAction(FormResultAction action)
          

Supported API: true
 void setStatus(FormProcessingStatus status)
          

Supported API: true
 void setURL(String urlString)
          

Supported API: true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setStatus

public void setStatus(FormProcessingStatus status)


Supported API: true


getStatus

public FormProcessingStatus getStatus()


Supported API: true


setNextAction

public void setNextAction(FormResultAction action)


Supported API: true


getNextAction

public FormResultAction getNextAction()


Supported API: true


setURL

public void setURL(String urlString)


Supported API: true


getURL

public String getURL()


Supported API: true


setJavascript

public void setJavascript(String javascriptString)


Supported API: true


getJavascript

public String getJavascript()


Supported API: true


addFeedbackMessage

public void addFeedbackMessage(FeedbackMessage mess)


Supported API: true


getFeedbackMessages

public List<FeedbackMessage> getFeedbackMessages()


Supported API: true


addException

public void addException(Throwable t)


Supported API: true


getExceptions

public List<Throwable> getExceptions()


Supported API: true


mergeResults

public void mergeResults(FormResult sourceResult)
Adds the messages and exceptions from a source FormResult to this FormResult. The source FormResult will typically be that returned by a processing subtask or phase and this FormResult will be a cumulative result for multiple tasks or phases.

If the status of the sourceResult is of higher error severity than the status of this FormResult, also sets the status of this result will be set to that of the sourceResult, as shown below.

Status of this result on entry Status of sourceResult on entry Status of this result on exit
FAILURE any FAILURE
NON_FATAL_ERROR FAILURE FAILURE
NON_FATAL_ERROR NON_FATAL_ERROR, SUCCESS NON_FATAL_ERROR
SUCCESS FAILURE FAILURE
SUCCESS NON_FATAL_ERROR NON_FATAL_ERROR
SUCCESS SUCCESS SUCCESS


Supported API: true