You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by th...@apache.org on 2011/07/07 15:09:14 UTC
svn commit: r1143808 - in /jackrabbit/sandbox/spi2microkernel: ./
src/main/resources/org/apache/jackrabbit/spi2microkernel/
src/test/java/org/apache/jackrabbit/spi2microkernel/test/
Author: thomasm
Date: Thu Jul 7 13:09:14 2011
New Revision: 1143808
URL: http://svn.apache.org/viewvc?rev=1143808&view=rev
Log:
Add support for jackrabbit-jcr-tests (most fail currently).
Added:
jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/
jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/RepositoryStubImpl.java
jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestAll.java
jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestContentLoader.java
jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/repositoryStubImpl.properties
Modified:
jackrabbit/sandbox/spi2microkernel/pom.xml
jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd
Modified: jackrabbit/sandbox/spi2microkernel/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/pom.xml?rev=1143808&r1=1143807&r2=1143808&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/pom.xml (original)
+++ jackrabbit/sandbox/spi2microkernel/pom.xml Thu Jul 7 13:09:14 2011
@@ -66,6 +66,12 @@
<version>4.5</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-jcr-tests</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Modified: jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd?rev=1143808&r1=1143807&r2=1143808&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd (original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/resources/org/apache/jackrabbit/spi2microkernel/default-nodetypes.cnd Thu Jul 7 13:09:14 2011
@@ -41,4 +41,436 @@
[mix:referenceable]
mixin
- - jcr:uuid (STRING) mandatory autocreated protected
\ No newline at end of file
+ - jcr:uuid (STRING) mandatory autocreated protected
+
+
+
+
+//------------------------------------------------------------------------------
+// S T A N D A R D A P P L I C A T I O N N O D E T Y P E S
+//------------------------------------------------------------------------------
+
+/**
+ * This abstract node type serves as the supertype of nt:file and nt:folder.
+ * @since 1.0
+ */
+[nt:hierarchyNode] > mix:created
+ abstract
+
+/**
+ * Nodes of this node type may be used to represent files. This node type inherits
+ * the item definitions of nt:hierarchyNode and requires a single child node called
+ * jcr:content. The jcr:content node is used to hold the actual content of the
+ * file. This child node is mandatory, but not auto-created. Its node type will be
+ * application-dependent and therefore it must be added by the user. A common
+ * approach is to make the jcr:content a node of type nt:resource. The
+ * jcr:content child node is also designated as the primary child item of its parent.
+ *
+ * @since 1.0
+ */
+[nt:file] > nt:hierarchyNode
+ primaryitem jcr:content
+ + jcr:content (nt:base) mandatory
+
+/**
+ * The nt:linkedFile node type is similar to nt:file, except that the content
+ * node is not stored directly as a child node, but rather is specified by a
+ * REFERENCE property. This allows the content node to reside anywhere in the
+ * workspace and to be referenced by multiple nt:linkedFile nodes. The content
+ * node must be referenceable.
+ *
+ * @since 1.0
+ */
+[nt:linkedFile] > nt:hierarchyNode
+ primaryitem jcr:content
+ - jcr:content (REFERENCE) mandatory
+
+/**
+ * Nodes of this type may be used to represent folders or directories. This node
+ * type inherits the item definitions of nt:hierarchyNode and adds the ability
+ * to have any number of other nt:hierarchyNode child nodes with any names.
+ * This means, in particular, that it can have child nodes of types nt:folder,
+ * nt:file or nt:linkedFile.
+ *
+ * @since 1.0
+ */
+[nt:folder] > nt:hierarchyNode
+ + * (nt:hierarchyNode) VERSION
+
+/**
+ * This node type may be used to represent the content of a file. In particular,
+ * the jcr:content subnode of an nt:file node will often be an nt:resource.
+ *
+ * @since 1.0
+ */
+[nt:resource] > mix:mimeType, mix:lastModified, mix:referenceable
+ primaryitem jcr:data
+ - jcr:data (BINARY) mandatory
+
+/**
+ * This mixin node type can be used to add standardized title and description
+ * properties to a node.
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:title]
+ mixin
+ - jcr:title (STRING)
+ - jcr:description (STRING)
+
+/**
+ * This mixin node type can be used to add standardized creation information
+ * properties to a node. Since the properties are protected, their values are
+ * controlled by the repository, which should set them appropriately upon the
+ * initial persist of a node with this mixin type. In cases where this mixin is
+ * added to an already existing node the semantics of these properties are
+ * implementation specific. Note that jackrabbit initializes the properties to
+ * the current date and user in this case.
+ *
+ *
+ * @since 2.0
+ */
+[mix:created]
+ mixin
+ - jcr:created (DATE) autocreated protected
+ - jcr:createdBy (STRING) autocreated protected
+
+/**
+ * This mixin node type can be used to provide standardized modification
+ * information properties to a node.
+ *
+ * The following is not yet implemented in Jackrabbit:
+ * "Since the properties are protected, their values
+ * are controlled by the repository, which should set them appropriately upon a
+ * significant modification of the subgraph of a node with this mixin. What
+ * constitutes a significant modification will depend on the semantics of the various
+ * parts of a node's subgraph and is implementation-dependent"
+ *
+ * Jackrabbit initializes the properties to the current date and user in the
+ * case they are newly created.
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:lastModified]
+ mixin
+ - jcr:lastModified (DATE) autocreated
+ - jcr:lastModifiedBy (STRING) autocreated
+
+/**
+ * This mixin node type can be used to provide a standardized property that
+ * specifies the natural language in which the content of a node is expressed.
+ * The value of the jcr:language property should be a language code as defined
+ * in RFC 46465. Examples include "en" (English), "en-US" (United States English),
+ * "de" (German) and "de-CH" (Swiss German).
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:language]
+ mixin
+ - jcr:language (STRING)
+
+/**
+ * This mixin node type can be used to provide standardized mimetype and
+ * encoding properties to a node. If a node of this type has a primary item
+ * that is a single-value BINARY property then jcr:mimeType property indicates
+ * the media type applicable to the contents of that property and, if that
+ * media type is one to which a text encoding applies, the jcr:encoding property
+ * indicates the character set used. If a node of this type does not meet the
+ * above precondition then the interpretation of the jcr:mimeType and
+ * jcr:encoding properties is implementation-dependent.
+ *
+ * Note that the protected attributes suggested by JSR283 are omitted in this variant.
+ * @since 2.0
+ */
+[mix:mimeType]
+ mixin
+ - jcr:mimeType (STRING)
+ - jcr:encoding (STRING)
+
+/**
+ * This node type may be used to represent the location of a JCR item not just
+ * within a particular workspace but within the space of all workspaces in all JCR
+ * repositories.
+ *
+ * @prop jcr:protocol Stores a string holding the protocol through which the
+ * target repository is to be accessed.
+ * @prop jcr:host Stores a string holding the host name of the system
+ * through which the repository is to be accessed.
+ * @prop jcr:port Stores a string holding the port number through which the
+ * target repository is to be accessed.
+ *
+ * The semantics of these properties above are left undefined but are assumed to be
+ * known by the application. The names and descriptions of the properties are not
+ * normative and the repository does not enforce any particular semantic
+ * interpretation on them.
+ *
+ * @prop jcr:repository Stores a string holding the name of the target repository.
+ * @prop jcr:workspace Stores the name of a workspace.
+ * @prop jcr:path Stores a path to an item.
+ * @prop jcr:id Stores a weak reference to a node.
+ *
+ * In most cases either the jcr:path or the jcr:id property would be used, but
+ * not both, since they may point to different nodes. If any of the properties
+ * other than jcr:path and jcr:id are missing, the address can be interpreted as
+ * relative to the current container at the same level as the missing specifier.
+ * For example, if no repository is specified, then the address can be
+ * interpreted as referring to a workspace and path or id within the current
+ * repository.
+ *
+ * @since 2.0
+ */
+[nt:address]
+ - jcr:protocol (STRING)
+ - jcr:host (STRING)
+ - jcr:port (STRING)
+ - jcr:repository (STRING)
+ - jcr:workspace (STRING)
+ - jcr:path (PATH)
+ - jcr:id (WEAKREFERENCE)
+
+/**
+ * The mix:etag mixin type defines a standardized identity validator for BINARY
+ * properties similar to the entity tags used in HTTP/1.1
+ *
+ * A jcr:etag property is an opaque string whose syntax is identical to that
+ * defined for entity tags in HTTP/1.1. Semantically, the jcr:etag is comparable
+ * to the HTTP/1.1 strong entity tag.
+ *
+ * On creation of a mix:etag node N, or assignment of mix:etag to N, the
+ * repository must create a jcr:etag property with an implementation determined
+ * value.
+ *
+ * The value of the jcr:etag property must change immediately on persist of any
+ * of the following changes to N:
+ * - A BINARY property is added t o N.
+ * - A BINARY property is removed from N.
+ * - The value of an existing BINARY property of N changes.
+ *
+ * @since 2.0
+ */
+[mix:etag]
+ mixin
+ - jcr:etag (STRING) protected autocreated
+
+//------------------------------------------------------------------------------
+// U N S T R U C T U R E D C O N T E N T
+//------------------------------------------------------------------------------
+
+/**
+ * This node type is used to store unstructured content. It allows any number of
+ * child nodes or properties with any names. It also allows multiple nodes having
+ * the same name as well as both multi-value and single-value properties with any
+ * names. This node type also supports client-orderable child nodes.
+ *
+ * @since 1.0
+ */
+[nt:unstructured]
+ orderable
+ - * (UNDEFINED) multiple
+ - * (UNDEFINED)
+ + * (nt:base) = nt:unstructured sns VERSION
+
+//------------------------------------------------------------------------------
+// R E F E R E N C E A B L E
+//------------------------------------------------------------------------------
+
+/**
+ * This node type adds an auto-created, mandatory, protected STRING property to
+ * the node, called jcr:uuid, which exposes the identifier of the node.
+ * Note that the term "UUID" is used for backward compatibility with JCR 1.0
+ * and does not necessarily imply the use of the UUID syntax, or global uniqueness.
+ * The identifier of a referenceable node must be a referenceable identifier.
+ * Referenceable identifiers must fulfill a number of constraints beyond the
+ * minimum required of standard identifiers (see 3.8.3 Referenceable Identifiers).
+ * A reference property is a property that holds the referenceable identifier of a
+ * referenceable node and therefore serves as a pointer to that node. The two types
+ * of reference properties, REFERENCE and WEAKREFERENCE differ in that the former
+ * enforces referential integrity while the latter does not.
+ *
+ * @since 1.0
+ */
+[mix:referenceable]
+ mixin
+ - jcr:uuid (STRING) mandatory autocreated protected INITIALIZE
+
+//------------------------------------------------------------------------------
+// L O C K I N G
+//------------------------------------------------------------------------------
+
+/**
+ * @since 1.0
+ */
+[mix:lockable]
+ mixin
+ - jcr:lockOwner (STRING) protected IGNORE
+ - jcr:lockIsDeep (BOOLEAN) protected IGNORE
+
+//------------------------------------------------------------------------------
+// S H A R E A B L E N O D E S
+//------------------------------------------------------------------------------
+
+/**
+ * @since 2.0
+ */
+[mix:shareable] > mix:referenceable
+ mixin
+
+//------------------------------------------------------------------------------
+// V E R S I O N I N G
+//------------------------------------------------------------------------------
+
+/**
+ * @since 2.0
+ */
+[mix:simpleVersionable]
+ mixin
+ - jcr:isCheckedOut (BOOLEAN) = 'true' mandatory autocreated protected IGNORE
+
+/**
+ * @since 1.0
+ */
+[mix:versionable] > mix:simpleVersionable, mix:referenceable
+ mixin
+ - jcr:versionHistory (REFERENCE) mandatory protected IGNORE < 'nt:versionHistory'
+ - jcr:baseVersion (REFERENCE) mandatory protected IGNORE < 'nt:version'
+ - jcr:predecessors (REFERENCE) mandatory protected multiple IGNORE < 'nt:version'
+ - jcr:mergeFailed (REFERENCE) protected multiple ABORT < 'nt:version'
+ /** @since 2.0 */
+ - jcr:activity (REFERENCE) protected < 'nt:activity'
+ /** @since 2.0 */
+ - jcr:configuration (REFERENCE) protected IGNORE < 'nt:configuration'
+
+/**
+ * @since 1.0
+ */
+[nt:versionHistory] > mix:referenceable
+ - jcr:versionableUuid (STRING) mandatory autocreated protected ABORT
+ /** @since 2.0 */
+ - jcr:copiedFrom (WEAKREFERENCE) protected ABORT < 'nt:version'
+ + jcr:rootVersion (nt:version) = nt:version mandatory autocreated protected ABORT
+ + jcr:versionLabels (nt:versionLabels) = nt:versionLabels mandatory autocreated protected ABORT
+ + * (nt:version) = nt:version protected ABORT
+
+/**
+ * @since 1.0
+ */
+[nt:versionLabels]
+ - * (REFERENCE) protected ABORT < 'nt:version'
+
+/**
+ * @since 1.0
+ */
+[nt:version] > mix:referenceable
+ - jcr:created (DATE) mandatory autocreated protected ABORT
+ - jcr:predecessors (REFERENCE) protected multiple ABORT < 'nt:version'
+ - jcr:successors (REFERENCE) protected multiple ABORT < 'nt:version'
+ /** @since 2.0 */
+ - jcr:activity (REFERENCE) protected ABORT < 'nt:activity'
+ + jcr:frozenNode (nt:frozenNode) protected ABORT
+
+/**
+ * @since 1.0
+ */
+[nt:frozenNode] > mix:referenceable
+ orderable
+ - jcr:frozenPrimaryType (NAME) mandatory autocreated protected ABORT
+ - jcr:frozenMixinTypes (NAME) protected multiple ABORT
+ - jcr:frozenUuid (STRING) mandatory autocreated protected ABORT
+ - * (UNDEFINED) protected ABORT
+ - * (UNDEFINED) protected multiple ABORT
+ + * (nt:base) protected sns ABORT
+
+/**
+ * @since 1.0
+ */
+[nt:versionedChild]
+ - jcr:childVersionHistory (REFERENCE) mandatory autocreated protected ABORT < 'nt:versionHistory'
+
+/**
+ * @since 2.0
+ */
+[nt:activity] > mix:referenceable
+ - jcr:activityTitle (STRING) mandatory autocreated protected
+
+/**
+ * @since 2.0
+ */
+[nt:configuration] > mix:versionable
+ - jcr:root (REFERENCE) mandatory autocreated protected
+
+//------------------------------------------------------------------------------
+// N O D E T Y P E S
+//------------------------------------------------------------------------------
+
+/**
+ * This node type is used to store a node type definition. Property and child node
+ * definitions within the node type definition are stored as same-name sibling nodes
+ * of type nt:propertyDefinition and nt:childNodeDefinition.
+ *
+ * @since 1.0
+ */
+[nt:nodeType]
+ - jcr:nodeTypeName (NAME) protected mandatory
+ - jcr:supertypes (NAME) protected multiple
+ - jcr:isAbstract (BOOLEAN) protected mandatory
+ - jcr:isQueryable (BOOLEAN) protected mandatory
+ - jcr:isMixin (BOOLEAN) protected mandatory
+ - jcr:hasOrderableChildNodes (BOOLEAN) protected mandatory
+ - jcr:primaryItemName (NAME) protected
+ + jcr:propertyDefinition (nt:propertyDefinition) = nt:propertyDefinition protected sns
+ + jcr:childNodeDefinition (nt:childNodeDefinition) = nt:childNodeDefinition protected sns
+
+/**
+ * This node type used to store a property definition within a node type definition,
+ * which itself is stored as an nt:nodeType node.
+ *
+ * @since 1.0
+ */
+[nt:propertyDefinition]
+ - jcr:name (NAME) protected
+ - jcr:autoCreated (BOOLEAN) protected mandatory
+ - jcr:mandatory (BOOLEAN) protected mandatory
+ - jcr:onParentVersion (STRING) protected mandatory
+ < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
+ - jcr:protected (BOOLEAN) protected mandatory
+ - jcr:requiredType (STRING) protected mandatory
+ < 'STRING', 'URI', 'BINARY', 'LONG', 'DOUBLE',
+ 'DECIMAL', 'BOOLEAN', 'DATE', 'NAME', 'PATH',
+ 'REFERENCE', 'WEAKREFERENCE', 'UNDEFINED'
+ - jcr:valueConstraints (STRING) protected multiple
+ - jcr:defaultValues (UNDEFINED) protected multiple
+ - jcr:multiple (BOOLEAN) protected mandatory
+ - jcr:availableQueryOperators (NAME) protected mandatory multiple
+ - jcr:isFullTextSearchable (BOOLEAN) protected mandatory
+ - jcr:isQueryOrderable (BOOLEAN) protected mandatory
+
+/**
+ * This node type used to store a child node definition within a node type definition,
+ * which itself is stored as an nt:nodeType node.
+ *
+ * @since 1.0
+ */
+[nt:childNodeDefinition]
+ - jcr:name (NAME) protected
+ - jcr:autoCreated (BOOLEAN) protected mandatory
+ - jcr:mandatory (BOOLEAN) protected mandatory
+ - jcr:onParentVersion (STRING) protected mandatory
+ < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
+ - jcr:protected (BOOLEAN) protected mandatory
+ - jcr:requiredPrimaryTypes (NAME) = 'nt:base' protected mandatory multiple
+ - jcr:defaultPrimaryType (NAME) protected
+ - jcr:sameNameSiblings (BOOLEAN) protected mandatory
+
+//------------------------------------------------------------------------------
+// Q U E R Y
+//------------------------------------------------------------------------------
+
+/**
+ * @since 1.0
+ */
+[nt:query]
+ - jcr:statement (STRING)
+ - jcr:language (STRING)
Added: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/RepositoryStubImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/RepositoryStubImpl.java?rev=1143808&view=auto
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/RepositoryStubImpl.java (added)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/RepositoryStubImpl.java Thu Jul 7 13:09:14 2011
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.spi2microkernel.test;
+
+import java.security.Principal;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Properties;
+import javax.imageio.spi.ServiceRegistry;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.RepositoryFactory;
+import javax.jcr.Session;
+import org.apache.jackrabbit.mk.MicroKernelFactory;
+import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.spi2microkernel.RepositoryServiceFactoryImpl;
+import org.apache.jackrabbit.test.NotExecutableException;
+import org.apache.jackrabbit.test.RepositoryStub;
+import org.apache.jackrabbit.test.RepositoryStubException;
+
+/**
+ * <code>RepositoryStubImpl</code> implements a repository stub that
+ * initializes a Jackrabbit 3 spi2microkernel repository.
+ */
+public class RepositoryStubImpl extends RepositoryStub {
+
+ // private static final String URL = "fs:target/repository-test/repository";
+ private static final String URL = "mem:";
+
+ private Repository repo;
+
+ private static Principal KNOWN_PRINCIPAL = new Principal() {
+ public String getName() {
+ return "an_known_user";
+ }
+ };
+
+ private static Principal UNKNOWN_PRINCIPAL = new Principal() {
+ public String getName() {
+ return "an_unknown_user";
+ }
+ };
+
+ /**
+ * Constructor required by TCK.
+ *
+ * @param env the environment.
+ */
+ public RepositoryStubImpl(Properties settings) {
+ super(settings);
+
+ // set some attributes on the sessions
+ superuser.setAttribute("jackrabbit", "jackrabbit");
+ readwrite.setAttribute("jackrabbit", "jackrabbit");
+ readonly.setAttribute("jackrabbit", "jackrabbit");
+
+ // this.settings = settings;
+
+ }
+
+ /**
+ * @return the repository instance to test.
+ * @throws RepositoryStubException if an error occurs while starting up the
+ * repository.
+ */
+ public Repository getRepository() throws RepositoryStubException {
+ if (repo == null) {
+ initRepo();
+ Iterator<RepositoryFactory> factories = ServiceRegistry.lookupProviders(RepositoryFactory.class);
+ while (repo == null && factories.hasNext()) {
+ RepositoryFactory factory = factories.next();
+ try {
+ repo = factory.getRepository(Collections.singletonMap(
+ RepositoryServiceFactoryImpl.PARAM_URL, URL));
+ loadTestContent();
+ } catch (Exception e) {
+ e.printStackTrace();
+
+
+
+ throw (RepositoryStubException) new RepositoryStubException(e.getMessage()).initCause(e);
+ }
+ }
+ }
+ return repo;
+ }
+
+ private void initRepo() {
+ MicroKernel mk = MicroKernelFactory.getInstance(URL + ";clean");
+ String head = mk.getHeadRevision();
+
+ if (!mk.nodeExists("/default", head)) {
+ head = mk.commit("/",
+ "+\"default\" : {" +
+ "\"{}testdata\" : {" +
+ "\"{}stringProp\":\"stringVal\"," +
+ "\"{}intProp\":42," +
+ "\"{}mvProp\":[1,2,3]}, " +
+ "\"{}bar\" : {}}", head, "");
+ }
+
+ mk.dispose();
+ }
+
+ private void loadTestContent() throws Exception {
+ Session session = repo.login();
+ new TestContentLoader().loadTestContent(session);
+ session.logout();
+ }
+
+ @Override
+ public Principal getKnownPrincipal(Session session) throws RepositoryException {
+ return KNOWN_PRINCIPAL;
+ }
+
+ @Override
+ public Principal getUnknownPrincipal(Session session) throws RepositoryException, NotExecutableException {
+ return UNKNOWN_PRINCIPAL;
+ }
+
+}
Added: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestAll.java?rev=1143808&view=auto
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestAll.java (added)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestAll.java Thu Jul 7 13:09:14 2011
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.spi2microkernel.test;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import org.apache.jackrabbit.test.JCRTestSuite;
+
+public class TestAll extends TestCase {
+
+ static {
+ System.setProperty("javax.jcr.tck.properties", "src/test/java/org/apache/jackrabbit/spi2microkernel/test/repositoryStubImpl.properties");
+ }
+
+ public static Test suite() {
+ return new JCRTestSuite();
+ }
+}
Added: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestContentLoader.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestContentLoader.java?rev=1143808&view=auto
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestContentLoader.java (added)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/TestContentLoader.java Thu Jul 7 13:09:14 2011
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.jackrabbit.spi2microkernel.test;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Collection;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+import javax.jcr.Workspace;
+import javax.jcr.nodetype.NodeType;
+import org.apache.jackrabbit.commons.JcrUtils;
+
+/**
+ * Test Content Loader.
+ */
+public class TestContentLoader {
+
+ /**
+ * The encoding of the test resources.
+ */
+ private static final String ENCODING = "UTF-8";
+
+ public void loadTestContent(Session session) throws RepositoryException, IOException {
+ Workspace workspace = session.getWorkspace();
+ Collection<String> workspaces =
+ Arrays.asList(workspace.getAccessibleWorkspaceNames());
+ if (!workspaces.contains("test")) {
+ workspace.createWorkspace("test");
+ }
+
+// JackrabbitNodeTypeManager manager =
+// (JackrabbitNodeTypeManager) workspace.getNodeTypeManager();
+// if (!manager.hasNodeType("test:versionable")) {
+// InputStream xml =
+// TestContentLoader.class.getResourceAsStream("test-nodetypes.xml");
+// try {
+// manager.registerNodeTypes(xml, JackrabbitNodeTypeManager.TEXT_XML);
+// } finally {
+// xml.close();
+// }
+// }
+
+ Node data = getOrAddNode(session.getRootNode(), "testdata");
+ addPropertyTestData(getOrAddNode(data, "property"));
+ addQueryTestData(getOrAddNode(data, "query"));
+ addNodeTestData(getOrAddNode(data, "node"));
+ addLifecycleTestData(getOrAddNode(data, "lifecycle"));
+ addExportTestData(getOrAddNode(data, "docViewTest"));
+
+ Node conf = getOrAddNode(session.getRootNode(), "testconf");
+ addRetentionTestData(getOrAddNode(conf, "retentionTest"));
+
+ session.save();
+ }
+
+
+
+ private Node getOrAddNode(Node node, String name)
+ throws RepositoryException {
+ try {
+ return node.getNode(name);
+ } catch (PathNotFoundException e) {
+ return node.addNode(name);
+ }
+ }
+
+ /**
+ * Creates a boolean, double, long, calendar and a path property at the
+ * given node.
+ */
+ private void addPropertyTestData(Node node) throws RepositoryException {
+ node.setProperty("boolean", true);
+ node.setProperty("double", Math.PI);
+ node.setProperty("long", 90834953485278298l);
+ Calendar c = Calendar.getInstance();
+ c.set(2005, 6, 18, 17, 30);
+ node.setProperty("calendar", c);
+ ValueFactory factory = node.getSession().getValueFactory();
+ node.setProperty("path", factory.createValue("/", PropertyType.PATH));
+ node.setProperty("multi", new String[] { "one", "two", "three" });
+ }
+
+ /**
+ * Creates a node with a RetentionPolicy
+ */
+ private void addRetentionTestData(Node node) throws RepositoryException {
+// RetentionPolicy rp = RetentionPolicyImpl.createRetentionPolicy("testRetentionPolicy", node.getSession());
+// node.getSession().getRetentionManager().setRetentionPolicy(node.getPath(), rp);
+ }
+
+ /**
+ * Creates four nodes under the given node. Each node has a String
+ * property named "prop1" with some content set.
+ */
+ private void addQueryTestData(Node node) throws RepositoryException {
+ while (node.hasNode("node1")) {
+ node.getNode("node1").remove();
+ }
+ getOrAddNode(node, "node1").setProperty(
+ "prop1", "You can have it good, cheap, or fast. Any two.");
+ getOrAddNode(node, "node1").setProperty("prop1", "foo bar");
+ getOrAddNode(node, "node1").setProperty("prop1", "Hello world!");
+ getOrAddNode(node, "node2").setProperty("prop1", "Apache Jackrabbit");
+ }
+
+
+ /**
+ * Creates three nodes under the given node: one of type nt:resource
+ * and the other nodes referencing it.
+ */
+ private void addNodeTestData(Node node) throws RepositoryException, IOException {
+ if (node.hasNode("multiReference")) {
+ node.getNode("multiReference").remove();
+ }
+ if (node.hasNode("resReference")) {
+ node.getNode("resReference").remove();
+ }
+ if (node.hasNode("myResource")) {
+ node.getNode("myResource").remove();
+ }
+
+ Node resource = node.addNode("myResource", "nt:resource");
+ // nt:resource not longer referenceable since JCR 2.0
+ resource.addMixin("mix:referenceable");
+ resource.setProperty("jcr:encoding", ENCODING);
+ resource.setProperty("jcr:mimeType", "text/plain");
+ resource.setProperty(
+ "jcr:data",
+ new ByteArrayInputStream("Hello w\u00F6rld.".getBytes(ENCODING)));
+ resource.setProperty("jcr:lastModified", Calendar.getInstance());
+
+ Node resReference = getOrAddNode(node, "reference");
+ resReference.setProperty("ref", resource);
+ // make this node itself referenceable
+ resReference.addMixin("mix:referenceable");
+
+ Node multiReference = node.addNode("multiReference");
+ ValueFactory factory = node.getSession().getValueFactory();
+ multiReference.setProperty("ref", new Value[] {
+ factory.createValue(resource),
+ factory.createValue(resReference)
+ });
+
+ // NodeDefTest requires a test node with a mandatory child node
+ JcrUtils.putFile(
+ node, "testFile", "text/plain",
+ new ByteArrayInputStream("Hello, World!".getBytes("UTF-8")));
+ }
+
+ /**
+ * Creates a lifecycle policy node and another node with a lifecycle
+ * referencing that policy.
+ */
+ private void addLifecycleTestData(Node node) throws RepositoryException {
+ Node policy = getOrAddNode(node, "policy");
+ policy.addMixin(NodeType.MIX_REFERENCEABLE);
+ Node transitions = getOrAddNode(policy, "transitions");
+ Node transition = getOrAddNode(transitions, "identity");
+ transition.setProperty("from", "identity");
+ transition.setProperty("to", "identity");
+
+ Node lifecycle = getOrAddNode(node, "node");
+// ((NodeImpl) lifecycle).assignLifecyclePolicy(policy, "identity");
+ }
+
+ private void addExportTestData(Node node) throws RepositoryException, IOException {
+ getOrAddNode(node, "invalidXmlName").setProperty("propName", "some text");
+
+ // three nodes which should be serialized as xml text in docView export
+ // separated with spaces
+ getOrAddNode(node, "jcr:xmltext").setProperty(
+ "jcr:xmlcharacters", "A text without any special character.");
+ getOrAddNode(node, "some-element");
+ getOrAddNode(node, "jcr:xmltext").setProperty(
+ "jcr:xmlcharacters",
+ " The entity reference characters: <, ', ,&, >, \" should"
+ + " be escaped in xml export. ");
+ getOrAddNode(node, "some-element");
+ getOrAddNode(node, "jcr:xmltext").setProperty(
+ "jcr:xmlcharacters", "A text without any special character.");
+
+ Node big = getOrAddNode(node, "bigNode");
+ big.setProperty(
+ "propName0",
+ "SGVsbG8gd8O2cmxkLg==;SGVsbG8gd8O2cmxkLg==".split(";"),
+ PropertyType.BINARY);
+ big.setProperty("propName1", "text 1");
+ big.setProperty(
+ "propName2",
+ "multival text 1;multival text 2;multival text 3".split(";"));
+ big.setProperty("propName3", "text 1");
+
+ addExportValues(node, "propName");
+ addExportValues(node, "Prop<>prop");
+ }
+
+ /**
+ * create nodes with following properties
+ * binary & single
+ * binary & multival
+ * notbinary & single
+ * notbinary & multival
+ */
+ private void addExportValues(Node node, String name)
+ throws RepositoryException, IOException {
+ String prefix = "valid";
+ if (name.indexOf('<') != -1) {
+ prefix = "invalid";
+ }
+ node = getOrAddNode(node, prefix + "Names");
+
+ String[] texts = new String[] {
+ "multival text 1", "multival text 2", "multival text 3" };
+ getOrAddNode(node, prefix + "MultiNoBin").setProperty(name, texts);
+
+ Node resource = getOrAddNode(node, prefix + "MultiBin");
+ resource.setProperty("jcr:encoding", ENCODING);
+ resource.setProperty("jcr:mimeType", "text/plain");
+ String[] values =
+ new String[] { "SGVsbG8gd8O2cmxkLg==", "SGVsbG8gd8O2cmxkLg==" };
+ resource.setProperty(name, values, PropertyType.BINARY);
+ resource.setProperty("jcr:lastModified", Calendar.getInstance());
+
+ getOrAddNode(node, prefix + "NoBin").setProperty(name, "text 1");
+
+ resource = getOrAddNode(node, "invalidBin");
+ resource.setProperty("jcr:encoding", ENCODING);
+ resource.setProperty("jcr:mimeType", "text/plain");
+ byte[] bytes = "Hello w\u00F6rld.".getBytes(ENCODING);
+ resource.setProperty(name, new ByteArrayInputStream(bytes));
+ resource.setProperty("jcr:lastModified", Calendar.getInstance());
+ }
+
+}
\ No newline at end of file
Added: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/repositoryStubImpl.properties
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/repositoryStubImpl.properties?rev=1143808&view=auto
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/repositoryStubImpl.properties (added)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/test/repositoryStubImpl.properties Thu Jul 7 13:09:14 2011
@@ -0,0 +1,538 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Use this stub implementation instead
+javax.jcr.tck.repository_stub_impl=org.apache.jackrabbit.spi2microkernel.test.RepositoryStubImpl
+
+# repository factory class name
+javax.jcr.tck.repository.factory=org.apache.jackrabbit.spi2microkernel.RepositoryFactoryImpl
+
+# the repository home
+org.apache.jackrabbit.repository.home=target/repository
+
+# alternative workspace used for update tests etc.
+org.apache.jackrabbit.jcr2spi.workspace2.name=test
+
+# credential configuration
+javax.jcr.tck.superuser.name=admin
+javax.jcr.tck.superuser.pwd=admin
+javax.jcr.tck.readwrite.name=admin
+javax.jcr.tck.readwrite.pwd=admin
+javax.jcr.tck.readonly.name=anonymous
+javax.jcr.tck.readonly.pwd=
+
+# global test configuration
+javax.jcr.tck.testroot=/testroot
+javax.jcr.tck.nodetype=nt:unstructured
+javax.jcr.tck.nodetypenochildren=nt:address
+javax.jcr.tck.nodename1=node1
+javax.jcr.tck.nodename2=node2
+javax.jcr.tck.nodename3=node3
+javax.jcr.tck.nodename4=node4
+javax.jcr.tck.propertyname1=prop1
+javax.jcr.tck.propertyname2=prop2
+javax.jcr.tck.propertyvalue1=value1
+javax.jcr.tck.propertyvalue2=value2
+#javax.jcr.tck.propertytype1=String
+#javax.jcr.tck.propertytype2=String
+javax.jcr.tck.workspacename=test
+
+# namespace configuration
+javax.jcr.tck.namespaces=test
+javax.jcr.tck.namespaces.test=http://www.apache.org/jackrabbit/test
+
+# retention and hold
+javax.jcr.tck.holdname=hold
+
+# sample for per test case config overriding
+# Test class: AddNodeText
+# Test method: testName
+javax.jcr.tck.AddNodeTest.testName.nodename1=myname
+
+# ==============================================================================
+# JAVAX.JCR CONFIGURATION
+# ==============================================================================
+
+# Test class: ItemDefTest
+javax.jcr.tck.ItemDefTest.testroot=/testdata
+
+# Test class: ItemReadMethodsTest
+javax.jcr.tck.ItemReadMethodsTest.testroot=/testdata
+
+# Test class: NodeReadMethodsTest
+javax.jcr.tck.NodeReadMethodsTest.testroot=/testdata
+
+# Test class: PropertyTypeTest
+javax.jcr.tck.PropertyTypeTest.testroot=/testdata
+
+# Test class: BinaryPropertyTest
+javax.jcr.tck.BinaryPropertyTest.testroot=/testdata
+
+# Test class: BooleanPropertyTest
+javax.jcr.tck.BooleanPropertyTest.testroot=/testdata
+
+# Test class: DatePropertyTest
+javax.jcr.tck.DatePropertyTest.testroot=/testdata
+
+# Test class: DecimalPropertyTest
+javax.jcr.tck.DecimalPropertyTest.testroot=/testdata
+
+# Test class: DoublePropertyTest
+javax.jcr.tck.DoublePropertyTest.testroot=/testdata
+
+# Test class: LongPropertyTest
+javax.jcr.tck.LongPropertyTest.testroot=/testdata
+
+# Test class: NamePropertyTest
+javax.jcr.tck.NamePropertyTest.testroot=/testdata
+
+# Test class: PathPropertyTest
+javax.jcr.tck.PathPropertyTest.testroot=/testdata
+
+# Test class: ReferencePropertyTest
+javax.jcr.tck.ReferencePropertyTest.testroot=/testdata
+
+# Test class: StringPropertyTest
+javax.jcr.tck.StringPropertyTest.testroot=/testdata
+
+# Test class: SetValueVersionExceptionTest
+# nodetype2: nodetype with a reference property
+javax.jcr.tck.SetValueVersionExceptionTest.nodetype2=nt:linkedFile
+# propertyname3: name of the single value reference property
+javax.jcr.tck.SetValueVersionExceptionTest.propertyname3=jcr:content
+
+# Test class: SetValueValueFormatExceptionTest
+javax.jcr.tck.SetValueValueFormatExceptionTest.nodetype=test:canSetProperty
+javax.jcr.tck.SetValueValueFormatExceptionTest.testValue.propertyname1=Boolean
+javax.jcr.tck.SetValueValueFormatExceptionTest.testValueArray.propertyname1=BooleanMultiple
+javax.jcr.tck.SetValueValueFormatExceptionTest.testString.propertyname1=Date
+javax.jcr.tck.SetValueValueFormatExceptionTest.testStringArray.propertyname1=DateMultiple
+javax.jcr.tck.SetValueValueFormatExceptionTest.testInputStream.propertyname1=Date
+javax.jcr.tck.SetValueValueFormatExceptionTest.testLong.propertyname1=Boolean
+javax.jcr.tck.SetValueValueFormatExceptionTest.testDouble.propertyname1=Boolean
+javax.jcr.tck.SetValueValueFormatExceptionTest.testCalendar.propertyname1=Boolean
+javax.jcr.tck.SetValueValueFormatExceptionTest.testBoolean.propertyname1=Date
+javax.jcr.tck.SetValueValueFormatExceptionTest.testNode.propertyname1=Boolean
+javax.jcr.tck.SetValueValueFormatExceptionTest.testNodeNotReferenceable.propertyname1=ReferenceConstraints
+
+# Test class: SetPropertyAssumeTypeTest
+javax.jcr.tck.SetPropertyAssumeTypeTest.nodetype=test:canSetProperty
+javax.jcr.tck.SetPropertyAssumeTypeTest.testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter.propertyname1=String
+javax.jcr.tck.SetPropertyAssumeTypeTest.testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter.propertyname1=String
+javax.jcr.tck.SetPropertyAssumeTypeTest.testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter.propertyname1=StringMultiple
+
+# Test class: UndefinedPropertyTest
+javax.jcr.tck.UndefinedPropertyTest.testroot=/testdata
+
+# Test class: PropertyReadMethodsTest
+javax.jcr.tck.PropertyReadMethodsTest.testroot=/testdata
+
+# Test class: NodeIteratorTest
+javax.jcr.tck.NodeIteratorTest.testroot=/testdata
+
+# Test class: NodeDiscoveringNodeTypesTest
+javax.jcr.tck.NodeDiscoveringNodeTypesTest.testroot=/testdata
+
+# Test class: RepositoryDescriptorTest
+javax.jcr.tck.RepositoryDescriptorTest.testroot=/testdata
+
+# Test class: WorkspaceReadMethodsTest
+javax.jcr.tck.WorkspaceReadMethodsTest.testroot=/testdata
+
+# Test class: SessionReadMethodsTest
+javax.jcr.tck.SessionReadMethodsTest.testroot=/testdata
+
+# Test class: NamespaceRegistryReadMethodsTest
+javax.jcr.tck.NamespaceRegistryReadMethodsTest.testroot=/testdata
+
+# Test class: NamespaceRemappingTest
+javax.jcr.tck.NamespaceRemappingTest.testroot=/testdata
+
+# Test class: SessionTest
+# Test method: testMoveItemExistsException
+# nodetype that does not allow same name siblings
+javax.jcr.tck.SessionTest.testMoveItemExistsException.nodetype2=nt:folder
+# valid node type that can be added as child of nodetype2
+javax.jcr.tck.SessionTest.testMoveItemExistsException.nodetype3=nt:folder
+
+# Test class: SessionTest
+# Test method: testSaveContstraintViolationException
+# nodetype that has a property that is mandatory but not autocreated
+javax.jcr.tck.SessionTest.testSaveContstraintViolationException.nodetype2=nt:file
+
+# Test class: SessionUUIDTest
+# node type that has a property of type PropertyType.REFERENCE
+javax.jcr.tck.SessionUUIDTest.nodetype=nt:unstructured
+# name of the property that is of type PropertyType.REFERENCE
+javax.jcr.tck.SessionUUIDTest.propertyname1=foobar
+# nodetype that has nodetype mix:referenceable assigned
+javax.jcr.tck.SessionUUIDTest.nodetype2=test:refTargetNode
+
+# Test class: SessionUUIDTest
+# Test method: testSaveMovedRefNode
+# name of the property that can be modified
+javax.jcr.tck.SessionUUIDTest.testSaveMovedRefNode.propertyname1=foobar
+
+# Test class: NodeTest
+# Test method: testAddNodeItemExistsException
+# nodetype that does not allow same name siblings and allows child nodes of
+# the same type
+javax.jcr.tck.NodeTest.testAddNodeItemExistsException.nodetype=nt:folder
+
+# Test class: NodeTest
+# Test method: testRemoveMandatoryNode
+# nodetype that has a mandatory child node definition
+javax.jcr.tck.NodeTest.testRemoveMandatoryNode.nodetype2=nt:file
+# nodetype of the mandatory child
+javax.jcr.tck.NodeTest.testRemoveMandatoryNode.nodetype3=nt:unstructured
+# name of the mandatory node
+javax.jcr.tck.NodeTest.testRemoveMandatoryNode.nodename3=jcr:content
+
+# Test class: NodeTest
+# Test method: testSaveContstraintViolationException
+# nodetype that has a property that is mandatory but not autocreated
+javax.jcr.tck.NodeTest.testSaveContstraintViolationException.nodetype2=nt:file
+
+# Test class: NodeAddMixinTest
+# Test method: testAddInheritedMixin
+# the parent type should inherit a mixin type
+javax.jcr.tck.NodeAddMixinTest.testAddInheritedMixin.nodetype=test:setProperty
+
+# Test class: NodeUUIDTest
+# node type that has a property of type PropertyType.REFERENCE
+javax.jcr.tck.NodeUUIDTest.nodetype=nt:unstructured
+# name of the property that is of type PropertyType.REFERENCE
+javax.jcr.tck.NodeUUIDTest.propertyname1=ref
+# nodetype that has nodetype mix:referenceable assigned
+javax.jcr.tck.NodeUUIDTest.nodetype2=test:refTargetNode
+
+# Test class: NodeUUIDTest
+# Test method: testSaveMovedRefNode
+# name of the property that can be modified
+javax.jcr.tck.NodeUUIDTest.testSaveMovedRefNode.propertyname1=foobar
+# nodetype that has nodetype mix:referenceable assigned
+
+# Test class: NodeOrderableChildNodesTest
+# nodetype that supports orderable child nodes
+javax.jcr.tck.NodeOrderableChildNodesTest.nodetype2=nt:unstructured
+# valid node type that can be added as child of nodetype 2
+javax.jcr.tck.NodeOrderableChildNodesTest.nodetype3=nt:unstructured
+
+# Test class: NodeOrderableChildNodesTest
+# Test method: testOrderBeforeUnsupportedRepositoryOperationException
+# nodetype that does not allow ordering of child nodes
+javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype2=nt:folder
+# valid node type that can be added as child of nodetype 2
+javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype3=nt:folder
+
+# Test class: SetPropertyNodeTest
+# nodetype which is referenceable
+javax.jcr.tck.SetPropertyNodeTest.nodetype=test:setProperty
+
+# Test class: SetPropertyValueTest
+# property that allows multiple values
+javax.jcr.tck.SetPropertyValueTest.propertyname2=test:multiProperty
+javax.jcr.tck.SetPropertyValueTest.nodetype=test:setProperty
+
+# Test class: SetPropertyStringTest
+# property that allows multiple values
+javax.jcr.tck.SetPropertyStringTest.propertyname2=test:multiProperty
+javax.jcr.tck.SetPropertyStringTest.nodetype=test:setProperty
+
+# Test class: WorkspaceCloneSameNameSibsTest
+javax.jcr.tck.WorkspaceCloneSameNameSibsTest.sameNameSibsFalseNodeType=test:sameNameSibsFalseChildNodeDefinition
+javax.jcr.tck.WorkspaceCloneSameNameSibsTest.sameNameSibsTrueNodeType=nt:unstructured
+
+# Test class: WorkspaceCopyBetweenWorkspacesSameNameSibsTest
+javax.jcr.tck.WorkspaceCopyBetweenWorkspacesSameNameSibsTest.sameNameSibsFalseNodeType=test:sameNameSibsFalseChildNodeDefinition
+javax.jcr.tck.WorkspaceCopyBetweenWorkspacesSameNameSibsTest.sameNameSibsTrueNodeType=nt:unstructured
+
+# Test class: WorkspaceCopySameNameSibsTest
+javax.jcr.tck.WorkspaceCopySameNameSibsTest.sameNameSibsFalseNodeType=test:sameNameSibsFalseChildNodeDefinition
+javax.jcr.tck.WorkspaceCopySameNameSibsTest.sameNameSibsTrueNodeType=nt:unstructured
+
+# Test class: WorkspaceMoveSameNameSibsTest
+javax.jcr.tck.WorkspaceMoveSameNameSibsTest.sameNameSibsFalseNodeType=test:sameNameSibsFalseChildNodeDefinition
+javax.jcr.tck.WorkspaceMoveSameNameSibsTest.sameNameSibsTrueNodeType=nt:unstructured
+
+# Test class: RepositoryLoginTest
+javax.jcr.tck.RepositoryLoginTest.testroot=/testdata
+
+# Test class: RootNodeTest
+javax.jcr.tck.RootNodeTest.testroot=/testdata
+
+# Test class: ReferenceableRootNodesTest
+javax.jcr.tck.ReferenceableRootNodesTest.testroot=/testdata
+
+# Test class: ExportDocViewTest
+javax.jcr.tck.ExportDocViewTest.testroot=/testdata
+
+# ------------------------------------------------------------------------------
+# observation configuration
+# ------------------------------------------------------------------------------
+
+# Test class: AddEventListenerTest
+# Test method: testNodeType
+javax.jcr.tck.AddEventListenerTest.testNodeType.nodetype2=nt:folder
+
+# Configuration settings for the serialization.
+# Note that the serialization test tries to use as many features of the repository
+# as possible, but fails silently if a feature is not available. You have to
+# specify all of the following configuration entries, even if your repository does
+# not support the feature that is associated with them.
+
+# Root node for the example tree
+javax.jcr.tck.SerializationTest.testroot=/testdata/serialization
+
+# Node type to use for the example tree. Specify a node type that allows complex trees and all property types if possible
+javax.jcr.tck.SerializationTest.nodetype=nt:unstructured
+
+# Name of the nodes for source and target tree
+javax.jcr.tck.SerializationTest.sourceFolderName=source
+javax.jcr.tck.SerializationTest.targetFolderName=target
+javax.jcr.tck.SerializationTest.rootNodeName=test
+
+# List the properties whose values may change during serialization/deserialization. For example,
+# the UUID of a node is unique in the repository, so it will have to change when you re-import
+# a tree at a different location.
+javax.jcr.tck.SerializationTest.propertyValueMayChange= jcr:created jcr:uuid jcr:versionHistory jcr:baseVersion jcr:predecessors P_Reference
+
+# List all properties which are skipped during xml import according specification chapter 7.3.3
+javax.jcr.tck.SerializationTest.propertySkipped=
+
+# The name of the test node types. For easier diagnostics, the node types have names
+# that tell you the kind of information they store
+javax.jcr.tck.SerializationTest.nodeTypesTestNode=NodeTypes
+javax.jcr.tck.SerializationTest.mixinTypeTestNode=MixinTypes
+javax.jcr.tck.SerializationTest.propertyTypesTestNode=PropertyTypes
+javax.jcr.tck.SerializationTest.sameNameChildrenTestNode=SameNameChildren
+javax.jcr.tck.SerializationTest.multiValuePropertiesTestNode=MultiValueProperties
+javax.jcr.tck.SerializationTest.referenceableNodeTestNode=ReferenceableNode
+javax.jcr.tck.SerializationTest.orderChildrenTestNode=OrderChildren
+javax.jcr.tck.SerializationTest.namespaceTestNode=Namespace
+
+# The name of the test property types.
+javax.jcr.tck.SerializationTest.stringTestProperty=P_String
+javax.jcr.tck.SerializationTest.binaryTestProperty=P_Binary
+javax.jcr.tck.SerializationTest.dateTestProperty=P_Date
+javax.jcr.tck.SerializationTest.longTestProperty=P_Long
+javax.jcr.tck.SerializationTest.doubleTestProperty=P_Double
+javax.jcr.tck.SerializationTest.booleanTestProperty=P_Boolean
+javax.jcr.tck.SerializationTest.nameTestProperty=P_Name
+javax.jcr.tck.SerializationTest.pathTestProperty=P_Path
+javax.jcr.tck.SerializationTest.referenceTestProperty=P_Reference
+javax.jcr.tck.SerializationTest.multiValueTestProperty=P_MultiValue
+
+# node type not allowing same name sibs
+javax.jcr.tck.SerializationTest.sameNameSibsFalseChildNodeDefinition=test:sameNameSibsFalseChildNodeDefinition
+
+# Test method: testVersioningExceptionSessionFileChild
+# specified nodetype must be versionable and allow child nodes of the same type.
+javax.jcr.tck.SerializationTest.testVersioningExceptionSessionFileChild.nodetype=test:versionable
+
+# Test method: testVersioningExceptionSessionFileParent
+# specified nodetype must be versionable and allow child nodes of the same type.
+javax.jcr.tck.SerializationTest.testVersioningExceptionSessionFileParent.nodetype=test:versionable
+
+# Test method: testSessionImportXmlOverwriteException
+# requires a node type that does not allow same name siblings
+javax.jcr.tck.SerializationTest.testSessionImportXmlOverwriteException.nodetype=nt:folder
+
+# Test class: ExportSysViewTest
+javax.jcr.tck.ExportSysViewTest.testroot=/testdata
+
+# ==============================================================================
+# JAVAX.JCR.NODETYPE CONFIGURATION
+# ==============================================================================
+
+javax.jcr.tck.nodetype.testroot=/testdata
+
+javax.jcr.tck.NodeTypeCreationTest.testroot=/testroot
+
+# ==============================================================================
+# JAVAX.JCR.QUERY CONFIGURATION
+# ==============================================================================
+
+# Test class: SaveTest
+# Test method: testConstraintViolationException
+# Specified node type must not allow child nodes.
+javax.jcr.tck.SaveTest.testConstraintViolationException.nodetype=nt:query
+
+# Test class: XPathQueryLevel1Test
+javax.jcr.tck.XPathQueryLevel1Test.testroot=/testdata/query
+
+# Test class: XPathDocOrderTest
+javax.jcr.tck.XPathDocOrderTest.testroot=/testdata/query
+
+# Test class: XPathPosIndexTest
+javax.jcr.tck.XPathPosIndexTest.testroot=/testdata/query
+
+# Test class: XPathOrderByTest
+javax.jcr.tck.XPathOrderByTest.testroot=/testdata/query
+
+# Test class: XPathSyntaxTest
+javax.jcr.tck.XPathSyntaxTest.testroot=/testdata/query
+
+# Test class: XPathJcrPathTest
+javax.jcr.tck.XPathJcrPathTest.testroot=/testdata
+
+# Test class: SQLQueryLevel1Test
+javax.jcr.tck.SQLQueryLevel1Test.testroot=/testdata/query
+
+# Test class: SQLSyntaxTest
+javax.jcr.tck.SQLSyntaxTest.testroot=/testdata/query
+
+# Test class: SQLOrderByTest
+javax.jcr.tck.SQLOrderByTest.testroot=/testdata/query
+
+# Test class: DerefQueryLevel1Test
+javax.jcr.tck.DerefQueryLevel1Test.testroot=/testdata
+
+# Test class: GetLanguageTest
+javax.jcr.tck.GetLanguageTest.testroot=/testdata
+
+# Test class: GetPersistentQueryPathLevel1Test
+javax.jcr.tck.GetPersistentQueryPathLevel1Test.testroot=/testdata
+
+# Test class: GetPropertyNamesTest
+javax.jcr.tck.GetPropertyNamesTest.testroot=/testdata
+
+# Test class: GetStatementTest
+javax.jcr.tck.GetStatementTest.testroot=/testdata
+
+# Test class: GetSupportedQueryLanguagesTest
+javax.jcr.tck.GetSupportedQueryLanguagesTest.testroot=/testdata
+
+# Test class: SQLJcrPathTest
+javax.jcr.tck.SQLJcrPathTest.testroot=/testdata
+
+# Test class: SQLPathTest
+javax.jcr.tck.SQLPathTest.testroot=/testdata
+
+# Test class: PredicatesTest
+javax.jcr.tck.PredicatesTest.testroot=/testdata
+
+# Test class: SimpleSelectionTest
+javax.jcr.tck.SimpleSelectionTest.testroot=/testdata
+
+# ==============================================================================
+# JAVAX.JCR.VERSIONING CONFIGURATION
+# ==============================================================================
+
+# nodetype that is versionable. if it is not, an attempt is made to create versionable nodes
+# by adding a mix:versionable mixin-type.
+# NOTE: javax.jcr.tck.nodetype must define a non-versionable nodetype!
+javax.jcr.tck.version.versionableNodeType=test:versionable
+javax.jcr.tck.version.simpleVersionableNodeType=nt:unstructured
+javax.jcr.tck.version.propertyValue=aPropertyValue
+javax.jcr.tck.version.destination=/testroot/versionableNodeName3
+
+# testroot for the version package
+# the test root must allow versionable and non-versionable nodes being created below
+javax.jcr.tck.version.testroot=/testroot
+
+# 3 nodes (nodeName1, nodeName2, nodeName3 with nt=versionableNodeType / nt=nonVersionableNodeType will be cloned to 2nd workspace
+# nodename1 > used to persistently create versionable node below testroot
+# nodename2 > used to create second versionable node below testroot (used for restore/workspace.restore with uuid-conflict)
+# nodename3 > used to persistently create non-versionable node below testroot
+javax.jcr.tck.version.nodename1=versionableNodeName1
+javax.jcr.tck.version.nodename2=versionableNodeName2
+javax.jcr.tck.version.nodename3=nonVersionableNodeName1
+
+# nodename 4: versionabel child-node of the first versionable node with nodeName1 and nodetype 'versionableNodeType'
+# used for:
+# + creation of a node in the 2nd workspace, that does not exist in the first workspace
+# + creation of a node in the 2nd workspace, in order to test uuid-conflicts with Workspace.restore.
+# + creation of a sub-node in the default workspace, in order to test uuid-conflicts with Node.restore.
+# + NOTE: the nodetype with 'versionableNodeType' must define its children nodes to either have COPY or VERSION
+# OPV behaviour in order to successfully test Node.restore and Workspace.restore with uuid conflict.
+javax.jcr.tck.version.nodename4=childNodeName
+
+# path to existing String-properties and a new value for the property, that allows to test the indicated OPV behaviour
+javax.jcr.tck.OnParentVersionAbortTest.propertyname1=test:abortOnParentVersionProp
+javax.jcr.tck.OnParentVersionComputeTest.propertyname1=test:computeOnParentVersionProp
+javax.jcr.tck.OnParentVersionCopyTest.propertyname1=test:copyOnParentVersionProp
+javax.jcr.tck.OnParentVersionIgnoreTest.propertyname1=test:ignoreOnParentVersionProp
+javax.jcr.tck.OnParentVersionInitializeTest.propertyname1=test:initializeOnParentVersionProp
+
+# Test class: RestoreTest
+# Test method: testRestoreWithUUIDConflict
+# nodename4 must be the name of a child node with a OPV definition COPY or VERSION
+javax.jcr.tck.RestoreTest.testRestoreWithUUIDConflict.nodename4=test:versionOnParentVersion
+javax.jcr.tck.RestoreTest.testRestoreLabel.nodename4=test:versionOnParentVersion
+javax.jcr.tck.RestoreTest.testRestoreName.nodename4=test:versionOnParentVersion
+javax.jcr.tck.RestoreTest.propertyValue1=version1
+javax.jcr.tck.RestoreTest.propertyValue2=version2
+
+# Test class: WorkspaceRestoreTest
+javax.jcr.tck.WorkspaceRestoreTest.testRestoreLabel.nodename4=test:versionOnParentVersion
+javax.jcr.tck.WorkspaceRestoreTest.testRestoreName.nodename4=test:versionOnParentVersion
+
+# config for nodes that show the indicated OPV behaviour:
+# nodes are added in order to test the versioning behaviour indicated by the test-class name.
+# NOTE:
+# - nodename4 is uses as name for the childnode
+# - nodetype is used as nodetype name for the childnode
+# - the specified child node is created below nodename1 with versionableNodeType
+# the versionableNodeType and/or nodename1 may be overwritten with the individual
+# testclass below.
+javax.jcr.tck.OnParentVersionCopyTest.nodename4=test:copyOnParentVersion
+javax.jcr.tck.OnParentVersionCopyTest.nodetype=nt:unstructured
+javax.jcr.tck.OnParentVersionAbortTest.nodename4=test:abortOnParentVersion
+javax.jcr.tck.OnParentVersionAbortTest.nodetype=nt:unstructured
+javax.jcr.tck.OnParentVersionIgnoreTest.nodename4=test:ignoreOnParentVersion
+javax.jcr.tck.OnParentVersionIgnoreTest.nodetype=nt:unstructured
+
+# ==============================================================================
+# JAVAX.JCR.VERSIONING CONFIGURATION (simple versioning)
+# ==============================================================================
+
+# nodetype that is versionable. if it is not, an attempt is made to create versionable nodes
+# by adding a mix:versionable mixin-type.
+# NOTE: javax.jcr.tck.nodetype must define a non-versionable nodetype!
+javax.jcr.tck.simple.versionableNodeType=nt:unstructured
+javax.jcr.tck.simple.propertyValue=aPropertyValue
+javax.jcr.tck.simple.destination=/testroot/versionableNodeName3
+
+# testroot for the version package
+# the test root must allow versionable and non-versionable nodes being created below
+javax.jcr.tck.simple.testroot=/testroot
+
+# 3 nodes (nodeName1, nodeName2, nodeName3 with nt=versionableNodeType / nt=nonVersionableNodeType will be cloned to 2nd workspace
+# nodename1 > used to persistently create versionable node below testroot
+# nodename2 > used to create second versionable node below testroot (used for restore/workspace.restore with uuid-conflict)
+# nodename3 > used to persistently create non-versionable node below testroot
+javax.jcr.tck.simple.nodename1=versionableNodeName1
+javax.jcr.tck.simple.nodename2=versionableNodeName2
+javax.jcr.tck.simple.nodename3=nonVersionableNodeName1
+
+# nodename 4: versionabel child-node of the first versionable node with nodeName1 and nodetype 'versionableNodeType'
+# used for:
+# + creation of a node in the 2nd workspace, that does not exist in the first workspace
+# + creation of a node in the 2nd workspace, in order to test uuid-conflicts with Workspace.restore.
+# + creation of a sub-node in the default workspace, in order to test uuid-conflicts with Node.restore.
+# + NOTE: the nodetype with 'versionableNodeType' must define its children nodes to either have COPY or VERSION
+# OPV behaviour in order to successfully test Node.restore and Workspace.restore with uuid conflict.
+javax.jcr.tck.simple.nodename4=childNodeName
+
+# ==============================================================================
+# JAVAX.JCR.RETENTION CONFIGURATION
+# ==============================================================================
+javax.jcr.tck.retentionpolicyholder=/testconf/retentionTest
+
+# ==============================================================================
+# LIFECYCLE MANAGEMENT CONFIGURATION
+# ==============================================================================
+javax.jcr.tck.lifecycleNode=/testdata/lifecycle/node