Hi,
The above post already gives you the steps, please give more
details about what's not working for you?
Here's a simple example to use a generic generator
(UIDGenerator1 is not generic and should be removed imho)
that is already implemented in nuxeo, and used to fill the
dublincore field "format" on the existing document type
"Note":
<extension target
="org.nuxeo.ecm.platform.uidgen.service.UIDGeneratorService"
point="generators">
<generator name="my_generator"
class="org.nuxeo.ecm.platform.uidgen.generators.UIDGCoreDocument">
<propertyName>dc:format</propertyName>
<docType>Note</docType>
</generator>
</extension>
This will fill automatically this property at creation of a
note, with something like "Note201100001", and incrementing
it automatically ("Note201100002", "Note201100003"...). If
you'd like to generate another identifier, you'll have to
implement a custom generator as explained above.
Of course, as this is generated automatically and supposed
to be unique, layouts displayed on edit page should be
modified so that this value cannot be modified by users.
To answer the question about DB indexes: some indexes are
automatically setup by Nuxeo, but schema fields are not as
there is currently no way to define what fields should be
indexed. So these custom indexes should be setup "by hand"
in the DB.
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/