[dna-commits] DNA SVN: r274 - in trunk: dna-jcr and 19 other directories.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Thu Jun 12 14:17:17 EDT 2008


Author: rhauch
Date: 2008-06-12 14:17:17 -0400 (Thu, 12 Jun 2008)
New Revision: 274

Added:
   trunk/dna-jcr/
   trunk/dna-jcr/.classpath
   trunk/dna-jcr/.project
   trunk/dna-jcr/.settings/
   trunk/dna-jcr/.settings/org.eclipse.jdt.core.prefs
   trunk/dna-jcr/pom.xml
   trunk/dna-jcr/src/
   trunk/dna-jcr/src/main/
   trunk/dna-jcr/src/main/java/
   trunk/dna-jcr/src/main/java/org/
   trunk/dna-jcr/src/main/java/org/jboss/
   trunk/dna-jcr/src/main/java/org/jboss/dna/
   trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/
   trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaNamespaceRegistry.java
   trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaRepository.java
   trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaSession.java
   trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaWorkspace.java
   trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java
   trunk/dna-jcr/src/main/resources/
   trunk/dna-jcr/src/main/resources/org/
   trunk/dna-jcr/src/main/resources/org/jboss/
   trunk/dna-jcr/src/main/resources/org/jboss/dna/
   trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/
   trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
   trunk/dna-jcr/src/test/
   trunk/dna-jcr/src/test/java/
   trunk/dna-jcr/src/test/java/org/
   trunk/dna-jcr/src/test/java/org/jboss/
   trunk/dna-jcr/src/test/java/org/jboss/dna/
   trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/
   trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrI18nTest.java
   trunk/dna-jcr/src/test/resources/
Modified:
   trunk/pom.xml
Log:
DNA-86 Create Maven project for JCR API implementation - Added new project with stub implementations of a few of the JCR API interfaces.


Property changes on: trunk/dna-jcr
___________________________________________________________________
Name: svn:ignore
   + target


Added: trunk/dna-jcr/.classpath
===================================================================
--- trunk/dna-jcr/.classpath	                        (rev 0)
+++ trunk/dna-jcr/.classpath	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: trunk/dna-jcr/.project
===================================================================
--- trunk/dna-jcr/.project	                        (rev 0)
+++ trunk/dna-jcr/.project	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>dna-jcr</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: trunk/dna-jcr/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/dna-jcr/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ trunk/dna-jcr/.settings/org.eclipse.jdt.core.prefs	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,60 @@
+#Thu Jun 12 12:38:24 CDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=error
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error

Added: trunk/dna-jcr/pom.xml
===================================================================
--- trunk/dna-jcr/pom.xml	                        (rev 0)
+++ trunk/dna-jcr/pom.xml	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jboss.dna</groupId>
+    <artifactId>dna</artifactId>
+    <version>0.2-SNAPSHOT</version>
+  </parent>
+  <!-- The groupId and version values are inherited from parent -->
+  <artifactId>dna-jcr</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss DNA JCR implementation</name>
+  <description>JBoss DNA implementation of the JCR API</description>
+  <url>http://labs.jboss.org/dna</url>
+  
+  <properties>
+    <dna-version>0.2-SNAPSHOT</dna-version>
+  </properties>
+  <!--
+  Define the dependencies.  Note that all version and scopes default to those 
+  defined in the dependencyManagement section of the parent pom.
+  -->
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.dna</groupId>
+      <artifactId>dna-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.dna</groupId>
+      <artifactId>dna-common</artifactId>
+      <version>${dna-version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.dna</groupId>
+      <artifactId>dna-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.dna</groupId>
+      <artifactId>dna-repository</artifactId>
+    </dependency>
+    <!-- 
+    Testing (note the scope)
+    -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <!-- 
+    Logging (require SLF4J API for compiling, but use Log4J and its SLF4J binding for testing) 
+    -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <!-- 
+    Java Concurrency in Practice annotations
+    -->
+  <dependency>
+    <groupId>net.jcip</groupId>
+    <artifactId>jcip-annotations</artifactId>
+  </dependency>
+    <!-- 
+      Java Content Repository API 
+    -->
+    <dependency>
+      <groupId>javax.jcr</groupId>
+      <artifactId>jcr</artifactId>
+    </dependency>
+    <!-- 
+      Apache JCR API unit tests (for any JCR implementation), which is a subset of the official TCK
+    -->
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-jcr-tests</artifactId>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Added: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaNamespaceRegistry.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaNamespaceRegistry.java	                        (rev 0)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaNamespaceRegistry.java	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.jcr;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.NamespaceException;
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+
+
+/**
+ * 
+ * @author Randall Hauch
+ */
+public class DnaNamespaceRegistry implements NamespaceRegistry {
+
+    /**
+     * 
+     */
+    public DnaNamespaceRegistry() {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getPrefix( String uri ) throws NamespaceException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getPrefixes() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getURI( String prefix ) throws NamespaceException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getURIs() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void registerNamespace( String prefix, String uri ) throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void unregisterNamespace( String prefix ) throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
+    }
+
+}

Added: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaRepository.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaRepository.java	                        (rev 0)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaRepository.java	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.jcr;
+
+import javax.jcr.Credentials;
+import javax.jcr.LoginException;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+/**
+ * @author Randall Hauch
+ */
+public class DnaRepository implements Repository {
+
+    /**
+     * 
+     */
+    public DnaRepository() {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getDescriptor( String key ) {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getDescriptorKeys() {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Session login() throws LoginException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Session login( Credentials credentials ) throws LoginException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Session login( String workspaceName ) throws LoginException, NoSuchWorkspaceException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Session login( Credentials credentials, String workspaceName ) throws LoginException, NoSuchWorkspaceException, RepositoryException {
+        return null;
+    }
+
+    protected void logout( DnaSession session ) {
+
+    }
+
+    protected String[] getWorkspaceNamesAccessibleBy( String username, Credentials credentials ) throws RepositoryException {
+        throw new UnsupportedOperationException();
+    }
+}

Added: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaSession.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaSession.java	                        (rev 0)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaSession.java	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,312 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.jcr;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.security.AccessControlException;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.Credentials;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.InvalidSerializedDataException;
+import javax.jcr.Item;
+import javax.jcr.ItemExistsException;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.LoginException;
+import javax.jcr.NamespaceException;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ValueFactory;
+import javax.jcr.Workspace;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+import net.jcip.annotations.GuardedBy;
+import net.jcip.annotations.ThreadSafe;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Randall Hauch
+ */
+ at ThreadSafe
+public class DnaSession implements Session {
+
+    private final DnaWorkspace workspace;
+    private final DnaRepository repository;
+    private final String username;
+    private final Credentials credentials;
+    private final ReadWriteLock sessionLock = new ReentrantReadWriteLock();
+    @GuardedBy( "sessionLock" )
+    private boolean connected;
+
+    /**
+     * @param repository the {@link DnaRepository} that owns this session; may not be null
+     * @param workspaceName the name of the workspace to which this session is connected; may not be null
+     * @param credentials the credentials that were used to authentiate this session; may not be null
+     * @param username the username used to create this session; may not be null
+     */
+    /* package */DnaSession( DnaRepository repository, String workspaceName, Credentials credentials, String username ) {
+        assert repository != null;
+        assert workspaceName != null;
+        assert credentials != null;
+        assert username != null;
+        this.workspace = new DnaWorkspace(repository, workspaceName, this);
+        this.repository = repository;
+        this.credentials = credentials;
+        this.username = username;
+        this.connected = true;
+    }
+
+    /* package */Credentials getCredentials() {
+        return this.credentials;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addLockToken( String lt ) throws LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void checkPermission( String absPath, String actions ) throws AccessControlException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void exportDocumentView( String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse ) throws PathNotFoundException, SAXException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void exportDocumentView( String absPath, OutputStream out, boolean skipBinary, boolean noRecurse ) throws IOException, PathNotFoundException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void exportSystemView( String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse ) throws PathNotFoundException, SAXException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void exportSystemView( String absPath, OutputStream out, boolean skipBinary, boolean noRecurse ) throws IOException, PathNotFoundException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object getAttribute( String name ) {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getAttributeNames() {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public ContentHandler getImportContentHandler( String parentAbsPath, int uuidBehavior )
+        throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Item getItem( String absPath ) throws PathNotFoundException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getLockTokens() {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getNamespacePrefix( String uri ) throws NamespaceException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getNamespacePrefixes() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getNamespaceURI( String prefix ) throws NamespaceException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Node getNodeByUUID( String uuid ) throws ItemNotFoundException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Repository getRepository() {
+        return this.repository;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Node getRootNode() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getUserID() {
+        return this.username;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public ValueFactory getValueFactory() throws UnsupportedRepositoryOperationException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Workspace getWorkspace() {
+        return this.workspace;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasPendingChanges() throws RepositoryException {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Session impersonate( Credentials credentials ) throws LoginException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void importXML( String parentAbsPath, InputStream in, int uuidBehavior )
+        throws IOException, PathNotFoundException, ItemExistsException, ConstraintViolationException, VersionException, InvalidSerializedDataException, LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isLive() {
+        Lock lock = this.sessionLock.readLock();
+        try {
+            return connected;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean itemExists( String absPath ) throws RepositoryException {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void logout() {
+        Lock lock = this.sessionLock.writeLock();
+        try {
+            repository.logout(this);
+            connected = false;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void move( String srcAbsPath, String destAbsPath ) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void refresh( boolean keepChanges ) throws RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void removeLockToken( String lt ) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void save()
+        throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setNamespacePrefix( String newPrefix, String existingUri ) throws NamespaceException, RepositoryException {
+    }
+
+}

Added: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaWorkspace.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaWorkspace.java	                        (rev 0)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DnaWorkspace.java	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.jcr;
+
+import java.io.IOException;
+import java.io.InputStream;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.InvalidSerializedDataException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.Workspace;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NodeTypeManager;
+import javax.jcr.observation.ObservationManager;
+import javax.jcr.query.QueryManager;
+import javax.jcr.version.Version;
+import javax.jcr.version.VersionException;
+import net.jcip.annotations.ThreadSafe;
+import org.xml.sax.ContentHandler;
+
+/**
+ * @author Randall Hauch
+ */
+ at ThreadSafe
+public class DnaWorkspace implements Workspace {
+
+    private final String name;
+    private final DnaSession session;
+    private final DnaRepository repository;
+
+    /**
+     * @param repository the repository instance that owns this workspace; may not be null
+     * @param name the name of the workspace; may not be null
+     * @param session the session that owns this workspace; may not be null
+     */
+    /* package */DnaWorkspace( DnaRepository repository, String name, DnaSession session ) {
+        assert repository != null;
+        assert session != null;
+        assert name != null;
+        this.repository = repository;
+        this.session = session;
+        this.name = name;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void clone( String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting )
+        throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void copy( String srcAbsPath, String destAbsPath )
+        throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void copy( String srcWorkspace, String srcAbsPath, String destAbsPath )
+        throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String[] getAccessibleWorkspaceNames() throws RepositoryException {
+        return repository.getWorkspaceNamesAccessibleBy(session.getUserID(), session.getCredentials());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public ContentHandler getImportContentHandler( String parentAbsPath, int uuidBehavior )
+        throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, AccessDeniedException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public NamespaceRegistry getNamespaceRegistry() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public NodeTypeManager getNodeTypeManager() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public ObservationManager getObservationManager() throws UnsupportedRepositoryOperationException, RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public QueryManager getQueryManager() throws RepositoryException {
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Session getSession() {
+        return this.session;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void importXML( String parentAbsPath, InputStream in, int uuidBehavior )
+        throws IOException, PathNotFoundException, ItemExistsException, ConstraintViolationException, InvalidSerializedDataException, LockException, AccessDeniedException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void move( String srcAbsPath, String destAbsPath )
+        throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void restore( Version[] versions, boolean removeExisting )
+        throws ItemExistsException, UnsupportedRepositoryOperationException, VersionException, LockException, InvalidItemStateException, RepositoryException {
+    }
+
+}

Added: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java	                        (rev 0)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.jcr;
+
+import java.util.Locale;
+import java.util.Set;
+import org.jboss.dna.common.i18n.I18n;
+
+/**
+ * @author Randall Hauch
+ */
+public final class JcrI18n {
+
+    // public static I18n invalidStateString;
+
+    static {
+        try {
+            I18n.initialize(JcrI18n.class);
+        } catch (final Exception err) {
+            System.err.println(err);
+        }
+    }
+
+    public static Set<Locale> getLocalizationProblemLocales() {
+        return I18n.getLocalizationProblemLocales(JcrI18n.class);
+    }
+
+    public static Set<String> getLocalizationProblems() {
+        return I18n.getLocalizationProblems(JcrI18n.class);
+    }
+
+    public static Set<String> getLocalizationProblems( Locale locale ) {
+        return I18n.getLocalizationProblems(JcrI18n.class, locale);
+    }
+}

Added: trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
===================================================================
--- trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties	                        (rev 0)
+++ trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,21 @@
+#
+# JBoss, Home of Professional Open Source.
+# Copyright 2008, Red Hat Middleware LLC, and individual contributors
+# as indicated by the @author tags. See the copyright.txt file in the
+# distribution for a full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#

Added: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrI18nTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrI18nTest.java	                        (rev 0)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrI18nTest.java	2008-06-12 18:17:17 UTC (rev 274)
@@ -0,0 +1,13 @@
+package org.jboss.dna.jcr;
+
+import org.jboss.dna.common.AbstractI18nTest;
+
+/**
+ * @author John Verhaeg
+ */
+public class JcrI18nTest extends AbstractI18nTest {
+
+    public JcrI18nTest() {
+        super(JcrI18n.class);
+    }
+}

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2008-06-12 17:36:18 UTC (rev 273)
+++ trunk/pom.xml	2008-06-12 18:17:17 UTC (rev 274)
@@ -58,6 +58,7 @@
 		<module>dna-common</module>
 		<module>dna-spi</module>
 		<module>dna-repository</module>
+		<module>dna-jcr</module>
 		<module>dna-maven-classloader</module>
 		<module>sequencers/dna-sequencer-images</module>
 		<module>sequencers/dna-sequencer-mp3</module>




More information about the dna-commits mailing list