Improve JCR repository wrapping
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 11 Jan 2011 21:45:54 +0000 (21:45 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 11 Jan 2011 21:45:54 +0000 (21:45 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4007 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/server/jackrabbit/JackrabbitContainer.java

index 6d7237a648a57af585c6c3d0a6011684bd75c89d..ef96b3595d153ba10aaa877704c5277074ceb9de 100644 (file)
@@ -38,6 +38,10 @@ import org.springframework.beans.factory.DisposableBean;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.core.io.Resource;
 
+/**
+ * Wrapper around a Jackrabbit repository which allows to configure it in Spring
+ * and expose it as a {@link Repository}.
+ */
 public class JackrabbitContainer implements InitializingBean, DisposableBean,
                Repository {
        private Log log = LogFactory.getLog(JackrabbitContainer.class);
@@ -58,8 +62,8 @@ public class JackrabbitContainer implements InitializingBean, DisposableBean,
                RepositoryConfig config;
                InputStream in = configuration.getInputStream();
                try {
-                       config = RepositoryConfig.create(in, homeDirectory
-                                       .getCanonicalPath());
+                       config = RepositoryConfig.create(in,
+                                       homeDirectory.getCanonicalPath());
                } catch (Exception e) {
                        throw new RuntimeException("Cannot read configuration", e);
                } finally {
@@ -124,23 +128,19 @@ public class JackrabbitContainer implements InitializingBean, DisposableBean,
        }
 
        public boolean isStandardDescriptor(String key) {
-               // TODO Auto-generated method stub
-               return false;
+               return repository.isStandardDescriptor(key);
        }
 
        public boolean isSingleValueDescriptor(String key) {
-               // TODO Auto-generated method stub
-               return false;
+               return repository.isSingleValueDescriptor(key);
        }
 
        public Value getDescriptorValue(String key) {
-               // TODO Auto-generated method stub
-               return null;
+               return repository.getDescriptorValue(key);
        }
 
        public Value[] getDescriptorValues(String key) {
-               // TODO Auto-generated method stub
-               return null;
+               return repository.getDescriptorValues(key);
        }
 
        // BEANS METHODS