com.ptc.core.meta.container.common
Class AbstractValidator

java.lang.Object
  extended by com.ptc.core.meta.container.common.AbstractValidator
All Implemented Interfaces:
ActionValidator
Direct Known Subclasses:
AttributeContainerSetValidator, ConstraintsValidator, IsCheckedInValidator, IsCheckedOutPrincipalValidator, IsCheckedOutProjectValidator, IsCheckedOutValidator, IsInPersonalCabinetValidator, IsLatestIterationValidator, IsLockedByValidator, IsLockedValidator, IsOneOffVersionValidator, IsOwnedByValidator, IsOwnedValidator, IsReviseAllowedValidator, IsShortcutValidator, IsWorkingCopyPrincipalValidator, IsWorkingCopyValidator, MultiSelectValidator, SingleSelectValidator

public abstract class AbstractValidator
extends Object
implements ActionValidator

Provides default functionality for Validators

Supported API: true

Extendable: true


Method Summary
 AttributeContainerSpec getFilter(AttributeContainerSpec the_filter, String logical_id, TypeIdentifier type_identifier)
          Will add the filter this validator needs to the supplied parameter and return that parameter.
abstract  AttributeContainerSpec getFilter(AttributeContainerSpec the_filter, TypeIdentifier type_identifier)
          This API is implemented by the concrete validators.
 boolean isValid(AttributeContainer attribute_container)
          Returns false only if the validator check specifically fails.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilter

public abstract AttributeContainerSpec getFilter(AttributeContainerSpec the_filter,
                                                 TypeIdentifier type_identifier)
This API is implemented by the concrete validators.

Supported API: true

Specified by:
getFilter in interface ActionValidator
Parameters:
the_filter -
type_identifier - Used to get the DefinitionIdentifier for constructing the AttributeTypeIdentifier
Returns:
AttributeContainerSpec

getFilter

public AttributeContainerSpec getFilter(AttributeContainerSpec the_filter,
                                        String logical_id,
                                        TypeIdentifier type_identifier)
Will add the filter this validator needs to the supplied parameter and return that parameter. This API is used by the AbstractValidator

Supported API: true

Specified by:
getFilter in interface ActionValidator
Parameters:
the_filter -
logical_id -
type_identifier - Used to get the DefinitionIdentifier for constructing the AttributeTypeIdentifier
Returns:
AttributeContainerSpec

isValid

public boolean isValid(AttributeContainer attribute_container)
                throws com.ptc.core.meta.container.common.InvalidFunctionArgumentException
Returns false only if the validator check specifically fails. Even if there is an error message caused by some exception, it will return true. Calls calculate which is implemented by concrete validators.

Supported API: true

Specified by:
isValid in interface ActionValidator
Parameters:
attribute_container -
Returns:
boolean
Throws:
com.ptc.core.meta.container.common.InvalidFunctionArgumentException