Ir al contenido
Otras versiones

Cargando…

Document version numeration configuration

Esta página aún no está disponible en tu idioma.

We support different numeration schemas. By default OpenKM uses com.openkm.vernum.MajorMinorVersionNumerationAdapter which is similar to Jackrabbit implementation.

Field / Property Type Description
version.numeration.adapter String Numeration schema.
Available schemas :
- com.openkm.vernum.PlainVersionNumerationAdapter
- com.openkm.vernum.PlainZeroVersionNumerationAdapter
- com.openkm.vernum.MajorMinorVersionNumerationAdapter
- com.openkm.vernum.BranchVersionNumerationAdapter
com.openkm.vernum.MajorMinorVersionNumerationAdapter
version.numeration.format String Numeration number format. Used in PlainVersionNumerationAdapter.
%d

Some Numeration Adapters like PlainVersionNumerationAdapter may have additional configuration parameters like version.numeration.format which is used to define the numeration number format. By default this is “%d” but you can change to “%02d” to create versions like “01”, “02”, etc.

Numeration adapter First version Next versions
com.openkm.vernum.PlainVersionNumerationAdapter 1 2, 3, 4, etc.
com.openkm.vernum.PlainZeroVersionNumerationAdapter 0 1, 2, 3, etc.
com.openkm.vernum.MajorMinorVersionNumerationAdapter 1.0 1.1, 1.2, 1.3, etc.
com.openkm.vernum.BranchVersionNumerationAdapter 1 2, 3, 2.1, 2.2, etc.

You can change the default Numeration Adapter using the “version.numeration.adapter” configuration parameter. You need to restart OpenKM every time you change this parameter. Also note that if already there are documents in the repository, changing the Numeration Adapter may cause problems when they are not compatible between them.

If you change the version numeration adapter you also need to update the existing numeration, for example the migration from PlainVersionNumerationAdapter to MajorMinorVersionNumerationAdapter.

-- HQL queriesUPDATE NodeDocumentVersion ndv SET ndv.name = '01' WHERE ndv.name='1.0';
UPDATE NodeDocumentVersion ndv SET ndv.name = '02' WHERE ndv.name='1.1';
UPDATE NodeDocumentVersion ndv SET ndv.name = '03' WHERE ndv.name='1.2';