com.novell.zos.constraint
Interface BinaryConstraint

All Superinterfaces:
Constraint, Serializable
All Known Subinterfaces:
ContainsConstraint, EqConstraint, GeConstraint, GtConstraint, LeConstraint, LtConstraint, NeConstraint

public interface BinaryConstraint
extends Constraint, Serializable

Binary Operator Constraints that have both a left and right side.


Field Summary
static int MATCH_MODE_EXACT
          Exactly match left and right sides of operation
static int MATCH_MODE_GLOB
          If possible perform glob style matching by treating the right side of the operation as a glob expression.
static int MATCH_MODE_REGEXP
          If possible perform regular expresion matching by treating the right side of the operation as a regular expression.
 
Fields inherited from interface com.novell.zos.constraint.Constraint
TYPE_ACCEPT, TYPE_ALLOCATION, TYPE_CONTINUE, TYPE_DEFAULT, TYPE_PROVISION, TYPE_REPOSITORY, TYPE_RESOURCE, TYPE_START, TYPE_VMHOST, TYPES
 
Method Summary
 String getFactName()
          Retrieve the fact name of the left side of the operation.
 String getFactValue()
          Retrieve the fact name whose value is used right side of the operation if set with setFactValue() otherwise this will return null.
 int getMatchMode()
          Retrieve the match mode for this binary constraint operation.
 Object getValue()
          Retrieve the value of the right side of the operation if set as a value or the value of the fact is specified with setFactValue().
 void setFactName(String factname)
          Sets the fact name for the left side of the operation.
 void setFactValue(String factName)
          Sets the fact name whose value is used in the right side of the operation and in doing so negates any previous setValue() call.
 void setMatchMode(int matchMode)
          Sets the match mode used by some individual binary operator constraints.
 void setValue(Object value)
          Sets the value of the right side of the operation and in doing so negates any previous setFactValue() call.
 
Methods inherited from interface com.novell.zos.constraint.Constraint
getReason, setReason, toString, toXmlDocument, validate
 

Field Detail

MATCH_MODE_EXACT

static final int MATCH_MODE_EXACT
Exactly match left and right sides of operation

See Also:
Constant Field Values

MATCH_MODE_REGEXP

static final int MATCH_MODE_REGEXP
If possible perform regular expresion matching by treating the right side of the operation as a regular expression.
This is only considered for String arguments.

See Also:
Constant Field Values

MATCH_MODE_GLOB

static final int MATCH_MODE_GLOB
If possible perform glob style matching by treating the right side of the operation as a glob expression.
This is only considered for String arguments.

See Also:
Constant Field Values
Method Detail

getFactName

String getFactName()
Retrieve the fact name of the left side of the operation.

Returns:
the fact name

setFactName

void setFactName(String factname)
Sets the fact name for the left side of the operation.

Parameters:
factname - the fact name

getValue

Object getValue()
Retrieve the value of the right side of the operation if set as a value or the value of the fact is specified with setFactValue().

Returns:
the right side value of the operation

setValue

void setValue(Object value)
Sets the value of the right side of the operation and in doing so negates any previous setFactValue() call.

Parameters:
value - the right side value of the operation

getFactValue

String getFactValue()
Retrieve the fact name whose value is used right side of the operation if set with setFactValue() otherwise this will return null.

Returns:
the name of the fact

setFactValue

void setFactValue(String factName)
Sets the fact name whose value is used in the right side of the operation and in doing so negates any previous setValue() call.

Parameters:
factName - the fact name

setMatchMode

void setMatchMode(int matchMode)
                  throws ConstraintException
Sets the match mode used by some individual binary operator constraints. The match mode only has effect if the operator supports the specified type and the type of the left and right side of the operation are compatible with the mode otherwise the default of MATCH_MODE_EXACT is assumed.

Parameters:
matchMode - the (advisory) match mode
Throws:
FactException - if value does not confirm to the specified match mode. E.g. a regular express cannot be compiled.
ConstraintException

getMatchMode

int getMatchMode()
Retrieve the match mode for this binary constraint operation.

Returns:
the match mode


Copyright 2008 Novell, Inc. All Rights Reserved.