我正在尝试创建一个新的文档类型,我发现了这个令人难以置信的教程Tuto
我完成了所有步骤,部署了包,将 jar 复制到自定义模板文件夹并激活自定义模板。
但是当我启动 Nuxeo 服务器时,没有任何改变,我看不到新的文档类型。
这是我的代码:
清单文件
Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: lesson-bundle
Bundle-SymbolicName: org.nuxeo.book.upcoming;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: Nuxeo
Nuxeo-Require: org.nuxeo.ecm.core,
org.nuxeo.ecm.core.schema
Nuxeo-Component: OSGI-INF/schema-contrib.xml,
OSGI-INF/doctype-contrib.xml,
OSGI-INF/ui-contrib.xml
即将到来的.xsd
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://nuxeo.org/schemas/upcoming/"
xmlns:up="http://nuxeo.org/schemas/upcoming/">
<xs:element name="occursOn" type="xs:dateTime" />
<xs:element name="presenter" type="xs:string" />
</xs:schema>
doctype-contrib.xml
<?xml version="1.0"?>
<component name="org.nuxeo.book.upcoming.doctype">
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
<doctype name="Upcoming" extends="Document">
<schema name="common" />
<schema name="dublincore" />
<schema name="upcoming" />
<schema name="file" />
<schema name="uid" />
<facet name="Commentable" />
<facet name="Versionable" />
<facet name="Indexable" />
</doctype>
</extension>
</component>
架构-contrib.xml
<?xml version="1.0"?>
<component name="org.nuxeo.book.upcoming.schema">
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
<schema name="upcoming" src="schemas/upcoming.xsd" prefix="up" />
</extension>
</component>
ui-contrib.xml
<?xml version="1.0"?>
<component name="org.nuxeo.book.upcoming.ui">
<extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
<type id="Upcoming">
<label>Upcoming Event</label>
<default-view>view_documents</default-view>
<layouts mode="any">
<layout>heading</layout>
<layout>file</layout>
</layouts>
</type>
<type id="Workspace">
<subtypes>
<type>Upcoming</type>
</subtypes>
</type>
</extension>
</component>
部署片段.xml
<?xml version="1.0"?>
<fragment>
<extension target="application#MODULE">
<module>
<java>${bundle.fileName}</java>
</module>
</extension>
</fragment>