Foros de discusión
Document versioning
Salvador Baena, modificado hace 11 años.
Document versioning
New Member Mensajes: 8 Fecha de incorporación: 13/06/12 Mensajes recientes
Hello,
Working with the Documents and Media portlet we ended up having this doubt regarding the versioning of a document. We would like to know what it is to be done in order to move the version of a document from 1.x to 2.y. We have read so far that this happens when, while editing a document, it is indicated somewhere that this version is a major version, however, in our case, there is no such option and hence everytime changes are applied to a document the number of the version increases reaching even the 1.32 version.
I do not know if the above mentioned description was expressed clearly enough, but we would appreciate if anyone could bring some light to the topic.
Regards!!
Working with the Documents and Media portlet we ended up having this doubt regarding the versioning of a document. We would like to know what it is to be done in order to move the version of a document from 1.x to 2.y. We have read so far that this happens when, while editing a document, it is indicated somewhere that this version is a major version, however, in our case, there is no such option and hence everytime changes are applied to a document the number of the version increases reaching even the 1.32 version.
I do not know if the above mentioned description was expressed clearly enough, but we would appreciate if anyone could bring some light to the topic.
Regards!!
Hitoshi Ozawa, modificado hace 11 años.
RE: Document versioning
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
It used to be that users were able to set version number. However in recent releases, liferay automatically increase version number.
Salvador Baena, modificado hace 11 años.
RE: Document versioning
New Member Mensajes: 8 Fecha de incorporación: 13/06/12 Mensajes recientes
Hello Hitoshi,
Yes, the version number is increased but we want to know how this increment works, based on what minor/major changes and more important how it is produced the change from a version 1.3 for example to a 2.0, that is what we were not able to find out yet.
Yes, the version number is increased but we want to know how this increment works, based on what minor/major changes and more important how it is produced the change from a version 1.3 for example to a 2.0, that is what we were not able to find out yet.
Pavel Savinov, modificado hace 11 años.
RE: Document versioning
Junior Member Mensajes: 94 Fecha de incorporación: 24/09/12 Mensajes recientes
To understand it you can take a look at the EditFileEntryAction class of DL portlet, updateFileEntry method:
that means that you can pass boolean parameter, named majorVersion with value true to get a new major version. Otherwise(and by default) this parameter is absent. All you need is hook
/* ... in updateFileEntry() ... */
boolean majorVersion = ParamUtil.getBoolean(
uploadPortletRequest, "majorVersion");
that means that you can pass boolean parameter, named majorVersion with value true to get a new major version. Otherwise(and by default) this parameter is absent. All you need is hook