我正在研究 OFBiz 框架,我有一个问题。
我找到了一个创建数据资源的服务。(应用程序/内容/src/main/java/org/apache/ofbiz/内容/数据/DataServices.java)
但是我找不到定义数据资源实体的位置。通常,实体是在entitydef目录下的entitymodel. xml文件中定义的。但是,内容应用程序没有entitymodel.xml文件。只有eecas.xml文件。
目录树
<entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
<!-- If the text in the database has changed for the data resource, we need to clear out anything depending on this cached value -->
<eca entity="ElectronicText" operation="store-remove" event="return">
<action service="clearAssociatedRenderCache" mode="sync" />
</eca>
<!-- Content Keyword Indexing ECAs -->
<eca entity="Content" operation="create" event="return">
<action service="indexContentKeywords" mode="sync" value-attr="contentInstance"/>
</eca>
<eca entity="Content" operation="store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="ContentAttribute" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="ContentMetaData" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="ContentRole" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="ProductContent" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="ProductCategoryContent" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="PartyContent" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="WebSiteContent" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
<eca entity="WorkEffortContent" operation="create-store" event="return">
<action service="indexContentKeywords" mode="sync"/>
</eca>
而这个 eecas.xml 文件似乎与数据资源无关。它是一个明确存在的实体,但它到底在哪里定义?如果您能给我答案,我将不胜感激。
您可以在 https://github.com/apache/ofbiz-framework/blob/trunk/applications/datamodel/entitydef/content-entitymodel.xml 查找中找到它: