Class PortalResponse

java.lang.Object
com.aquima.interactions.portal.PortalResponse
All Implemented Interfaces:
Serializable

public class PortalResponse extends Object implements Serializable
The portal response object holds the result of a flow action. The result of a flow action consists of:
  • Page definition
    The result page of the flow action. Depending on the type of the response, this page might be the same page as the page that triggered the event.
  • Response type
    The type of the response indicating if a new page generated, or if the existing page was reloaded or refreshed.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Response type to indicate the end of the flow was reached without a result page.
    static final int
    Response type to indicate a new-page response.
    static final int
    Response type to indicate a reload response.
    static final int
    Response type to indicate an update response.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PortalResponse(int type)
    Constructs a portal response for the specified type and page.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This method returns true when the event resulted in the flow to complete.
    boolean
    This method returns true when the event resulted in a different page.
    boolean
    This method returns true when the current page was substantially changed which requires a reload of the model by the client.
    boolean
    This method return true when the current page model has not changed, but only simple updates have been performed to the current page.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UPDATE

      public static final int UPDATE
      Response type to indicate an update response.
      See Also:
    • RELOAD

      public static final int RELOAD
      Response type to indicate a reload response.
      See Also:
    • FLOW

      public static final int FLOW
      Response type to indicate a new-page response.
      See Also:
    • END

      public static final int END
      Response type to indicate the end of the flow was reached without a result page.
      See Also:
  • Constructor Details

    • PortalResponse

      public PortalResponse(int type)
      Constructs a portal response for the specified type and page.
      Parameters:
      type - The response type.
  • Method Details

    • isUpdate

      public boolean isUpdate()
      This method return true when the current page model has not changed, but only simple updates have been performed to the current page.
      Returns:
      true when this response contains an update for the last page shown.
    • isReload

      public boolean isReload()
      This method returns true when the current page was substantially changed which requires a reload of the model by the client.
      Returns:
      true when this response contains a new version of the last page shown.
    • isDifferentPage

      public boolean isDifferentPage()
      This method returns true when the event resulted in a different page. The current page model will have been replaced with the new page model, so the client will need to redisplay the model.
      Returns:
      true when this response contains a new page different.
    • isComplete

      public boolean isComplete()
      This method returns true when the event resulted in the flow to complete. The current page model will have been discarded, and a new flow should be started.
      Returns:
      true when this response indicates the flow has completed.