cancel
Showing results for 
Search instead for 
Did you mean: 

Is Revert Possible in versioning?

archana_bonkanp
Champ in-the-making
Champ in-the-making
Hi ,

Im using alfresco 2.1,is reverting possible in versioning?

As we are using alfresco in our organization,so many people raised a question regarding this.
4 REPLIES 4

xerox
Champ in-the-making
Champ in-the-making
Yes, it is possible.

You should check the version service.
There's a method revert.

You could use this method.

archana_bonkanp
Champ in-the-making
Champ in-the-making
Can you explain it clearly
we would be very thankfull to you

xerox
Champ in-the-making
Champ in-the-making
a short example:

VersionHistory history = this.versionService.getVersionHistory(getDocument().getNodeRef());
Version version = history.getVersion(label);

NodeRef nodeRef = this.getDocument().getNodeRef();
this.versionService.revert(nodeRef,version,false);

marcostopper
Champ in-the-making
Champ in-the-making
Sorry, I'd want to make a question.

I saw you have used the method: ".getVersionHistory()" to get the versions.

Can you explain me how I've to set the Reference and the Store before to call this method?
I need to know the versions information about a document in the repository. I know the documents uuid and I'd want to know the documents versions.

Please help me!
Thanks!