org.openbp.guiclient.objectvalidators
Class NodeSocketValidator

java.lang.Object
  extended by org.openbp.guiclient.objectvalidators.ValidatorBase
      extended by org.openbp.guiclient.objectvalidators.DescriptionObjectValidator
          extended by org.openbp.guiclient.objectvalidators.DisplayObjectValidator
              extended by org.openbp.guiclient.objectvalidators.ModelObjectValidator
                  extended by org.openbp.guiclient.objectvalidators.NodeSocketValidator
All Implemented Interfaces:
PropertyValidator, ObjectValidator

public class NodeSocketValidator
extends ModelObjectValidator

Object validator for the NodeSocket class. If the 'default socket' flag has been set for the given node socket, the validator will clear the flag from the other sockets of the node the socket belongs to that have the same type (entry/exit) as the given socket. This ensures that there is always only one default entry or exit socket.

Author:
Heiko Erhardt

Constructor Summary
NodeSocketValidator()
           
 
Method Summary
 boolean validateObject(java.lang.Object editedObject, PropertyBrowser pb)
          Validates the entire object before it will be saved.
 
Methods inherited from class org.openbp.guiclient.objectvalidators.ModelObjectValidator
checkNameUniqueness
 
Methods inherited from class org.openbp.guiclient.objectvalidators.DisplayObjectValidator
validateProperty
 
Methods inherited from class org.openbp.guiclient.objectvalidators.ValidatorBase
displayErrorMsg, displayMsgContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeSocketValidator

public NodeSocketValidator()
Method Detail

validateObject

public boolean validateObject(java.lang.Object editedObject,
                              PropertyBrowser pb)
Validates the entire object before it will be saved.

Specified by:
validateObject in interface ObjectValidator
Overrides:
validateObject in class ModelObjectValidator
Parameters:
editedObject - Edited object that contains the property
pb - Property browser that edits the object
Returns:
true The object value is valid and can be saved.
false The object value is invalid. In this case, the save operation should be aborted and the focus should not be set outside the property browser.


Copyright © 2011. All Rights Reserved.