com.ibm.carma.ui.events
Interface IActionValidator


public interface IActionValidator

Interface for action validators. Clients should implement this interface and include the name of their class in an action validator contributed to the action validators extension point "com.ibm.carma.ui.actionValidators". For example, the markup in the contributing plugin.xml might contain:

 <extension point="com.ibm.carma.ui.actionValidators">
   <actionValidator
     actionId="042"
     ramId="42"
     class="com.example.MyActionValidator"/>
 </extension>
 

Since:
8.0

Method Summary
 boolean isParameterRequired(com.ibm.carma.model.Action action, com.ibm.carma.model.Parameter parameter)
          If this method returns true, the CARMA user interface displays an asterisk next to the control associated with the given parameter.
 ValidationResult validateAction(ActionValidationEvent event)
          This method is invoked when the action dialog needs to determine whether the user has input appropriate parameters for the action to continue.
 

Method Detail

validateAction

ValidationResult validateAction(ActionValidationEvent event)
This method is invoked when the action dialog needs to determine whether the user has input appropriate parameters for the action to continue. It should be used to validate the relationships between the parameters.

Parameters:
event - An event containing information about the input operation.
Returns:
A validation result including a message to display to the user, or null to clear the message.

isParameterRequired

boolean isParameterRequired(com.ibm.carma.model.Action action,
                            com.ibm.carma.model.Parameter parameter)
If this method returns true, the CARMA user interface displays an asterisk next to the control associated with the given parameter.

Parameters:
action - the action
parameter - the parameter
Returns:
whether CARMA user interface should display an asterisk next to the control associated with the parameter