com.ptc.core.meta.type.runtime.server.impl
Class AbstractModelBasedConstraintFactory

java.lang.Object
  extended by com.ptc.core.meta.type.runtime.server.impl.AbstractModelBasedConstraintFactory
All Implemented Interfaces:
OperationIdentifierConstants, ConstraintClassNameConstants, com.ptc.core.meta.container.common.ConstraintFactory, NetFactor
Direct Known Subclasses:
DataFormatConstraintFactory, FolderConstraintFactory, IdentifiedConstraintFactory, LifeCycleTemplateConstraintFactory, MBAConstraintFactory, OrgIdConstraintFactory, ProjectConstraintFactory, QuantityConstraintFactory, TeamTemplateConstraintFactory, ViewConstraintFactory

public abstract class AbstractModelBasedConstraintFactory
extends Object
implements com.ptc.core.meta.container.common.ConstraintFactory, OperationIdentifierConstants, ConstraintClassNameConstants, NetFactor

Abstract class providing methods useful to constraint factories adding constraints for modeled attributes.

Supported API: true

Extendable: true


Field Summary
 
Fields inherited from interface com.ptc.core.meta.common.OperationIdentifierConstants
CHANGE_CLASSIFICATION, CHANGE_FOLDER, CHANGE_IDENTIFIER, CHANGE_LIFE_CYCLE, CHANGE_LIFE_CYCLE_STATE, CHANGE_PROJECT, CHANGE_VIEW, COPY, CREATE, DELETE, REVISE, SEARCH, UPDATE, VIEW
 
Fields inherited from interface com.ptc.core.meta.container.common.ConstraintClassNameConstants
CONSTRAINT_MUTABILITY_RULE, CONTAINER_CONSTRAINT_BINDING_RULE, DISCRETE_SET_CONSTRAINT, FIXED_VALUE_CONSTRAINT, HIDDEN_CONSTRAINT, HIERARCHICAL_CONSTRAINT_BINDING_RULE, IMMUTABLE_CONSTRAINT, PART_NUMBER_SERVER_ASSIGNED_CONSTRAINT, QUANTITY_CONSTRAINT_BINDING_RULE, RANGE_CONSTRAINT, SERVER_ASSIGNED_CONSTRAINT, SIGNIFICANT_FIGURES_ANALOG_SET_CONSTRAINT, SINGLE_ATTRIBUTE_CONSTRAINT_BINDING_RULE, SINGLE_VALUED_CONSTRAINT, STRING_FORMAT_CONSTRAINT, STRING_LENGTH_CONSTRAINT, SUGGESTED_VALUES_CONSTRAINT, UNIQUE_AMONG_SIBLINGS_CONSTRAINT, UPPER_CASE_CONSTRAINT, VALUE_HIDDEN_CONSTRAINT, WILDCARD_CONSTRAINT
 
Method Summary
 void constrain(AttributeContainer[] the_attribute_containers, AttributeTypeIdentifier[] the_filter, OperationIdentifier the_operation_identifier)
          Iterates calling constrain(AttributeContainer, AttributeTypeIdentifier[], OperationIdentifier) for each AttributeContainer in the passed in AttributeContainer array.
 com.ptc.core.meta.common.ConstraintIdentifier getConstraintIdentifier(String binding_rule_classname, String enforcement_rule_classname, AttributeTypeIdentifier ati)
          Encapsulates the construction of a ConstraintIdentifier.
 PropertyDescriptor getPropertyDescriptor(AttributeTypeIdentifier ati)
          Given an AttributeTypeIdentifier for a modeled attribute returns the PropertyDescriptor for the primitive value.
protected  boolean isConstraintFactorySpecificAttribute(String[] logical_forms, AttributeTypeIdentifier ati)
          Returns true if the passed in AttributeTypeIdentifier's name is equivalent to any of the passed in attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getConstraintIdentifier

public com.ptc.core.meta.common.ConstraintIdentifier getConstraintIdentifier(String binding_rule_classname,
                                                                             String enforcement_rule_classname,
                                                                             AttributeTypeIdentifier ati)
Encapsulates the construction of a ConstraintIdentifier. Uses the SYSTEM="com.ptc.windchill" application for the constraint construction.

Supported API: true

Parameters:
binding_rule_classname - A binding rule String value from com.ptc.core.meta.container.common.ConstraintClassNameConstants.
enforcement_rule_classname - An enforcement rule String value from com.ptc.core.meta.container.common.ConstraintClassNameConstants.
ati -
Returns:
ConstraintIdentifier

getPropertyDescriptor

public PropertyDescriptor getPropertyDescriptor(AttributeTypeIdentifier ati)
Given an AttributeTypeIdentifier for a modeled attribute returns the PropertyDescriptor for the primitive value.

Supported API: true

Parameters:
ati -
Returns:
PropertyDescriptor

constrain

public void constrain(AttributeContainer[] the_attribute_containers,
                      AttributeTypeIdentifier[] the_filter,
                      OperationIdentifier the_operation_identifier)
Iterates calling constrain(AttributeContainer, AttributeTypeIdentifier[], OperationIdentifier) for each AttributeContainer in the passed in AttributeContainer array.

Supported API: true

Parameters:
the_attribute_containers -
the_filter -
the_operation_identifier -

isConstraintFactorySpecificAttribute

protected boolean isConstraintFactorySpecificAttribute(String[] logical_forms,
                                                       AttributeTypeIdentifier ati)
Returns true if the passed in AttributeTypeIdentifier's name is equivalent to any of the passed in attributes. Used by attribute specific constraint factories.

Supported API: true

Parameters:
logical_forms -
ati -
Returns:
boolean