com.ptc.core.ui.validation
Class UIValidationResultSet

java.lang.Object
  extended by 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:
Serialized Form

Method Summary
 String getCumulativeFeedbackText()
          Creates a single String of all the feedback message text for the results in a result set
static UIValidationResultSet newInstance()
          Craetes an (empty) instance of a UIValidationResultSet
static UIValidationResultSet newInstance(UIValidationResult result)
          Creates an instance of a UIValidationResultSet with the result argument as its only element
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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

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