com.ptc.windchill.enterprise.part.common
Class FixedValueConstraint

java.lang.Object
  extended bycom.ptc.windchill.enterprise.part.common.FixedValueConstraint
All Implemented Interfaces:
ConstraintContentRule, ConstraintEnforcementRule

public class FixedValueConstraint
extends Object
implements ConstraintContentRule



Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private static IdentifierFactory identifierFactory
           
private static String LOGICAL_QUANTITY_AMOUNT
           
private static String LOGICAL_QUANTITY_UNIT
           
private static AttributeTypeIdentifier QUANTITY_AMOUNT_ATI
           
private static AttributeTypeIdentifier QUANTITY_UNIT_ATI
           
private static String RESOURCE
           
 
Constructor Summary
FixedValueConstraint()
           
 
Method Summary
private  boolean checkQuantity(AttributeContainer the_attribute_container, AttributeIdentifier the_ai, Object the_attribute_content)
           
 boolean isAddValid(AttributeContainer the_attribute_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content, Serializable the_enforcement_rule_data)
          Returns true if the_constraint allows the attribute and it's content to be added to the Attribute Container, otherwise, it returns false.
 boolean isDataTypeCompatable(String class_name)
          

Supported API: false
 boolean isRemoveValid(AttributeContainer the_attribute_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content, Serializable the_enforcement_rule_data)
          eturns true if the_constraint allows the attribute and it's content to be removed from the Attribute Container, otherwise, it returns false.
 boolean isUpdateValid(AttributeContainer the_attribute_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content, Serializable the_enforcement_rule_data)
          eturns true if the_constraint allows the attribute and it's content to be updated in the Attribute Container, otherwise, it returns false.
 boolean isValid(AttributeContainer the_attribute_container, AttributeIdentifier the_attribute_identifier, Object the_attribute_content, Serializable the_enforcement_rule_data)
          Returns true if the Attribute and its content do not vialate the contraint, otherwise it returns false.
 void modify(Constrainable the_constrainable, AttributeContainer the_attribute_container, AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, Serializable the_enforcement_rule_data)
          Adds an appropriate constraint to Constraintable.
 
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

LOGICAL_QUANTITY_AMOUNT

private static final String LOGICAL_QUANTITY_AMOUNT
See Also:
Constant Field Values

LOGICAL_QUANTITY_UNIT

private static final String LOGICAL_QUANTITY_UNIT
See Also:
Constant Field Values

QUANTITY_AMOUNT_ATI

private static AttributeTypeIdentifier QUANTITY_AMOUNT_ATI

QUANTITY_UNIT_ATI

private static AttributeTypeIdentifier QUANTITY_UNIT_ATI

identifierFactory

private static IdentifierFactory identifierFactory
Constructor Detail

FixedValueConstraint

public FixedValueConstraint()
Method Detail

isDataTypeCompatable

public boolean isDataTypeCompatable(String class_name)


Supported API: false

Specified by:
isDataTypeCompatable in interface ConstraintContentRule
Parameters:
class_name -
Returns:
boolean

isAddValid

public boolean isAddValid(AttributeContainer the_attribute_container,
                          AttributeIdentifier the_attribute_identifier,
                          Object the_attribute_content,
                          Serializable the_enforcement_rule_data)
Returns true if the_constraint allows the attribute and it's content to be added to the Attribute Container, otherwise, it returns false.

Supported API: false

Specified by:
isAddValid in interface ConstraintEnforcementRule
Parameters:
the_attribute_container -
the_attribute_identifier -
the_attribute_content -
the_enforcement_rule_data -
Returns:
boolean

isUpdateValid

public boolean isUpdateValid(AttributeContainer the_attribute_container,
                             AttributeIdentifier the_attribute_identifier,
                             Object the_attribute_content,
                             Serializable the_enforcement_rule_data)
eturns true if the_constraint allows the attribute and it's content to be updated in the Attribute Container, otherwise, it returns false.

Supported API: false

Specified by:
isUpdateValid in interface ConstraintEnforcementRule
Parameters:
the_attribute_container -
the_attribute_identifier -
the_attribute_content -
the_enforcement_rule_data -
Returns:
boolean

isRemoveValid

public boolean isRemoveValid(AttributeContainer the_attribute_container,
                             AttributeIdentifier the_attribute_identifier,
                             Object the_attribute_content,
                             Serializable the_enforcement_rule_data)
eturns true if the_constraint allows the attribute and it's content to be removed from the Attribute Container, otherwise, it returns false.

Supported API: false

Specified by:
isRemoveValid in interface ConstraintEnforcementRule
Parameters:
the_attribute_container -
the_attribute_identifier -
the_attribute_content -
the_enforcement_rule_data -
Returns:
boolean

isValid

public boolean isValid(AttributeContainer the_attribute_container,
                       AttributeIdentifier the_attribute_identifier,
                       Object the_attribute_content,
                       Serializable the_enforcement_rule_data)
Returns true if the Attribute and its content do not vialate the contraint, otherwise it returns false.

Supported API: false

Specified by:
isValid in interface ConstraintEnforcementRule
Parameters:
the_attribute_container -
the_attribute_identifier -
the_attribute_content -
the_enforcement_rule_data -
Returns:
boolean

modify

public void modify(Constrainable the_constrainable,
                   AttributeContainer the_attribute_container,
                   AssociationIdentifier the_association_identifier,
                   AttributeTypeIdentifier the_attribute_type_identifier,
                   Serializable the_enforcement_rule_data)
Adds an appropriate constraint to Constraintable.

Supported API: false

Specified by:
modify in interface ConstraintEnforcementRule
Parameters:
the_constrainable -
the_attribute_container -
the_association_identifier -
the_attribute_type_identifier -
the_enforcement_rule_data -

checkQuantity

private boolean checkQuantity(AttributeContainer the_attribute_container,
                              AttributeIdentifier the_ai,
                              Object the_attribute_content)