OFBiz 中定义的数据资源实体在哪里?
Where is DataResource Entity defined in OFBiz?
正在研究OFBiz框架,有一个疑问
我找到了创建数据资源的服务。
(applications/content/src/main/java/org/apache/ofbiz/content/data/DataServices.java)
但我找不到定义数据资源实体的位置。
通常实体在 entitydef 目录下的 entitymodel.xml 文件中定义。
但是,内容应用程序没有 entitymodel.xml 文件。
只有 eecas.xml 文件。
directory tree
<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 中找到它 查找:
<实体实体名称="DataResource"
正在研究OFBiz框架,有一个疑问
我找到了创建数据资源的服务。 (applications/content/src/main/java/org/apache/ofbiz/content/data/DataServices.java)
但我找不到定义数据资源实体的位置。 通常实体在 entitydef 目录下的 entitymodel.xml 文件中定义。 但是,内容应用程序没有 entitymodel.xml 文件。 只有 eecas.xml 文件。
directory tree
<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 中找到它 查找:
<实体实体名称="DataResource"