com.orchestranetworks.schema
Interface ConstraintContext

All Superinterfaces:
SchemaNodeContext

public interface ConstraintContext
extends SchemaNodeContext

Provides methods for setting up a constraint in the context of its schema.

Dependencies and Validation

This context provides methods for declaring contraint's dependencies. Constraint's dependencies are used for optimizing incremental validation, that is, the impact of a persistent update on the validation result. Three modes are available:

  1. Local dependency: In this mode, the validation result of the current constraint depends only on the local value of the underlying node. Except the change of this local value, the validation result will not be affected by any external events. This mode is enabled by the call to method setDependencyToLocalNode().
  2. Explicit dependencies: In this mode, the validation result of the current constraint depends only on updates of the nodes that have been explicitly specified. Except those updates and the change of the local value, the validation result will not be affected by any external events. This mode is enabled by the call to method addValueDependencyToNode(SchemaNode).
  3. Unknown dependencies (default): In this mode, the validation result of the current constraint depends on unknown sources or events (for example). This is the default mode, enabled if neither of the above methods have been called.

IMPORTANT NOTES:

See Also:
Constraint

Method Summary
 void addDependency(AdaptationName aName, Path aPath)
          Deprecated.  
 void addDependency(Path aPath)
          Deprecated.  
 void addValueDependencyToNode(SchemaNode referredNode)
          Specifies that the validation result of the current constraint depends on the value of the node specified.
 void setDependencyToLocalNode()
          Specifies that the validation result of the current constraint depends only on the local value of the underlying node.
 
Methods inherited from interface com.orchestranetworks.schema.SchemaNodeContext
addError, addError, addInfo, addMessage, addWarning, getSchemaNode
 

Method Detail

addDependency

public void addDependency(Path aPath)
                   throws PathAccessException
Deprecated.  

Throws:
PathAccessException

addDependency

public void addDependency(AdaptationName aName,
                          Path aPath)
Deprecated.  


addValueDependencyToNode

public void addValueDependencyToNode(SchemaNode referredNode)
Specifies that the validation result of the current constraint depends on the value of the node specified.

In the context of incremental validation, this means that this constraint is subject to revalidation each time the referredNode value is modified.

Warning: A call to this method implies that all dependencies are explicitly declared (explicit dependencies mode). For more information, see Dependencies and Validation section.

Throws:
IllegalStateException - if a local dependency has been set to this constraint.
IllegalArgumentException - if referredNode is not a terminal node or under a terminal node.

setDependencyToLocalNode

public void setDependencyToLocalNode()
Specifies that the validation result of the current constraint depends only on the local value of the underlying node. Except the change of this local value, the validation result will not be affected by any external events.

For more information, see Dependencies and Validation section.

Throws:
IllegalStateException - if a value dependency has been added to this constraint


(report a bug)
EBX.Platform 4.5.0 [0598]
Copyright Orchestra Networks 2000-2008. All rights reserved.