com.novell.zos.constraint
Interface Constraint

All Superinterfaces:
Serializable
All Known Subinterfaces:
AndConstraint, BetweenConstraint, BinaryConstraint, ContainerConstraint, ContainsConstraint, DefinedConstraint, EqConstraint, GeConstraint, GtConstraint, IfConstraint, LeConstraint, LtConstraint, NeConstraint, NotConstraint, OperatorConstraint, OrConstraint, TypedConstraint, UndefinedConstraint

public interface Constraint
extends Serializable

Basic Constraint interface which allows traversal and evaluation of a constraint tree.


Field Summary
static String TYPE_ACCEPT
           
static String TYPE_ALLOCATION
           
static String TYPE_CONTINUE
           
static String TYPE_DEFAULT
           
static String TYPE_PROVISION
           
static String TYPE_REPOSITORY
           
static String TYPE_RESOURCE
           
static String TYPE_START
           
static String TYPE_VMHOST
           
static String[] TYPES
           
 
Method Summary
 String getReason()
          Retrieve reason string that contains human readable explanation that can be displayed as an error when a constraint evaluates to false.
 void setReason(String reason)
          Sets the reason string that contains human readable explanation that can be displayed as an error when a constraint evaluates to false.
 String toString()
          Form complete formatted XML (policy syntax) document.
 String toXmlDocument(int indent)
          Form complete formatted XML (policy syntax) document with requested indent.
 void validate()
          Validate this constraint for completeness.
 

Field Detail

TYPE_ACCEPT

static final String TYPE_ACCEPT
See Also:
Constant Field Values

TYPE_START

static final String TYPE_START
See Also:
Constant Field Values

TYPE_CONTINUE

static final String TYPE_CONTINUE
See Also:
Constant Field Values

TYPE_PROVISION

static final String TYPE_PROVISION
See Also:
Constant Field Values

TYPE_ALLOCATION

static final String TYPE_ALLOCATION
See Also:
Constant Field Values

TYPE_RESOURCE

static final String TYPE_RESOURCE
See Also:
Constant Field Values

TYPE_VMHOST

static final String TYPE_VMHOST
See Also:
Constant Field Values

TYPE_REPOSITORY

static final String TYPE_REPOSITORY
See Also:
Constant Field Values

TYPE_DEFAULT

static final String TYPE_DEFAULT
See Also:
Constant Field Values

TYPES

static final String[] TYPES
Method Detail

getReason

String getReason()
Retrieve reason string that contains human readable explanation that can be displayed as an error when a constraint evaluates to false.

Returns:
string containing reason to display

setReason

void setReason(String reason)
Sets the reason string that contains human readable explanation that can be displayed as an error when a constraint evaluates to false.

Parameters:
reason - containing reason to display

validate

void validate()
              throws ConstraintException
Validate this constraint for completeness. Exception is thrown if any required attributes are missing.

Throws:
ConstraintException - if constraint is not complete

toString

String toString()
Form complete formatted XML (policy syntax) document.

Overrides:
toString in class Object
Returns:
xml document

toXmlDocument

String toXmlDocument(int indent)
Form complete formatted XML (policy syntax) document with requested indent.

Parameters:
indent - the indent to use for generated XML document.
Returns:
xml document


Copyright 2008 Novell, Inc. All Rights Reserved.