wt.epm.util
Class EPMConstraintValidator

java.lang.Object
  extended bywt.epm.util.EPMConstraintValidator
All Implemented Interfaces:
ConstraintValidator, Serializable

public class EPMConstraintValidator
extends Object
implements ConstraintValidator, Serializable

See Also:
Serialized Form

Field Summary
private  Hashtable bindingRuleCache
           
private static String CLASSNAME
           
static boolean DEBUG
           
private  Hashtable enforcementRuleCache
           
private static DebugWriter LOG
           
private static String RESOURCE
           
private static EPMConstraintValidator singleton
           
 
Constructor Summary
private EPMConstraintValidator()
           
 
Method Summary
private  ConstraintBindingRule getBindingRule(String className)
           
private  ConstraintEnforcementRule getEnforcementRule(String className)
           
static EPMConstraintValidator getInstance()
           
private  ConstraintException[] internalIsValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content)
           
private  ConstraintException[] internalIsValueRequiredValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container)
           
 void isAddValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content)
          Based on the constraints in the_constraint_container, determines if the attribute_identifier and the attribute_identifier's content can be added to the_attribute_container.
 void isRemoveValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content)
          Based on the constraints in the_constraint_container, determines if the attribute_identifier and the attribute_identifier's content can be removed from the_attribute_container.
 void isUpdateValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content)
          Based on the constraints in the_constraint_container, determines if the attribute_identifier and the attribute_identifier's content can be updated in the_attribute_container.
 void isValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container)
          Based on the constraints in the_constraint_container, determines if all the attributes and their content is considered valid in the_attribute_container.
 void isValid(AttributeContainer the_attribute_container, ConstraintContainer the_constraint_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content)
          Based on the constraints in the_constraint_container, determines if the attribute_identifier, and it's content is considered valid in the_attribute_container.
 void modify(Constrainable the_constrainable, AttributeContainer the_attribute_container, AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer constraint_container)
          Adds all the constraints in the constraint_container, for the given attribute_type_identifier, to the Constrainable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

singleton

private static EPMConstraintValidator singleton

bindingRuleCache

private Hashtable bindingRuleCache

enforcementRuleCache

private Hashtable enforcementRuleCache

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

EPMConstraintValidator

private EPMConstraintValidator()
Method Detail

getInstance

public static EPMConstraintValidator getInstance()

isAddValid

public void isAddValid(AttributeContainer the_attribute_container,
                       ConstraintContainer the_constraint_container,
                       AttributeIdentifier the_attribute_identifier,
                       Object the_attribute_content)
                throws ConstraintException
Based on the constraints in the_constraint_container, determines if the attribute_identifier and the attribute_identifier's content can be added to the_attribute_container.

Supported API: false

Specified by:
isAddValid in interface ConstraintValidator
Parameters:
the_attribute_container -
the_constraint_container -
the_attribute_identifier -
the_attribute_content -
Throws:
ConstraintException

isUpdateValid

public void isUpdateValid(AttributeContainer the_attribute_container,
                          ConstraintContainer the_constraint_container,
                          AttributeIdentifier the_attribute_identifier,
                          Object the_attribute_content)
                   throws ConstraintException
Based on the constraints in the_constraint_container, determines if the attribute_identifier and the attribute_identifier's content can be updated in the_attribute_container.

Supported API: false

Specified by:
isUpdateValid in interface ConstraintValidator
Parameters:
the_attribute_container -
the_constraint_container -
the_attribute_identifier -
the_attribute_content -
Throws:
ConstraintException

isRemoveValid

public void isRemoveValid(AttributeContainer the_attribute_container,
                          ConstraintContainer the_constraint_container,
                          AttributeIdentifier the_attribute_identifier,
                          Object the_attribute_content)
                   throws ConstraintException
Based on the constraints in the_constraint_container, determines if the attribute_identifier and the attribute_identifier's content can be removed from the_attribute_container.

Supported API: false

Specified by:
isRemoveValid in interface ConstraintValidator
Parameters:
the_attribute_container -
the_constraint_container -
the_attribute_identifier -
the_attribute_content -
Throws:
ConstraintException

isValid

public void isValid(AttributeContainer the_attribute_container,
                    ConstraintContainer the_constraint_container,
                    AttributeIdentifier the_attribute_identifier,
                    Object the_attribute_content)
             throws ConstraintException
Based on the constraints in the_constraint_container, determines if the attribute_identifier, and it's content is considered valid in the_attribute_container.

Supported API: false

Specified by:
isValid in interface ConstraintValidator
Parameters:
the_attribute_container -
the_constraint_container -
the_attribute_identifier -
the_attribute_content -
Throws:
ConstraintException

isValid

public void isValid(AttributeContainer the_attribute_container,
                    ConstraintContainer the_constraint_container)
             throws ConstraintException
Based on the constraints in the_constraint_container, determines if all the attributes and their content is considered valid in the_attribute_container.

Supported API: false

Specified by:
isValid in interface ConstraintValidator
Parameters:
the_attribute_container -
the_constraint_container -
Throws:
ConstraintException

modify

public void modify(Constrainable the_constrainable,
                   AttributeContainer the_attribute_container,
                   AssociationIdentifier the_association_identifier,
                   AttributeTypeIdentifier the_attribute_type_identifier,
                   ConstraintContainer constraint_container)
Adds all the constraints in the constraint_container, for the given attribute_type_identifier, to the Constrainable.

Supported API: false

Specified by:
modify in interface ConstraintValidator
Parameters:
the_constrainable -
the_attribute_container -
the_association_identifier -
the_attribute_type_identifier -
constraint_container -

getBindingRule

private ConstraintBindingRule getBindingRule(String className)

getEnforcementRule

private ConstraintEnforcementRule getEnforcementRule(String className)

internalIsValid

private ConstraintException[] internalIsValid(AttributeContainer the_attribute_container,
                                              ConstraintContainer the_constraint_container,
                                              AttributeIdentifier the_attribute_identifier,
                                              Object the_attribute_content)

internalIsValueRequiredValid

private ConstraintException[] internalIsValueRequiredValid(AttributeContainer the_attribute_container,
                                                           ConstraintContainer the_constraint_container)
                                                    throws ConstraintException
Throws:
ConstraintException