Package com.ptc.core.ui.validation
Class UIValidationResultSet
java.lang.Object
com.ptc.core.ui.validation.UIValidationResultSet
- All Implemented Interfaces:
Serializable
A UIValidationResultSet object contains one or more UIValidationResult objects. It organizes these UIValidationResult
objects by validaiton key, status, and target object. This allows the user to retrieve lists (java.util.List objects)
of results based on those criteria.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddResult(UIValidationResult result) Adds the result to the result set.Creates a single String of all the feedback message text for the results in a result setgetResultsByStatus(UIValidationStatus status) Get the results that are associated for a given status.static UIValidationResultSetCraetes an (empty) instance of a UIValidationResultSetstatic UIValidationResultSetnewInstance(UIValidationResult result) Creates an instance of a UIValidationResultSet with the result argument as its only elementThis method can be used to consolodate the content of a UIValidationResultSet returned by a call to validateSelectedMultiSelectAction.
It will concatenate all of the messages into a single string, and will use the following rules to determine the message type to return:
- if all of the reuslts have a DENIED status, message type will be FAILURE
- otherwise, if all of the results have a PERMITTED status, message type will be SUCCESS
- otherwise, message type will be CONFIRMATION
-
Method Details
-
newInstance
Craetes an (empty) instance of a UIValidationResultSet- Returns:
- an (empty) instance of a UIValidationResultSet
Supported API: true
-
newInstance
Creates an instance of a UIValidationResultSet with the result argument as its only element- Parameters:
result- an element to add to the UIValidationResultSet- Returns:
- a new UIValidationResultSet with the result argument as its only element
Supported API: true
-
addResult
Adds the result to the result set. Supported API: true- Parameters:
result- Result to be added
-
getResultsByStatus
Get the results that are associated for a given status. Note: This api returns empty list if there are no results associated with the status that was passed-in
Supported API: true- Parameters:
status-- Returns:
- List of UIValidationResult
-
toFeedbackMessage
This method can be used to consolodate the content of a UIValidationResultSet returned by a call to validateSelectedMultiSelectAction.
It will concatenate all of the messages into a single string, and will use the following rules to determine the message type to return:
- if all of the reuslts have a DENIED status, message type will be FAILURE
- otherwise, if all of the results have a PERMITTED status, message type will be SUCCESS
- otherwise, message type will be CONFIRMATION- Returns:
- a UIValidationFeedbackMsg whose messageType will be determined by the rules
described above, and whose message text will be a culmination of all feedback messages
in the UIValidationResultSet
Supported API: true
-
getCumulativeFeedbackText
Creates a single String of all the feedback message text for the results in a result set- Returns:
- empty string ("") if there are no feedback messages
Supported API: true
-