com.ptc.windchill.counterpart.metadata.attribute
Class cBasicIBADefinition

java.lang.Object
  extended bycom.ptc.windchill.counterpart.metadata.cEntry
      extended bycom.ptc.windchill.counterpart.metadata.cPrivateClassificationEntry
          extended bycom.ptc.windchill.counterpart.metadata.cPubMappedEntry
              extended bycom.ptc.windchill.counterpart.metadata.attribute.cAbstractAttributeDefinition
                  extended bycom.ptc.windchill.counterpart.metadata.attribute.cBasicIBADefinition
All Implemented Interfaces:
nitidus.sil.be.core.iConflict, nitidus.sil.be.core.iEntryIO, nitidus.sil.be.clf.iPartPropertyIO, nitidus.sil.be.clf.iPrivateClassificationEntryIO, nitidus.sil.be.clf.iPropertyConstants, nitidus.sil.be.clf.iPubMappedEntryIO, nitidus.sil.be.core.iRecordIO, nitidus.sil.be.clf.iReferenceTypeIO, nitidus.sil.be.core.iRevisionControlledEntryIO, nitidus.sil.be.core.iVetoableEntryIO
Direct Known Subclasses:
cReferenceIBADefinition, cUnitIBADefinition

public class cBasicIBADefinition
extends cAbstractAttributeDefinition


Nested Class Summary
private static class cBasicIBADefinition.cPlainColumn
          Column or "level" definition.
 
Field Summary
private static String CLASSNAME
           
private static boolean DEBUG
           
private  String fAlias
           
protected  AttributeDefDefaultView fAttributeDefinition
           
private  nitidus.sil.be.clf.iColumnIO[] fColumns
           
private  cOPMBaseWithLogicalID fOPMBase
           
private  AttributeOrgDefaultView fTempFolder
           
private  int fType
           
private  int fUpgradeDirection
           
private static DebugWriter LOG
           
 
Fields inherited from class com.ptc.windchill.counterpart.metadata.attribute.cAbstractAttributeDefinition
 
Fields inherited from class com.ptc.windchill.counterpart.metadata.cPubMappedEntry
 
Fields inherited from class com.ptc.windchill.counterpart.metadata.cPrivateClassificationEntry
 
Fields inherited from class com.ptc.windchill.counterpart.metadata.cEntry
 
Fields inherited from interface nitidus.sil.be.clf.iPropertyConstants
kMaxLevel, kMaxType, kMinLevel, kMinType, levelMax, levelMin, levelNom, levelNtolAbs, levelNtolPer, levelPattern, levelPlain, levelPtolAbs, levelPtolPer, levelTolAbs, levelTolPer, levelTyp, typeAttachmentReference, typeBoolean, typeInteger, typeReal, typeRecordReference, typeString, typeTimestamp, typeURL, typeVirtual, upgradeDown, upgradeNone, upgradeUp
 
Fields inherited from interface nitidus.sil.be.core.iConflict
ctBadName, ctChild, ctDupName, ctMaxBasicAtt, ctMaxBasicClf, ctMaxBasicData, ctMaxBasicGeneral, ctMaxBasicUnit, ctMaxCfnRelatedData, ctMaxPartsLink621Clf, ctMaxPartsLinkClf, ctMaxSpecialAtt, ctMaxSpecialClf, ctMaxSpecialData, ctMaxSpecialGeneral, ctMaxSpecialUnit, ctMaxUnusedAtt, ctMaxWindchillClf, ctMaxWindchillFatalClf, ctMaxWindchillNonFatalClf, ctMaxWindchillUnit, ctMinBasicAtt, ctMinBasicClf, ctMinBasicData, ctMinBasicGeneral, ctMinBasicUnit, ctMinCfnRelatedData, ctMinPartsLink621Clf, ctMinPartsLinkClf, ctMinSpecialAtt, ctMinSpecialClf, ctMinSpecialData, ctMinSpecialGeneral, ctMinSpecialUnit, ctMinUnusedAtt, ctMinWindchillClf, ctMinWindchillFatalClf, ctMinWindchillNonFatalClf, ctMinWindchillUnit, ctNone, kBasic, kBasicAndAllWindchill, kBasicAndFatalWindchill, kBasicAndPartsLink, kBasicAndPartsLinkIncluding621, kFull, kMaxIgnorableConflict, kUnused
 
Constructor Summary
cBasicIBADefinition(AttributeDefDefaultView attr)
          public constructor
 
Method Summary
 boolean canDelete()
           
 boolean canUpdate(nitidus.sil.be.clf.iPartProperty cpPartProperty)
           
static AttributeDefDefaultView create(nitidus.sil.be.clf.iPartProperty cpPartProperty, cAttributeOrganizer folder)
           
 CSMSingleDefConstraintDefaultView createAllowedValuesConstraint(List allowedVals)
          Creates new allowed values constraint Applicable only for: Float, String, Integer
 CSMSingleDefConstraintDefaultView createImmutableConstraint()
           
 CSMSingleDefConstraintDefaultView createRangeConstraint(double rangeLo, double rangeHi)
           
 CSMSingleDefConstraintDefaultView createSingleValueConstraint()
           
 CSMSingleDefConstraintDefaultView createValueRequiredConstraint()
           
 AbstractValueView[] createValues(nitidus.sil.be.clf.iOverridablePropertyMetadata opm)
          creates the array of AbstractValueView objects
protected  AbstractValueView createValueView(String strval)
           
 void delete()
           
 void enrich(nitidus.sil.be.clf.iPartPropertyIO cpPartPropertyIO)
           
 void enrichNewBoolean()
           
(package private) static AttributeDefDefaultView fillDefaultView(AttributeDefDefaultView attrDefView, nitidus.sil.be.clf.iPartProperty cpPartProperty, cAttributeOrganizer folder)
           
 String getAlias()
           
protected  AttributeDefDefaultView getAttributeDefinition()
           
 nitidus.sil.be.clf.iColumnIO[] getColumns()
           
static int getCounterPartTypeFromJavaClass(AttributeDefDefaultView attr)
           
 String getDataUnitsName()
           
 String getDataUnitsRef()
           
 nitidus.sil.be.clf.iOPMBaseIO getOPMBase()
           
 ObjectIdentifier getParentObjectID()
          Used by cWTMetadata when constructing lists of folder-children
 String getQuantityOfMeasureRef()
           
 nitidus.sil.be.core.iLocalizedStringIO[] getRefBackwardVerb()
           
 String getRefClassRef()
           
 String getRefPropertyRef()
           
 int getType()
           
 int getUpgradeDirection()
           
private static String getWindchillAttrName(nitidus.sil.be.clf.iPartProperty cpPartProperty)
          Create "name", i.e.
(package private)  boolean hasSameTypeAs(nitidus.sil.be.clf.iPartProperty cpProperty)
           
 boolean identicalTo(nitidus.sil.be.clf.iPartProperty cpProperty, cAttributeOrganizer folder)
           
private  boolean isChildOf(cAttributeOrganizer parent)
           
 boolean isWindchillIBA()
           
 void preUpdate(nitidus.sil.be.clf.iPartProperty cpPartProperty, cAttributeOrganizer folder)
           
private  AttributeDefDefaultView refreshAttributeDefinition()
           
 void update(nitidus.sil.be.clf.iPartProperty cpPartProperty, cAttributeOrganizer folder)
           
 void updateID()
           
 
Methods inherited from class com.ptc.windchill.counterpart.metadata.attribute.cAbstractAttributeDefinition
getVirtualLinkRef, getVirtualSourceRef, isCatalogHelper, isCatalogIndexed, isVirtualDirectionIn
 
Methods inherited from class com.ptc.windchill.counterpart.metadata.cPubMappedEntry
enrich, getCustomDUNS, getName, getPreferredName, getPublicID, getShortDefinition
 
Methods inherited from class com.ptc.windchill.counterpart.metadata.cPrivateClassificationEntry
compareByNameTo, enrich, getAppSpecific, getChangeDescription, getCurrentMajorRevision, getCurrentMinorRevision, getDescription, getLocalizedNames, getLockedBy, getRevisions, isApproved, isCurrentRevision, isDescriptionEqualTo, setAppSpecific
 
Methods inherited from class com.ptc.windchill.counterpart.metadata.cEntry
acknowledgeChange, compareByIDTo, enrich, getConflict, getID, isDeleted, isInConflict, isInUse, isModified, isNew, isObsolete, isReadOnly, needsIDUpdate, setConflict, setID, setInUse, setObsolete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nitidus.sil.be.clf.iPubMappedEntryIO
getCustomDUNS, getPreferredName, getPublicID, getShortDefinition
 
Methods inherited from interface nitidus.sil.be.clf.iPrivateClassificationEntryIO
getAppSpecific, getDescription, getLocalizedNames
 
Methods inherited from interface nitidus.sil.be.core.iVetoableEntryIO
isApproved, isCurrentRevision
 
Methods inherited from interface nitidus.sil.be.core.iRevisionControlledEntryIO
getChangeDescription, getCurrentMajorRevision, getCurrentMinorRevision, getLockedBy, getRevisions
 
Methods inherited from interface nitidus.sil.be.core.iEntryIO
getID
 
Methods inherited from interface nitidus.sil.be.core.iRecordIO
isDeleted, isModified, isNew, isReadOnly
 

Field Detail

fAttributeDefinition

protected AttributeDefDefaultView fAttributeDefinition

fTempFolder

private AttributeOrgDefaultView fTempFolder

fType

private int fType

fAlias

private String fAlias

fOPMBase

private cOPMBaseWithLogicalID fOPMBase

fColumns

private nitidus.sil.be.clf.iColumnIO[] fColumns

fUpgradeDirection

private int fUpgradeDirection

CLASSNAME

private static final String CLASSNAME

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

cBasicIBADefinition

public cBasicIBADefinition(AttributeDefDefaultView attr)
                    throws WTException,
                           WTPropertyVetoException
public constructor

Parameters:
attr - of type AttributeDefinition
Throws:
WTException
WTPropertyVetoException
Method Detail

getAlias

public String getAlias()
See Also:
iPartPropertyIO

getDataUnitsName

public String getDataUnitsName()
Specified by:
getDataUnitsName in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
getDataUnitsName in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

getDataUnitsRef

public String getDataUnitsRef()
Specified by:
getDataUnitsRef in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
getDataUnitsRef in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

getQuantityOfMeasureRef

public String getQuantityOfMeasureRef()
Specified by:
getQuantityOfMeasureRef in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
getQuantityOfMeasureRef in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

getColumns

public nitidus.sil.be.clf.iColumnIO[] getColumns()
Specified by:
getColumns in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
getColumns in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

getType

public int getType()
Specified by:
getType in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
getType in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

getUpgradeDirection

public int getUpgradeDirection()
Specified by:
getUpgradeDirection in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
getUpgradeDirection in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

isWindchillIBA

public boolean isWindchillIBA()
Specified by:
isWindchillIBA in interface nitidus.sil.be.clf.iPartPropertyIO
Specified by:
isWindchillIBA in class cAbstractAttributeDefinition
See Also:
iPartPropertyIO

getOPMBase

public nitidus.sil.be.clf.iOPMBaseIO getOPMBase()
See Also:
iPartPropertyIO

getRefClassRef

public String getRefClassRef()
Specified by:
getRefClassRef in interface nitidus.sil.be.clf.iReferenceTypeIO
Specified by:
getRefClassRef in class cAbstractAttributeDefinition
See Also:
iReferenceTypeIO

getRefPropertyRef

public String getRefPropertyRef()
Specified by:
getRefPropertyRef in interface nitidus.sil.be.clf.iReferenceTypeIO
Specified by:
getRefPropertyRef in class cAbstractAttributeDefinition
See Also:
iReferenceTypeIO

getRefBackwardVerb

public nitidus.sil.be.core.iLocalizedStringIO[] getRefBackwardVerb()
Specified by:
getRefBackwardVerb in interface nitidus.sil.be.clf.iReferenceTypeIO
Specified by:
getRefBackwardVerb in class cAbstractAttributeDefinition
See Also:
iReferenceTypeIO

getParentObjectID

public final ObjectIdentifier getParentObjectID()
Used by cWTMetadata when constructing lists of folder-children


getCounterPartTypeFromJavaClass

public static final int getCounterPartTypeFromJavaClass(AttributeDefDefaultView attr)

enrich

public void enrich(nitidus.sil.be.clf.iPartPropertyIO cpPartPropertyIO)
Overrides:
enrich in class cAbstractAttributeDefinition

enrichNewBoolean

public final void enrichNewBoolean()

canDelete

public boolean canDelete()

getAttributeDefinition

protected final AttributeDefDefaultView getAttributeDefinition()

refreshAttributeDefinition

private final AttributeDefDefaultView refreshAttributeDefinition()
                                                          throws WTException
Throws:
WTException

updateID

public final void updateID()
                    throws WTException,
                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

delete

public void delete()
            throws WTException
Throws:
WTException

create

public static AttributeDefDefaultView create(nitidus.sil.be.clf.iPartProperty cpPartProperty,
                                             cAttributeOrganizer folder)
                                      throws WTException,
                                             WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

fillDefaultView

static AttributeDefDefaultView fillDefaultView(AttributeDefDefaultView attrDefView,
                                               nitidus.sil.be.clf.iPartProperty cpPartProperty,
                                               cAttributeOrganizer folder)
                                        throws WTPropertyVetoException
Throws:
WTPropertyVetoException

canUpdate

public boolean canUpdate(nitidus.sil.be.clf.iPartProperty cpPartProperty)

preUpdate

public void preUpdate(nitidus.sil.be.clf.iPartProperty cpPartProperty,
                      cAttributeOrganizer folder)
               throws WTException,
                      WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

update

public void update(nitidus.sil.be.clf.iPartProperty cpPartProperty,
                   cAttributeOrganizer folder)
            throws WTException,
                   WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getWindchillAttrName

private static final String getWindchillAttrName(nitidus.sil.be.clf.iPartProperty cpPartProperty)
Create "name", i.e. id, for Windchill attribute from CP attribute fields.


identicalTo

public boolean identicalTo(nitidus.sil.be.clf.iPartProperty cpProperty,
                           cAttributeOrganizer folder)
Parameters:
cpProperty -
Returns:

isChildOf

private boolean isChildOf(cAttributeOrganizer parent)

hasSameTypeAs

boolean hasSameTypeAs(nitidus.sil.be.clf.iPartProperty cpProperty)

createValues

public AbstractValueView[] createValues(nitidus.sil.be.clf.iOverridablePropertyMetadata opm)
                                 throws WTException,
                                        WTPropertyVetoException
creates the array of AbstractValueView objects

Returns:
array of type AbstractValueView[]
Throws:
WTException
WTPropertyVetoException

createValueView

protected AbstractValueView createValueView(String strval)
                                     throws WTException,
                                            WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

createSingleValueConstraint

public CSMSingleDefConstraintDefaultView createSingleValueConstraint()
                                                              throws WTException
Throws:
WTException

createValueRequiredConstraint

public CSMSingleDefConstraintDefaultView createValueRequiredConstraint()
                                                                throws WTException
Throws:
WTException

createImmutableConstraint

public CSMSingleDefConstraintDefaultView createImmutableConstraint()
                                                            throws WTException
Throws:
WTException

createRangeConstraint

public CSMSingleDefConstraintDefaultView createRangeConstraint(double rangeLo,
                                                               double rangeHi)
                                                        throws WTException
Throws:
WTException

createAllowedValuesConstraint

public CSMSingleDefConstraintDefaultView createAllowedValuesConstraint(List allowedVals)
                                                                throws WTException
Creates new allowed values constraint Applicable only for: Float, String, Integer

Parameters:
allowedVals -
Returns:
new allowed values constraint. Could be null if list is empty
Throws:
WTException