jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1404144 [4/5] - in /jackrabbit/branches/2.2: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/management/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/observation/ jac...
Date Wed, 31 Oct 2012 14:06:13 GMT
Modified: jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/ContainerLoginFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/ContainerLoginFilter.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/ContainerLoginFilter.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/ContainerLoginFilter.java Wed Oct 31 14:06:06 2012
@@ -1,64 +1,64 @@
-/*
- * 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.servlet.login;
-
-import javax.jcr.Credentials;
-import javax.jcr.SimpleCredentials;
-import javax.servlet.FilterConfig;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Login filter that relies on container authentication to provide the
- * authenticated username of a request. This username is associated with
- * a dummy password (empty by default, configurable through the init
- * parameter "password") in a {@link SimpleCredentials} object that is
- * used to log in to the underlying content repository. If no authenticated
- * user is found, then <code>null</code> credentials are used.
- * <p>
- * It is expected that the underlying repository is configured to simply
- * trust the given username. If the same repository is also made available
- * for direct logins, then a special secret password that allows logins with
- * any username could be configured just for this filter.
- *
- * @since Apache Jackrabbit 1.6
- */
-public class ContainerLoginFilter extends AbstractLoginFilter {
-
-    /**
-     * The dummy password used for the repository login. Empty by default.
-     */
-    private char[] password = new char[0];
-
-    public void init(FilterConfig config) {
-        super.init(config);
-
-        String password = config.getInitParameter("password");
-        if (password != null) {
-            this.password = password.toCharArray();
-        }
-    }
-
-    protected Credentials getCredentials(HttpServletRequest request) {
-        String user = request.getRemoteUser();
-        if (user != null) {
-            return new SimpleCredentials(user, password);
-        } else {
-            return null;
-        }
-    }
-
-}
+/*
+ * 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.servlet.login;
+
+import javax.jcr.Credentials;
+import javax.jcr.SimpleCredentials;
+import javax.servlet.FilterConfig;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Login filter that relies on container authentication to provide the
+ * authenticated username of a request. This username is associated with
+ * a dummy password (empty by default, configurable through the init
+ * parameter "password") in a {@link SimpleCredentials} object that is
+ * used to log in to the underlying content repository. If no authenticated
+ * user is found, then <code>null</code> credentials are used.
+ * <p>
+ * It is expected that the underlying repository is configured to simply
+ * trust the given username. If the same repository is also made available
+ * for direct logins, then a special secret password that allows logins with
+ * any username could be configured just for this filter.
+ *
+ * @since Apache Jackrabbit 1.6
+ */
+public class ContainerLoginFilter extends AbstractLoginFilter {
+
+    /**
+     * The dummy password used for the repository login. Empty by default.
+     */
+    private char[] password = new char[0];
+
+    public void init(FilterConfig config) {
+        super.init(config);
+
+        String password = config.getInitParameter("password");
+        if (password != null) {
+            this.password = password.toCharArray();
+        }
+    }
+
+    protected Credentials getCredentials(HttpServletRequest request) {
+        String user = request.getRemoteUser();
+        if (user != null) {
+            return new SimpleCredentials(user, password);
+        } else {
+            return null;
+        }
+    }
+
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/ContainerLoginFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/NullLoginFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/NullLoginFilter.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/NullLoginFilter.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/NullLoginFilter.java Wed Oct 31 14:06:06 2012
@@ -1,43 +1,43 @@
-/*
- * 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.servlet.login;
-
-import javax.jcr.Credentials;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Login filter that always uses <code>null</code> credentials for logging in
- * to the content repository. This is useful for example for public web sites
- * where all repository access is performed using anonymous sessions. Another
- * use case for this login filter is when login information is made available
- * to the content repository through JAAS or some other out-of-band mechanism.
- *
- * @since Apache Jackrabbit 1.6
- */
-public class NullLoginFilter extends AbstractLoginFilter {
-
-    /**
-     * Always returns <code>null</code>.
-     *
-     * @param request ignored
-     * @return <code>null</code> credentials
-     */
-    protected Credentials getCredentials(HttpServletRequest request) {
-        return null;
-    }
-
-}
+/*
+ * 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.servlet.login;
+
+import javax.jcr.Credentials;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Login filter that always uses <code>null</code> credentials for logging in
+ * to the content repository. This is useful for example for public web sites
+ * where all repository access is performed using anonymous sessions. Another
+ * use case for this login filter is when login information is made available
+ * to the content repository through JAAS or some other out-of-band mechanism.
+ *
+ * @since Apache Jackrabbit 1.6
+ */
+public class NullLoginFilter extends AbstractLoginFilter {
+
+    /**
+     * Always returns <code>null</code>.
+     *
+     * @param request ignored
+     * @return <code>null</code> credentials
+     */
+    protected Credentials getCredentials(HttpServletRequest request) {
+        return null;
+    }
+
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr-servlet/src/main/java/org/apache/jackrabbit/servlet/login/NullLoginFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NameTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PathTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SetValueInputStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/util/InputStreamWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrLockManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeDefinitionProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateActivity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/CreateConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/TransientOperationVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java Wed Oct 31 14:06:06 2012
@@ -1,110 +1,110 @@
-/*
- * 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.jcr2spi.operation;
-
-import org.apache.jackrabbit.jcr2spi.state.NodeState;
-import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
-import org.apache.jackrabbit.spi.NodeId;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.AccessDeniedException;
-import javax.jcr.ItemExistsException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ImportUUIDBehavior;
-import javax.jcr.version.VersionException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import java.io.InputStream;
-
-/**
- * <code>WorkspaceImport</code>...
- */
-public class WorkspaceImport extends AbstractOperation {
-
-    private final NodeState nodeState;
-    private final InputStream xmlStream;
-    private final int uuidBehaviour;
-
-    private WorkspaceImport(NodeState nodeState, InputStream xmlStream, int uuidBehaviour) {
-        if (nodeState == null || xmlStream == null) {
-            throw new IllegalArgumentException();
-        }
-        this.nodeState = nodeState;
-        this.xmlStream = xmlStream;
-        this.uuidBehaviour = uuidBehaviour;
-
-        // NOTE: affected-states only needed for transient modifications
-    }
-
-    //----------------------------------------------------------< Operation >---
-    /**
-     * @see Operation#accept(OperationVisitor)
-     */
-    public void accept(OperationVisitor visitor) throws RepositoryException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException {
-        assert status == STATUS_PENDING;
-        visitor.visit(this);
-    }
-
-    /**
-     * Invalidates the <code>NodeState</code> that has been updated and all
-     * its decendants.
-     *
-     * @see Operation#persisted()
-     */
-    public void persisted() {
-        assert status == STATUS_PENDING;
-        status = STATUS_PERSISTED;
-        NodeEntry entry;
-        if (uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING ||
-                uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING) {
-            // invalidate the complete tree
-            entry = nodeState.getNodeEntry();
-            while (entry.getParent() != null) {
-                entry = entry.getParent();
-            }
-            entry.invalidate(true);
-        } else {
-            // import only added new items below the import target. therefore
-            // recursive invalidation is not required. // TODO correct?
-            nodeState.getNodeEntry().invalidate(false);
-        }
-    }
-
-    //----------------------------------------< Access Operation Parameters >---
-    public NodeId getNodeId() throws RepositoryException {
-        return nodeState.getNodeId();
-    }
-
-    public InputStream getXmlStream() {
-        return xmlStream;
-    }
-
-    public int getUuidBehaviour() {
-        return uuidBehaviour;
-    }
-
-    //------------------------------------------------------------< Factory >---
-    /**
-     *
-     * @param nodeState
-     * @param xmlStream
-     * @return
-     */
-    public static Operation create(NodeState nodeState, InputStream xmlStream, int uuidBehaviour) {
-        return new WorkspaceImport(nodeState, xmlStream, uuidBehaviour);
-    }
-}
+/*
+ * 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.jcr2spi.operation;
+
+import org.apache.jackrabbit.jcr2spi.state.NodeState;
+import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
+import org.apache.jackrabbit.spi.NodeId;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.ItemExistsException;
+import javax.jcr.UnsupportedRepositoryOperationException;
+import javax.jcr.ImportUUIDBehavior;
+import javax.jcr.version.VersionException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import java.io.InputStream;
+
+/**
+ * <code>WorkspaceImport</code>...
+ */
+public class WorkspaceImport extends AbstractOperation {
+
+    private final NodeState nodeState;
+    private final InputStream xmlStream;
+    private final int uuidBehaviour;
+
+    private WorkspaceImport(NodeState nodeState, InputStream xmlStream, int uuidBehaviour) {
+        if (nodeState == null || xmlStream == null) {
+            throw new IllegalArgumentException();
+        }
+        this.nodeState = nodeState;
+        this.xmlStream = xmlStream;
+        this.uuidBehaviour = uuidBehaviour;
+
+        // NOTE: affected-states only needed for transient modifications
+    }
+
+    //----------------------------------------------------------< Operation >---
+    /**
+     * @see Operation#accept(OperationVisitor)
+     */
+    public void accept(OperationVisitor visitor) throws RepositoryException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException {
+        assert status == STATUS_PENDING;
+        visitor.visit(this);
+    }
+
+    /**
+     * Invalidates the <code>NodeState</code> that has been updated and all
+     * its decendants.
+     *
+     * @see Operation#persisted()
+     */
+    public void persisted() {
+        assert status == STATUS_PENDING;
+        status = STATUS_PERSISTED;
+        NodeEntry entry;
+        if (uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING ||
+                uuidBehaviour == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING) {
+            // invalidate the complete tree
+            entry = nodeState.getNodeEntry();
+            while (entry.getParent() != null) {
+                entry = entry.getParent();
+            }
+            entry.invalidate(true);
+        } else {
+            // import only added new items below the import target. therefore
+            // recursive invalidation is not required. // TODO correct?
+            nodeState.getNodeEntry().invalidate(false);
+        }
+    }
+
+    //----------------------------------------< Access Operation Parameters >---
+    public NodeId getNodeId() throws RepositoryException {
+        return nodeState.getNodeId();
+    }
+
+    public InputStream getXmlStream() {
+        return xmlStream;
+    }
+
+    public int getUuidBehaviour() {
+        return uuidBehaviour;
+    }
+
+    //------------------------------------------------------------< Factory >---
+    /**
+     *
+     * @param nodeState
+     * @param xmlStream
+     * @return
+     */
+    public static Operation create(NodeState nodeState, InputStream xmlStream, int uuidBehaviour) {
+        return new WorkspaceImport(nodeState, xmlStream, uuidBehaviour);
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java Wed Oct 31 14:06:06 2012
@@ -1,45 +1,45 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.ItemExistsException;
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderMixedTest</code>...
- */
-public class ReorderMixedTest extends ReorderTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderMixedTest.class);
-
-    @Override
-    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
-        child1 = testRootNode.addNode(nodeName2, testNodeType);
-        child2 = testRootNode.addNode(nodeName4, testNodeType);
-        child3 = testRootNode.addNode(nodeName2, testNodeType);
-        child4 = testRootNode.addNode(nodeName2, testNodeType);
-
-        testRootNode.save();
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.ItemExistsException;
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderMixedTest</code>...
+ */
+public class ReorderMixedTest extends ReorderTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderMixedTest.class);
+
+    @Override
+    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
+        child1 = testRootNode.addNode(nodeName2, testNodeType);
+        child2 = testRootNode.addNode(nodeName4, testNodeType);
+        child3 = testRootNode.addNode(nodeName2, testNodeType);
+        child4 = testRootNode.addNode(nodeName2, testNodeType);
+
+        testRootNode.save();
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMixedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java Wed Oct 31 14:06:06 2012
@@ -1,257 +1,257 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-
-import org.apache.jackrabbit.spi.Path;
-import org.apache.jackrabbit.test.AbstractJCRTest;
-import org.apache.jackrabbit.test.NotExecutableException;
-import org.apache.jackrabbit.util.Text;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderMoveTest</code> testing various combinations of move/rename
- * and reorder with and without intermediate save, revert and other transient
- * modifications.
- */
-public class ReorderMoveTest extends AbstractJCRTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderMoveTest.class);
-
-    private Node destParent;
-    private Node srcParent;
-    private String destPath;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        if (!testRootNode.getPrimaryNodeType().hasOrderableChildNodes()) {
-            throw new NotExecutableException("Test node does not have orderable children.");
-        }
-
-        // create move-destination
-        destParent = testRootNode.addNode(nodeName4, testNodeType);
-        srcParent = testRootNode.addNode(nodeName2, testNodeType);
-
-        destPath = destParent.getPath() + "/" + nodeName3;
-        testRootNode.save();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        destParent = null;
-        srcParent = null;
-        super.tearDown();
-    }
-
-   private Node[] createOrderableChildren(boolean sns) throws RepositoryException {
-        String[] childNames;
-        if (sns) {
-            childNames = new String[] {nodeName2, nodeName2, nodeName2, nodeName2};
-        } else {
-            childNames = new String[] {nodeName1, nodeName2, nodeName3, nodeName4};
-        }
-        Node[] children = new Node[4];
-        children[0] = srcParent.addNode(childNames[0], testNodeType);
-        children[1] = srcParent.addNode(childNames[1], testNodeType);
-        children[2] = srcParent.addNode(childNames[2], testNodeType);
-        children[3] = srcParent.addNode(childNames[3], testNodeType);
-
-        testRootNode.save();
-        return children;
-   }
-
-    private static String getRelPath(Node child) throws RepositoryException {
-        if (child == null) {
-            return null;
-        }
-        String path = child.getPath();
-        return path.substring(path.lastIndexOf('/')+1);
-    }
-
-    private static void testOrder(Node parent, Node[] children) throws RepositoryException {
-        NodeIterator it = parent.getNodes();
-        int i = 0;
-        while (it.hasNext()) {
-            Node child = it.nextNode();
-            assertTrue(child.isSame(children[i]));
-            i++;
-        }
-    }
-
-    /**
-     * Move a orderable child node and reorder the remaining nodes.
-     */
-    public void testMoveAndReorder() throws RepositoryException {
-        Node[] children = createOrderableChildren(false);
-        String oldName = children[2].getName();
-        // move
-        testRootNode.getSession().move(children[2].getPath(), destPath);
-        // reorder
-        srcParent.orderBefore(getRelPath(children[1]), null);
-        testOrder(srcParent, new Node[] {children[0], children[3], children[1]});
-
-        testRootNode.save();
-        testOrder(srcParent, new Node[] {children[0], children[3], children[1]});
-        assertFalse(srcParent.hasNode(oldName));
-    }
-
-    /**
-     * Move a orderable SNS-node and reorder the remaining nodes at source-parent.
-     */
-    public void testMoveAndReorderSNS() throws RepositoryException {
-        Node[] children = createOrderableChildren(true);
-        String snsName = children[0].getName();
-
-        // move
-        testRootNode.getSession().move(children[2].getPath(), destPath);
-        testRootNode.getSession().move(children[1].getPath(), destPath);
-
-        // reorder
-        srcParent.orderBefore(getRelPath(children[0]), null);
-        testOrder(srcParent, new Node[] {children[3], children[0]});
-        assertTrue(srcParent.hasNode(snsName+"[1]"));
-        assertTrue(srcParent.hasNode(snsName+"[2]"));
-        assertFalse(srcParent.hasNode(snsName+"[3]"));
-        assertFalse(srcParent.hasNode(snsName+"[4]"));
-        assertFalse(srcParent.hasNode(snsName+"[5]"));
-
-        testRootNode.save();
-        testOrder(srcParent, new Node[] {children[3], children[0]});
-        assertTrue(srcParent.hasNode(snsName+"[1]"));
-        assertTrue(srcParent.hasNode(snsName+"[2]"));
-        assertFalse(srcParent.hasNode(snsName+"[3]"));
-        assertFalse(srcParent.hasNode(snsName+"[4]"));
-        assertFalse(srcParent.hasNode(snsName+"[5]"));
-
-        // check if move have been successful
-        assertEquals(children[2].getPath(), destPath);
-        assertTrue(children[2].getIndex() == Path.INDEX_DEFAULT);
-        assertEquals(children[1].getPath(), destPath+"[2]");
-    }
-
-    /**
-     * Reorder nodes and move one of the reordered siblings
-     * away. Test the ordering of the remaining siblings.
-     */
-    public void testReorderAndMove() throws RepositoryException {
-        Node[] children = createOrderableChildren(false);
-
-        // reorder first
-        srcParent.orderBefore(getRelPath(children[0]), null);
-        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[1]));
-        // move
-        testRootNode.getSession().move(children[3].getPath(), destPath);
-
-        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
-
-        testRootNode.save();
-        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
-    }
-
-    /**
-     * Reorder same-name-sibling nodes and move one of the reordered siblings
-     * away. Test the ordering of the remaining siblings.
-     */
-    public void testReorderAndMoveSNS() throws RepositoryException {
-        Node[] children = createOrderableChildren(true);
-
-        // reorder first
-        srcParent.orderBefore(getRelPath(children[0]), null);
-        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[1]));
-        // move
-        testRootNode.getSession().move(children[3].getPath(), destPath);
-
-        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
-
-        testRootNode.save();
-        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
-    }
-
-    /**
-     * Any attempt reorder a moved node at its original position must fail.
-     */
-    public void testReorderMovedNode() throws RepositoryException {
-        Node[] children = createOrderableChildren(false);
-
-        String relPath = getRelPath(children[2]);
-        testRootNode.getSession().move(children[2].getPath(), destPath);
-
-        try {
-            srcParent.orderBefore(relPath, null);
-            fail("Reordering a child node that has been moved away must fail.");
-        } catch (ItemNotFoundException e) {
-            // ok
-        }
-    }
-
-    /**
-     * Move a SNS-node and reorder its original siblings afterwards.
-     * Test if reverting the changes results in the original ordering and
-     * hierarchy.
-     */
-    public void testRevertMoveAndReorderSNS() throws RepositoryException {
-        Node[] children = createOrderableChildren(true);
-        // move then reorder
-        testRootNode.getSession().move(children[2].getPath(), destPath);
-        srcParent.orderBefore(getRelPath(children[1]), null);
-        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[0]));
-
-        testRootNode.refresh(false);
-        testOrder(srcParent, new Node[] {children[0], children[1], children[2], children[3]});
-        assertFalse(destParent.hasNode(Text.getName(destPath)));
-    }
-
-    /**
-     * Move a SNS-node, that got its siblings reordered before.
-     * Test if reverting the changes results in the original ordering and
-     * hierarchy.
-     */
-    public void testRevertReorderAndMoveSNS() throws RepositoryException {
-        Node[] children = createOrderableChildren(true);
-        // reorder then move
-        srcParent.orderBefore(getRelPath(children[1]), null);
-        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[2]));
-        srcParent.getSession().move(children[2].getPath(), destPath);
-
-        testRootNode.refresh(false);
-        testOrder(srcParent, new Node[] {children[0], children[1], children[2], children[3]});
-        assertFalse(destParent.hasNode(Text.getName(destPath)));
-    }
-
-    /**
-     * Move a SNS-node, that has been reordered before.
-     * Test if reverting the changes results in the original ordering and
-     * hierarchy.
-     */
-    public void testRevertMoveReorderedSNS() throws RepositoryException {
-        Node[] children = createOrderableChildren(true);
-        // reorder then move
-        srcParent.orderBefore(getRelPath(children[1]), null);
-        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[2]));
-        srcParent.getSession().move(children[1].getPath(), destPath);
-
-        testRootNode.refresh(false);
-        testOrder(srcParent, new Node[] {children[0], children[1], children[2], children[3]});
-        assertFalse(destParent.hasNode(Text.getName(destPath)));
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+
+import org.apache.jackrabbit.spi.Path;
+import org.apache.jackrabbit.test.AbstractJCRTest;
+import org.apache.jackrabbit.test.NotExecutableException;
+import org.apache.jackrabbit.util.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderMoveTest</code> testing various combinations of move/rename
+ * and reorder with and without intermediate save, revert and other transient
+ * modifications.
+ */
+public class ReorderMoveTest extends AbstractJCRTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderMoveTest.class);
+
+    private Node destParent;
+    private Node srcParent;
+    private String destPath;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        if (!testRootNode.getPrimaryNodeType().hasOrderableChildNodes()) {
+            throw new NotExecutableException("Test node does not have orderable children.");
+        }
+
+        // create move-destination
+        destParent = testRootNode.addNode(nodeName4, testNodeType);
+        srcParent = testRootNode.addNode(nodeName2, testNodeType);
+
+        destPath = destParent.getPath() + "/" + nodeName3;
+        testRootNode.save();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        destParent = null;
+        srcParent = null;
+        super.tearDown();
+    }
+
+   private Node[] createOrderableChildren(boolean sns) throws RepositoryException {
+        String[] childNames;
+        if (sns) {
+            childNames = new String[] {nodeName2, nodeName2, nodeName2, nodeName2};
+        } else {
+            childNames = new String[] {nodeName1, nodeName2, nodeName3, nodeName4};
+        }
+        Node[] children = new Node[4];
+        children[0] = srcParent.addNode(childNames[0], testNodeType);
+        children[1] = srcParent.addNode(childNames[1], testNodeType);
+        children[2] = srcParent.addNode(childNames[2], testNodeType);
+        children[3] = srcParent.addNode(childNames[3], testNodeType);
+
+        testRootNode.save();
+        return children;
+   }
+
+    private static String getRelPath(Node child) throws RepositoryException {
+        if (child == null) {
+            return null;
+        }
+        String path = child.getPath();
+        return path.substring(path.lastIndexOf('/')+1);
+    }
+
+    private static void testOrder(Node parent, Node[] children) throws RepositoryException {
+        NodeIterator it = parent.getNodes();
+        int i = 0;
+        while (it.hasNext()) {
+            Node child = it.nextNode();
+            assertTrue(child.isSame(children[i]));
+            i++;
+        }
+    }
+
+    /**
+     * Move a orderable child node and reorder the remaining nodes.
+     */
+    public void testMoveAndReorder() throws RepositoryException {
+        Node[] children = createOrderableChildren(false);
+        String oldName = children[2].getName();
+        // move
+        testRootNode.getSession().move(children[2].getPath(), destPath);
+        // reorder
+        srcParent.orderBefore(getRelPath(children[1]), null);
+        testOrder(srcParent, new Node[] {children[0], children[3], children[1]});
+
+        testRootNode.save();
+        testOrder(srcParent, new Node[] {children[0], children[3], children[1]});
+        assertFalse(srcParent.hasNode(oldName));
+    }
+
+    /**
+     * Move a orderable SNS-node and reorder the remaining nodes at source-parent.
+     */
+    public void testMoveAndReorderSNS() throws RepositoryException {
+        Node[] children = createOrderableChildren(true);
+        String snsName = children[0].getName();
+
+        // move
+        testRootNode.getSession().move(children[2].getPath(), destPath);
+        testRootNode.getSession().move(children[1].getPath(), destPath);
+
+        // reorder
+        srcParent.orderBefore(getRelPath(children[0]), null);
+        testOrder(srcParent, new Node[] {children[3], children[0]});
+        assertTrue(srcParent.hasNode(snsName+"[1]"));
+        assertTrue(srcParent.hasNode(snsName+"[2]"));
+        assertFalse(srcParent.hasNode(snsName+"[3]"));
+        assertFalse(srcParent.hasNode(snsName+"[4]"));
+        assertFalse(srcParent.hasNode(snsName+"[5]"));
+
+        testRootNode.save();
+        testOrder(srcParent, new Node[] {children[3], children[0]});
+        assertTrue(srcParent.hasNode(snsName+"[1]"));
+        assertTrue(srcParent.hasNode(snsName+"[2]"));
+        assertFalse(srcParent.hasNode(snsName+"[3]"));
+        assertFalse(srcParent.hasNode(snsName+"[4]"));
+        assertFalse(srcParent.hasNode(snsName+"[5]"));
+
+        // check if move have been successful
+        assertEquals(children[2].getPath(), destPath);
+        assertTrue(children[2].getIndex() == Path.INDEX_DEFAULT);
+        assertEquals(children[1].getPath(), destPath+"[2]");
+    }
+
+    /**
+     * Reorder nodes and move one of the reordered siblings
+     * away. Test the ordering of the remaining siblings.
+     */
+    public void testReorderAndMove() throws RepositoryException {
+        Node[] children = createOrderableChildren(false);
+
+        // reorder first
+        srcParent.orderBefore(getRelPath(children[0]), null);
+        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[1]));
+        // move
+        testRootNode.getSession().move(children[3].getPath(), destPath);
+
+        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
+
+        testRootNode.save();
+        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
+    }
+
+    /**
+     * Reorder same-name-sibling nodes and move one of the reordered siblings
+     * away. Test the ordering of the remaining siblings.
+     */
+    public void testReorderAndMoveSNS() throws RepositoryException {
+        Node[] children = createOrderableChildren(true);
+
+        // reorder first
+        srcParent.orderBefore(getRelPath(children[0]), null);
+        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[1]));
+        // move
+        testRootNode.getSession().move(children[3].getPath(), destPath);
+
+        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
+
+        testRootNode.save();
+        testOrder(srcParent, new Node[] {children[1], children[2], children[0]});
+    }
+
+    /**
+     * Any attempt reorder a moved node at its original position must fail.
+     */
+    public void testReorderMovedNode() throws RepositoryException {
+        Node[] children = createOrderableChildren(false);
+
+        String relPath = getRelPath(children[2]);
+        testRootNode.getSession().move(children[2].getPath(), destPath);
+
+        try {
+            srcParent.orderBefore(relPath, null);
+            fail("Reordering a child node that has been moved away must fail.");
+        } catch (ItemNotFoundException e) {
+            // ok
+        }
+    }
+
+    /**
+     * Move a SNS-node and reorder its original siblings afterwards.
+     * Test if reverting the changes results in the original ordering and
+     * hierarchy.
+     */
+    public void testRevertMoveAndReorderSNS() throws RepositoryException {
+        Node[] children = createOrderableChildren(true);
+        // move then reorder
+        testRootNode.getSession().move(children[2].getPath(), destPath);
+        srcParent.orderBefore(getRelPath(children[1]), null);
+        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[0]));
+
+        testRootNode.refresh(false);
+        testOrder(srcParent, new Node[] {children[0], children[1], children[2], children[3]});
+        assertFalse(destParent.hasNode(Text.getName(destPath)));
+    }
+
+    /**
+     * Move a SNS-node, that got its siblings reordered before.
+     * Test if reverting the changes results in the original ordering and
+     * hierarchy.
+     */
+    public void testRevertReorderAndMoveSNS() throws RepositoryException {
+        Node[] children = createOrderableChildren(true);
+        // reorder then move
+        srcParent.orderBefore(getRelPath(children[1]), null);
+        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[2]));
+        srcParent.getSession().move(children[2].getPath(), destPath);
+
+        testRootNode.refresh(false);
+        testOrder(srcParent, new Node[] {children[0], children[1], children[2], children[3]});
+        assertFalse(destParent.hasNode(Text.getName(destPath)));
+    }
+
+    /**
+     * Move a SNS-node, that has been reordered before.
+     * Test if reverting the changes results in the original ordering and
+     * hierarchy.
+     */
+    public void testRevertMoveReorderedSNS() throws RepositoryException {
+        Node[] children = createOrderableChildren(true);
+        // reorder then move
+        srcParent.orderBefore(getRelPath(children[1]), null);
+        srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[2]));
+        srcParent.getSession().move(children[1].getPath(), destPath);
+
+        testRootNode.refresh(false);
+        testOrder(srcParent, new Node[] {children[0], children[1], children[2], children[3]});
+        assertFalse(destParent.hasNode(Text.getName(destPath)));
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java Wed Oct 31 14:06:06 2012
@@ -1,64 +1,64 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.ItemExistsException;
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderNewAndSavedTest</code>...
- */
-public class ReorderNewAndSavedTest extends ReorderTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderNewAndSavedTest.class);
-
-    @Override
-    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
-        child1 = testRootNode.addNode(nodeName1, testNodeType);
-        child2 = testRootNode.addNode(nodeName2, testNodeType);
-        testRootNode.save();
-
-        child3 = testRootNode.addNode(nodeName3, testNodeType);
-        child4 = testRootNode.addNode(nodeName4, testNodeType);
-    }
-
-    @Override
-    public void testRevertReorder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
-        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
-
-        testRootNode.refresh(false);
-        testOrder(testRootNode, new Node[] { child1, child2 });
-    }
-
-    @Override
-    public void testRevertReorderToEnd() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child1), null);
-        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
-
-        testRootNode.refresh(false);
-        testOrder(testRootNode, new Node[] { child1, child2 });
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderNewAndSavedTest</code>...
+ */
+public class ReorderNewAndSavedTest extends ReorderTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderNewAndSavedTest.class);
+
+    @Override
+    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
+        child1 = testRootNode.addNode(nodeName1, testNodeType);
+        child2 = testRootNode.addNode(nodeName2, testNodeType);
+        testRootNode.save();
+
+        child3 = testRootNode.addNode(nodeName3, testNodeType);
+        child4 = testRootNode.addNode(nodeName4, testNodeType);
+    }
+
+    @Override
+    public void testRevertReorder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
+        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
+
+        testRootNode.refresh(false);
+        testOrder(testRootNode, new Node[] { child1, child2 });
+    }
+
+    @Override
+    public void testRevertReorderToEnd() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child1), null);
+        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
+
+        testRootNode.refresh(false);
+        testOrder(testRootNode, new Node[] { child1, child2 });
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewAndSavedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java Wed Oct 31 14:06:06 2012
@@ -1,71 +1,71 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.ItemExistsException;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderNewSNSTest</code>...
- */
-public class ReorderNewSNSTest extends ReorderTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderNewSNSTest.class);
-
-    @Override
-    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
-        child1 = testRootNode.addNode(nodeName2, testNodeType);
-        child2 = testRootNode.addNode(nodeName2, testNodeType);
-        child3 = testRootNode.addNode(nodeName2, testNodeType);
-        child4 = testRootNode.addNode(nodeName2, testNodeType);
-    }
-
-    @Override
-    public void testRevertReorder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
-        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
-
-        // NEW child nodes -> must be removed upon refresh
-        testRootNode.refresh(false);
-        NodeIterator it = testRootNode.getNodes(nodeName2);
-        if (it.hasNext()) {
-            fail("Reverting creation and reordering of new SNSs must remove the children again.");
-        }
-    }
-
-    @Override
-    public void testRevertReorderToEnd() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child1), null);
-        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
-
-        // NEW child nodes -> must be removed upon refresh
-        testRootNode.refresh(false);
-        NodeIterator it = testRootNode.getNodes(nodeName2);
-        if (it.hasNext()) {
-            fail("Reverting creation and reordering of new SNSs must remove the children again.");
-        }
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderNewSNSTest</code>...
+ */
+public class ReorderNewSNSTest extends ReorderTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderNewSNSTest.class);
+
+    @Override
+    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
+        child1 = testRootNode.addNode(nodeName2, testNodeType);
+        child2 = testRootNode.addNode(nodeName2, testNodeType);
+        child3 = testRootNode.addNode(nodeName2, testNodeType);
+        child4 = testRootNode.addNode(nodeName2, testNodeType);
+    }
+
+    @Override
+    public void testRevertReorder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
+        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
+
+        // NEW child nodes -> must be removed upon refresh
+        testRootNode.refresh(false);
+        NodeIterator it = testRootNode.getNodes(nodeName2);
+        if (it.hasNext()) {
+            fail("Reverting creation and reordering of new SNSs must remove the children again.");
+        }
+    }
+
+    @Override
+    public void testRevertReorderToEnd() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child1), null);
+        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
+
+        // NEW child nodes -> must be removed upon refresh
+        testRootNode.refresh(false);
+        NodeIterator it = testRootNode.getNodes(nodeName2);
+        if (it.hasNext()) {
+            fail("Reverting creation and reordering of new SNSs must remove the children again.");
+        }
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewSNSTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java Wed Oct 31 14:06:06 2012
@@ -1,71 +1,71 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.ItemExistsException;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderNewTest</code>...
- */
-public class ReorderNewTest extends ReorderTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderNewTest.class);
-
-    @Override
-    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
-        child1 = testRootNode.addNode(nodeName1, testNodeType);
-        child2 = testRootNode.addNode(nodeName2, testNodeType);
-        child3 = testRootNode.addNode(nodeName3, testNodeType);
-        child4 = testRootNode.addNode(nodeName4, testNodeType);
-    }
-
-    @Override
-    public void testRevertReorder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
-        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
-
-        // NEW child nodes -> must be removed upon refresh
-        testRootNode.refresh(false);
-        NodeIterator it = testRootNode.getNodes();
-        if (it.hasNext()) {
-            fail("Reverting creation and reordering of new children must remove the children again.");
-        }
-    }
-
-    @Override
-    public void testRevertReorderToEnd() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child1), null);
-        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
-
-        // NEW child nodes -> must be removed upon refresh
-        testRootNode.refresh(false);
-        NodeIterator it = testRootNode.getNodes();
-        if (it.hasNext()) {
-            fail("Reverting creation and reordering of new children must remove the children again.");
-        }
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.ItemExistsException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderNewTest</code>...
+ */
+public class ReorderNewTest extends ReorderTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderNewTest.class);
+
+    @Override
+    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
+        child1 = testRootNode.addNode(nodeName1, testNodeType);
+        child2 = testRootNode.addNode(nodeName2, testNodeType);
+        child3 = testRootNode.addNode(nodeName3, testNodeType);
+        child4 = testRootNode.addNode(nodeName4, testNodeType);
+    }
+
+    @Override
+    public void testRevertReorder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child4), getRelPath(child2));
+        testOrder(testRootNode, new Node[] { child1, child4, child2, child3});
+
+        // NEW child nodes -> must be removed upon refresh
+        testRootNode.refresh(false);
+        NodeIterator it = testRootNode.getNodes();
+        if (it.hasNext()) {
+            fail("Reverting creation and reordering of new children must remove the children again.");
+        }
+    }
+
+    @Override
+    public void testRevertReorderToEnd() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child1), null);
+        testOrder(testRootNode, new Node[] { child2, child3, child4, child1});
+
+        // NEW child nodes -> must be removed upon refresh
+        testRootNode.refresh(false);
+        NodeIterator it = testRootNode.getNodes();
+        if (it.hasNext()) {
+            fail("Reverting creation and reordering of new children must remove the children again.");
+        }
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderNewTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java Wed Oct 31 14:06:06 2012
@@ -1,49 +1,49 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-
-import org.apache.jackrabbit.test.NotExecutableException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderSNSTest</code>...
- */
-public class ReorderReferenceableSNSTest extends ReorderTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderReferenceableSNSTest.class);
-
-    @Override
-    protected void createOrderableChildren() throws RepositoryException, NotExecutableException {
-        child1 = testRootNode.addNode(nodeName2, testNodeType);
-        child2 = testRootNode.addNode(nodeName2, testNodeType);
-        child3 = testRootNode.addNode(nodeName2, testNodeType);
-        child4 = testRootNode.addNode(nodeName2, testNodeType);
-        Node[] children = new Node[] { child1, child2, child3, child4};
-        for (int i = 0; i < children.length; i++) {
-            if (children[i].canAddMixin(mixReferenceable)) {
-                children[i].addMixin(mixReferenceable);
-            } else {
-                throw new NotExecutableException();
-            }
-        }
-        testRootNode.save();
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+import org.apache.jackrabbit.test.NotExecutableException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderSNSTest</code>...
+ */
+public class ReorderReferenceableSNSTest extends ReorderTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderReferenceableSNSTest.class);
+
+    @Override
+    protected void createOrderableChildren() throws RepositoryException, NotExecutableException {
+        child1 = testRootNode.addNode(nodeName2, testNodeType);
+        child2 = testRootNode.addNode(nodeName2, testNodeType);
+        child3 = testRootNode.addNode(nodeName2, testNodeType);
+        child4 = testRootNode.addNode(nodeName2, testNodeType);
+        Node[] children = new Node[] { child1, child2, child3, child4};
+        for (int i = 0; i < children.length; i++) {
+            if (children[i].canAddMixin(mixReferenceable)) {
+                children[i].addMixin(mixReferenceable);
+            } else {
+                throw new NotExecutableException();
+            }
+        }
+        testRootNode.save();
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderReferenceableSNSTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java?rev=1404144&r1=1404143&r2=1404144&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java (original)
+++ jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java Wed Oct 31 14:06:06 2012
@@ -1,73 +1,73 @@
-/*
- * 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.jcr2spi;
-
-import javax.jcr.Item;
-import javax.jcr.ItemExistsException;
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <code>ReorderSNSTest</code>...
- */
-public class ReorderSNSTest extends ReorderTest {
-
-    private static Logger log = LoggerFactory.getLogger(ReorderSNSTest.class);
-
-    @Override
-    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
-        child1 = testRootNode.addNode(nodeName2, testNodeType);
-        child2 = testRootNode.addNode(nodeName2, testNodeType);
-        child3 = testRootNode.addNode(nodeName2, testNodeType);
-        child4 = testRootNode.addNode(nodeName2, testNodeType);
-
-        testRootNode.save();
-    }
-
-    public void testIndexAfterReorder() throws RepositoryException {
-        testRootNode.orderBefore(getRelPath(child1), getRelPath(child3));
-        assertTrue(child1.getIndex() == 2);
-        assertTrue(child2.getIndex() == 1);
-        assertTrue(child3.getIndex() == 3);
-        assertTrue(child4.getIndex() == 4);
-
-        testRootNode.save();
-        assertTrue(child1.getIndex() == 2);
-        assertTrue(child2.getIndex() == 1);
-        assertTrue(child3.getIndex() == 3);
-        assertTrue(child4.getIndex() == 4);
-    }
-
-    public void testReorder3() throws RepositoryException {
-        String pathBefore = child3.getPath();
-
-        testRootNode.orderBefore(getRelPath(child3), getRelPath(child1));
-        testRootNode.save();
-
-        Item itemIndex3 = testRootNode.getSession().getItem(pathBefore);
-        assertTrue(itemIndex3.isSame(child2));
-
-        Item item3 = testRootNode.getSession().getItem(child3.getPath());
-        assertTrue(item3.isSame(child3));
-    }
-}
+/*
+ * 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.jcr2spi;
+
+import javax.jcr.Item;
+import javax.jcr.ItemExistsException;
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.version.VersionException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <code>ReorderSNSTest</code>...
+ */
+public class ReorderSNSTest extends ReorderTest {
+
+    private static Logger log = LoggerFactory.getLogger(ReorderSNSTest.class);
+
+    @Override
+    protected void createOrderableChildren() throws RepositoryException, LockException, ConstraintViolationException, NoSuchNodeTypeException, ItemExistsException, VersionException {
+        child1 = testRootNode.addNode(nodeName2, testNodeType);
+        child2 = testRootNode.addNode(nodeName2, testNodeType);
+        child3 = testRootNode.addNode(nodeName2, testNodeType);
+        child4 = testRootNode.addNode(nodeName2, testNodeType);
+
+        testRootNode.save();
+    }
+
+    public void testIndexAfterReorder() throws RepositoryException {
+        testRootNode.orderBefore(getRelPath(child1), getRelPath(child3));
+        assertTrue(child1.getIndex() == 2);
+        assertTrue(child2.getIndex() == 1);
+        assertTrue(child3.getIndex() == 3);
+        assertTrue(child4.getIndex() == 4);
+
+        testRootNode.save();
+        assertTrue(child1.getIndex() == 2);
+        assertTrue(child2.getIndex() == 1);
+        assertTrue(child3.getIndex() == 3);
+        assertTrue(child4.getIndex() == 4);
+    }
+
+    public void testReorder3() throws RepositoryException {
+        String pathBefore = child3.getPath();
+
+        testRootNode.orderBefore(getRelPath(child3), getRelPath(child1));
+        testRootNode.save();
+
+        Item itemIndex3 = testRootNode.getSession().getItem(pathBefore);
+        assertTrue(itemIndex3.isSame(child2));
+
+        Item item3 = testRootNode.getSession().getItem(child3.getPath());
+        assertTrue(item3.isSame(child3));
+    }
+}

Propchange: jackrabbit/branches/2.2/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderSNSTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message