0

I'm trying to create a new document type, I found this incredible tutorial Tuto

I did all the steps, I deployed the bundle, copied the jar into the custom template folder and activate custom template.

But when I start Nuxeo server nothing changed I can't see the new document type.

Here's my code:

Manifest.MF

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

upcoming.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>

schema-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>

deployment-fragment.xml

<?xml version="1.0"?>
<fragment>
  <extension target="application#MODULE">
    <module>
      <java>${bundle.fileName}</java>
    </module>
  </extension>
</fragment>
GSDa
  • 193
  • 2
  • 4
  • 21

1 Answers1

0

What is your Nuxeo version?

The tutorial you read is really old and maybe deprecated. The extension points may have evolved since it has been written. The two following documentations should be more up-to-date: NXDOC/Documents+Display+Configuration NXDOC/How+to+configure+document+types%2C+actions+and+automation+chains

You can discover the extension points reading the automatically generated documentation at http://explorer.nuxeo.org/ , see for instance org.nuxeo.ecm.core.schema.TypeService.

Is your bundle properly read and started by Nuxeo? You should find it in the Admin Center, as well as in the server startup logs. Did you check you had no error in the logs?

Rather than manually editing XML files, you could use Nuxeo Studio to generate the bundle. See NXDOC/How+to+Define+a+Document+Type. You will still be able to compare the generated contribution with your current one.

You could also use the Nuxeo IDE plugin for Eclipse.

Julien Carsique
  • 3,915
  • 3
  • 22
  • 28
  • 1
    I'm using the last release 7.2, Why I chose Nuxeo at the first place was because I read that's open source (I'm looking for 100% open source ECM solutions) and it has an active community. But I'm really struggling with the lack of documentation for beginner developers. – GSDa May 26 '15 at 09:46