cancel
Showing results for 
Search instead for 
Did you mean: 

Working with Versions

fedeparma
Champ in-the-making
Champ in-the-making
Hi I'm am new Java Developer with Alfresco.

Can I have examples for working with the version of documents?

Checkout and retrieve of document

Checkin and upload the metadata of a document

Thank you.
2 REPLIES 2

sdavis139
Champ in-the-making
Champ in-the-making
Not sure exactly what you're looking for, but have you seen this?

http://wiki.alfresco.com/wiki/Introducing_the_Alfresco_Java_Content_Repository_API

fedeparma
Champ in-the-making
Champ in-the-making
I want examples to checkout, checkin files with WS.

This is my code

                        RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();           ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();           AuthoringServiceSoapBindingStub authoringService = WebServiceFactory.getAuthoringService();                      //reference al nodo           Node nodo = this.getNode(documentID);           Reference contentReference = nodo.getReference();              Predicate itemsToCheckOut = new Predicate(new Reference[]{contentReference}, null, null);           CheckoutResult checkOutResult = authoringService.checkout(itemsToCheckOut, null);                      // Get a reference to the working copy           Reference workingCopyReference = checkOutResult.getWorkingCopies()[0];                      Content[] readResult = contentService.read(                 itemsToCheckOut, Constants.PROP_CONTENT);                       Content content = readResult[0];           is  = ContentUtils.getContentAsInputStream(content);                      return is;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍