在ATG中,如何禁止创建超类型的Repository Item,同时允许在BCC中创建每个子类型?

问题描述:

比方说,我有一个内容存储库与一个项目描述符,说TypeA。在ATG中,如何禁止创建超类型的Repository Item,同时允许在BCC中创建每个子类型?

它有两种亚型而TYPEx的键入y

在BCC,我希望作者能够创建类型而TYPEx和键入y的内容,而不是类型A。

+0

这是基本的存储库继承,但我不记得了 – Vihung

事实证明,你可以同时做到这一点 - 只要我能在RTFM时看到树木。

https://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGRepositoryGuide/html/s0611itemdescriptorinheritance01.html

替换 “衣” 与类型A, “衬衫” 用而TYPEx和 “短裤” 与键入y

<!-- The "clothing" item type, a base type --> 
<item-descriptor name="clothing" sub-type-property="type"> 

    <!-- This is the primary table that holds clothing data --> 
    <table name="clothing" type="primary" id-column-names="id"> 
    <property name="type" data-type="enumerated"> 
     <option value="shirt"/> 
     <option value="shorts"/> 
    </property> 
    <property name="name"/> 
    <property name="description"/> 
    <property name="color"/> 
    <property name="size"/> 
    <property name="shippingWeight"/> 
    </table> 
</item-descriptor> 

<!-- The "shirt" item type is a subclass of "clothing" --> 
<item-descriptor name="shirt" super-type="clothing" sub-type-value="shirt"> 
    <table name="shirt" type="auxiliary" id-column-names="id"> 
    <property name="season"/> 
    </table> 
</item-descriptor> 

<!-- The "shorts" item type, now a subclass of "clothing" --> 
<item-descriptor name="shorts" super-type="clothing" sub-type-value="shorts"> 
    <table name="shorts" type="auxiliary" id-column-names="id"> 
    <property name="pleated" data-type="boolean"/> 
    </table> 
</item-descriptor> 

,如果你类型A被实例化的,则

<!-- The "clothing" item type, a base type --> 
<item-descriptor name="clothing" sub-type-property="type" 
           sub-type-value="clothing"> 
    <!-- This is the primary table that holds clothing data --> 
    <table name="clothing" type="primary" id-column-names="id"> 
    <property name="type" data-type="enumerated"> 
     <option value="clothing"/> 
     <option value="shirt"/> 
     <option value="shorts"/> 
    <property/> 
    ...