jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Trivial Update of "ExamplesPage" by CarlYamamotoFurst
Date Fri, 12 Aug 2011 18:22:49 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The "ExamplesPage" page has been changed by CarlYamamotoFurst:
http://wiki.apache.org/jackrabbit/ExamplesPage?action=diff&rev1=40&rev2=41

  }}}
  == Versioning Basics ==
  {{{
+     /***
+     * most of the code below is deprecated as of jcr-2.0
+     * please see the javax.jcr.version.VersionManager javadocs - 
+     *
+     * http://www.day.com/maven/jsr170/javadocs/jcr-2.0/index.html
+     */
+ 
      public void versioningBasics (Node parentNode, Session session) throws RepositoryException
      {
            //create versionable node
@@ -146, +153 @@

  
            //add new version
            Node child = parentNode.getNode("childNode");
-           child.checkout();
+           child.checkout(); 
            child.setProperty("anyProperty", "Blah2");
            session.save();
-           child.checkin();
+           child.checkin(); 
  
            //print version history
            VersionHistory history = child.getVersionHistory();

Mime
View raw message