How to create custom property without Studio
We are trying to create a custom document type with additional custom properties, without the use of Studio. We are trying to add properties such as EmailAddress and PhoneNumber to the standard File properties.
Based on the information available, we have created the contrib.xml, schema.xsd and manifest.mf files - attached.
We believe that all we need to do at this point is place these files in the correct location on the nuxeo server in order to create the new document type. However, we are not sure where to put them.
Can anyone help us with the following: 1.) Where do we put these files? 2.) Is there any additional configuration required to bring this new document type into Nuxeo so it is available via the REST API, etc.
We are using the Nuxeo VM image from their website with the following software platform: Debian Linux Tomcat Mongodb Nuxeo 10.10
Thanks and looking forward to your inputs!
At first you have to make your mycupcaketypes-contrib.xml valid XML file. There should be:
</extension> <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
instead of this line:
</extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
File mycupcaketypes-contrib.xml should be in OSGI-INF folder, mycupcakeschema.xsd in schemas folder and MANIFEST.MF in META-INF folder - but it seems that you already have it like this.
Then pack the whole structure with all those files and copy the result JAR file into nxserver/bundles folder in your Nuxeo installation. Restart Nuxeo server and new document type should be there. You can watch the Nuxeo console and if there is any problem with your extension the error message will appear there.
There is nothing special to do to have a new document type available via the REST API. It will be available automatically.