Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5

JCR bindings for Oak

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.1
    • jcr

    Description

      One of the proposed goals for the 0.1 release is at least a basic JCR binding for Oak. Most of that already exists in /jackrabbit/sandbox, we just need to decide where and how to place it in Oak. I think we should either put it all under o.a.j.oak.jcr in oak-core, or create a separate oak-jcr component for the JCR binding.

      As for functionality, it would be nice if the JCR binding was able to do at least the following:

      Repository repository = JcrUtils.getRepository(...);
      
      Session session = repository.login(...);
      try {
          // Create
          session.getRootNode().addNode("hello")
              .setProperty("world",  "hello world");
          session.save();
      
          // Read
          assertEquals(
              "hello world",
              session.getProperty("/hello/world").getString());
      
          // Update
          session.getNode("/hello").setProperty("world", "Hello, World!");
          session.save();
          assertEquals(
              "Hello, World!",
              session.getProperty("/hello/world").getString());
      
          // Delete
          session.getNode("/hello").delete();
          session.save();
          assertTrue(!session.propertyExists("/hello/world"));
      } finally {
          create.logout();
      }
      

      Attachments

        Issue Links

          Activity

            People

              mduerig Michael Dürig
              jukkaz Jukka Zitting
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: