com.ptc.core.foundation.ownership.common
Class IsOwnedByValidator

java.lang.Object
  extended by com.ptc.core.meta.container.common.AbstractValidator
      extended by com.ptc.core.foundation.ownership.common.IsOwnedByValidator
All Implemented Interfaces:
ActionValidator

public final class IsOwnedByValidator
extends AbstractValidator

Determines if the supplied TypeInstance is owned by a specific principal. Traps all exceptions, returns false.

Supported API: true

Extendable: false


Method Summary
protected  Object calculate(AttributeContainer the_attribute_container)
          Examines the AttributeContainer for an AttributeTypeIdentifier whose logical identifier owner.id context (a TypeInstanceIdentifier) is the same TypeInstanceIdentifier as the SCA|currentPrincipal (the current user).
 AttributeContainerSpec getFilter(AttributeContainerSpec the_filter, TypeIdentifier type_identifier)
          Will add the filter this validator needs to the supplied parameter and return that parameter.
 
Methods inherited from class com.ptc.core.meta.container.common.AbstractValidator
getFilter, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFilter

public AttributeContainerSpec getFilter(AttributeContainerSpec the_filter,
                                        TypeIdentifier type_identifier)
Will add the filter this validator needs to the supplied parameter and return that parameter. TypeIdentifier can be null, will create a TypeIdentifier for Ownable

Supported API: true

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

calculate

protected Object calculate(AttributeContainer the_attribute_container)
                    throws com.ptc.core.meta.container.common.InvalidFunctionArgumentException
Examines the AttributeContainer for an AttributeTypeIdentifier whose logical identifier owner.id context (a TypeInstanceIdentifier) is the same TypeInstanceIdentifier as the SCA|currentPrincipal (the current user). Returns true if the TypeInstanceIdentifiers are the same, else false. Default return value is true for any exceptions/errors.

Supported API: true

Parameters:
the_attribute_container -
Returns:
Object
Throws:
com.ptc.core.meta.container.common.InvalidFunctionArgumentException