Class UIValidationResultSet

java.lang.Object
com.ptc.core.ui.validation.UIValidationResultSet
All Implemented Interfaces:
Serializable

public class UIValidationResultSet extends Object implements 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
See Also:
  • Method Details

    • newInstance

      public static UIValidationResultSet newInstance()
      Craetes an (empty) instance of a UIValidationResultSet
      Returns:
      an (empty) instance of a UIValidationResultSet

      Supported API: true
    • newInstance

      public static UIValidationResultSet newInstance(UIValidationResult result)
      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

      public void addResult(UIValidationResult result)
      Adds the result to the result set. Supported API: true
      Parameters:
      result - Result to be added
    • getResultsByStatus

      public List<UIValidationResult> getResultsByStatus(UIValidationStatus status)
      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

      public UIValidationFeedbackMsg 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

      public String 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