Package com.aquima.interactions.portal
Class PortalResponse
java.lang.Object
com.aquima.interactions.portal.PortalResponse
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionstatic 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
ConstructorsConstructorDescriptionPortalResponse
(int type) Constructs a portal response for the specified type and page. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
isReload()
This method returns true when the current page was substantially changed which requires a reload of the model by the client.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.
-
Field Details
-
UPDATE
public static final int UPDATEResponse type to indicate an update response.- See Also:
-
RELOAD
public static final int RELOADResponse type to indicate a reload response.- See Also:
-
FLOW
public static final int FLOWResponse type to indicate a new-page response.- See Also:
-
END
public static final int ENDResponse 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.
-