jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r771308 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/ jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ jackrabbit-core/sr...
Date Mon, 04 May 2009 14:02:56 GMT
Author: reschke
Date: Mon May  4 14:02:55 2009
New Revision: 771308

URL: http://svn.apache.org/viewvc?rev=771308&view=rev
Log:
JCR-2085: move retention tests

Added:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/AbstractRetentionTest.java
      - copied, changed from r771299, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/AbstractRetentionTest.java
      - copied, changed from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldEffectTest.java
      - copied, changed from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldEffectTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldTest.java
      - copied, changed from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyEffectTest.java
      - copied, changed from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyEffectTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyTest.java
      - copied, changed from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/TestAll.java
      - copied, changed from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java
Removed:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldEffectTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyEffectTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyTest.java
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RetentionRegistryImplTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/HoldTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/RetentionPolicyTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/RepositoryStub.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java?rev=771308&r1=771307&r2=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/JackrabbitRepositoryStub.java
Mon May  4 14:02:55 2009
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.lang.annotation.RetentionPolicy;
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.HashSet;
@@ -41,6 +42,8 @@
 import org.apache.jackrabbit.api.JackrabbitNodeTypeManager;
 import org.apache.jackrabbit.api.JackrabbitWorkspace;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
+import org.apache.jackrabbit.core.retention.RetentionPolicyImpl;
+import org.apache.jackrabbit.core.retention.RetentionRegistryImpl;
 import org.apache.jackrabbit.test.RepositoryStub;
 import org.apache.jackrabbit.test.RepositoryStubException;
 
@@ -198,6 +201,11 @@
         addQueryTestData(getOrAddNode(data, "query"));
         addNodeTestData(getOrAddNode(data, "node"));
         addExportTestData(getOrAddNode(data, "docViewTest"));
+        
+        // add a policy
+        // TODO check we're doing the right thing here
+        RetentionPolicyImpl.createRetentionPolicy("retentionPolicyName", session);
+        
         session.save();
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java?rev=771308&r1=771307&r2=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java
Mon May  4 14:02:55 2009
@@ -32,11 +32,6 @@
     public static Test suite() {
         TestSuite suite = new TestSuite("javax.jcr.retention tests");
 
-        suite.addTestSuite(HoldTest.class);
-        suite.addTestSuite(HoldEffectTest.class);
-        suite.addTestSuite(RetentionPolicyTest.class);
-        suite.addTestSuite(RetentionPolicyEffectTest.class);
-
         return suite;
     }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RetentionRegistryImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RetentionRegistryImplTest.java?rev=771308&r1=771307&r2=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RetentionRegistryImplTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RetentionRegistryImplTest.java
Mon May  4 14:02:55 2009
@@ -27,11 +27,11 @@
 import javax.jcr.retention.Hold;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.jackrabbit.api.jsr283.retention.AbstractRetentionTest;
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.fs.FileSystemException;
 import org.apache.jackrabbit.core.fs.FileSystemResource;
 import org.apache.jackrabbit.core.fs.mem.MemoryFileSystem;
+import org.apache.jackrabbit.core.retention.AbstractRetentionTest;
 import org.apache.jackrabbit.core.retention.RetentionRegistry;
 import org.apache.jackrabbit.core.retention.RetentionRegistryImpl;
 import org.apache.jackrabbit.spi.commons.conversion.PathResolver;

Copied: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/AbstractRetentionTest.java
(from r771299, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/AbstractRetentionTest.java?p2=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/AbstractRetentionTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java&r1=771299&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/AbstractRetentionTest.java
Mon May  4 14:02:55 2009
@@ -12,46 +12,20 @@
  * 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.api.jsr283.retention;
+ * limitations under the Licenseorg.apache.jackrabbit.core.retentionjsr283.retention;
+*/
+package org.apache.jackrabbit.core.retention;
 
 import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.retention.RetentionManager;
 import javax.jcr.retention.RetentionPolicy;
 
 import org.apache.jackrabbit.core.retention.RetentionPolicyImpl;
-import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.NotExecutableException;
-import org.apache.jackrabbit.test.RepositoryStub;
 
 /**
  * <code>AbstractAccessControlTest</code>...
  */
-public abstract class AbstractRetentionTest extends AbstractJCRTest {
-
-    protected RetentionManager retentionMgr;
-    protected String testNodePath;
-
-    protected void setUp() throws Exception {
-        // TODO: uncomment again.
-        // checkSupportedOption(Repository.OPTION_RETENTION_SUPPORTED);
-
-        super.setUp();
-
-        retentionMgr = getRetentionManager(superuser);
-        testNodePath = testRootNode.getPath();
-    }
-
-    protected String getHoldName() throws RepositoryException, NotExecutableException {
-        String holdName = getProperty(RepositoryStub.PROP_HOLD_NAME);
-        if (holdName == null) {
-            throw new NotExecutableException();
-        }
-        return holdName;
-    }
+public abstract class AbstractRetentionTest extends org.apache.jackrabbit.test.api.retention.AbstractRetentionTest
{
 
     protected RetentionPolicy getApplicableRetentionPolicy() throws NotExecutableException,
RepositoryException {
         return getApplicableRetentionPolicy("retentionPolicyName");
@@ -61,21 +35,4 @@
         // TODO: move to repositoryStub/helper and adjust accordingly
         return RetentionPolicyImpl.createRetentionPolicy(jcrName, superuser);
     }
-
-    protected static RetentionManager getRetentionManager(Session s) throws RepositoryException,
NotExecutableException {
-        try {
-            return getJsr283Session(s).getRetentionManager();
-        } catch (UnsupportedRepositoryOperationException e) {
-            throw new NotExecutableException();
-        }
-    }
-
-    protected static javax.jcr.Session getJsr283Session(Session s) throws NotExecutableException
{
-        // TODO: get rid of method once jsr 283 is released
-        if (s instanceof javax.jcr.Session) {
-            return (javax.jcr.Session) s;
-        } else {
-            throw new NotExecutableException();
-        }
-    }
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/HoldTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/HoldTest.java?rev=771308&r1=771307&r2=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/HoldTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/HoldTest.java
Mon May  4 14:02:55 2009
@@ -19,7 +19,6 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.retention.Hold;
 
-import org.apache.jackrabbit.api.jsr283.retention.AbstractRetentionTest;
 import org.apache.jackrabbit.test.NotExecutableException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/RetentionPolicyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/RetentionPolicyTest.java?rev=771308&r1=771307&r2=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/RetentionPolicyTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/retention/RetentionPolicyTest.java
Mon May  4 14:02:55 2009
@@ -20,7 +20,6 @@
 
 import javax.jcr.RepositoryException;
 
-import org.apache.jackrabbit.api.jsr283.retention.AbstractRetentionTest;
 
 /**
  * <code>RetentionPolicyTest</code>...

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/RepositoryStub.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/RepositoryStub.java?rev=771308&r1=771307&r2=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/RepositoryStub.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/RepositoryStub.java
Mon May  4 14:02:55 2009
@@ -113,6 +113,8 @@
      * @since JCR 2.0
      */
     public static final String PROP_HOLD_NAME = "holdname";
+    
+    public static final String RETENTION_POLICY_NAME = "retentionPolicyName";
 
     /**
      * @since JCR 2.0

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/AbstractRetentionTest.java
(from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/AbstractRetentionTest.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/AbstractRetentionTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java&r1=771295&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/AbstractRetentionTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/AbstractRetentionTest.java
Mon May  4 14:02:55 2009
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.retention;
+package org.apache.jackrabbit.test.api.retention;
 
+import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.retention.RetentionManager;
 import javax.jcr.retention.RetentionPolicy;
 
-import org.apache.jackrabbit.core.retention.RetentionPolicyImpl;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.NotExecutableException;
 import org.apache.jackrabbit.test.RepositoryStub;
@@ -36,8 +36,7 @@
     protected String testNodePath;
 
     protected void setUp() throws Exception {
-        // TODO: uncomment again.
-        // checkSupportedOption(Repository.OPTION_RETENTION_SUPPORTED);
+        checkSupportedOption(Repository.OPTION_RETENTION_SUPPORTED);
 
         super.setUp();
 
@@ -54,28 +53,18 @@
     }
 
     protected RetentionPolicy getApplicableRetentionPolicy() throws NotExecutableException,
RepositoryException {
-        return getApplicableRetentionPolicy("retentionPolicyName");
+        return getApplicableRetentionPolicy(RepositoryStub.RETENTION_POLICY_NAME);
     }
 
     protected RetentionPolicy getApplicableRetentionPolicy(String jcrName) throws NotExecutableException,
RepositoryException {
-        // TODO: move to repositoryStub/helper and adjust accordingly
-        return RetentionPolicyImpl.createRetentionPolicy(jcrName, superuser);
+        return retentionMgr.getRetentionPolicy(jcrName);
     }
 
     protected static RetentionManager getRetentionManager(Session s) throws RepositoryException,
NotExecutableException {
         try {
-            return getJsr283Session(s).getRetentionManager();
+            return s.getRetentionManager();
         } catch (UnsupportedRepositoryOperationException e) {
             throw new NotExecutableException();
         }
     }
-
-    protected static javax.jcr.Session getJsr283Session(Session s) throws NotExecutableException
{
-        // TODO: get rid of method once jsr 283 is released
-        if (s instanceof javax.jcr.Session) {
-            return (javax.jcr.Session) s;
-        } else {
-            throw new NotExecutableException();
-        }
-    }
 }
\ No newline at end of file

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldEffectTest.java
(from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldEffectTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldEffectTest.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldEffectTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldEffectTest.java&r1=771295&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldEffectTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldEffectTest.java
Mon May  4 14:02:55 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.retention;
+package org.apache.jackrabbit.test.api.retention;
 
 import javax.jcr.Node;
 import javax.jcr.Property;

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldTest.java
(from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldTest.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldTest.java&r1=771295&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/HoldTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/HoldTest.java
Mon May  4 14:02:55 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.retention;
+package org.apache.jackrabbit.test.api.retention;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -161,7 +161,7 @@
     public void testNonExistingNodePath() throws RepositoryException, NotExecutableException
{
         String invalidPath = testNodePath + "/nonexisting";
         int cnt = 0;
-        while (getJsr283Session(superuser).nodeExists(invalidPath)) {
+        while (superuser.nodeExists(invalidPath)) {
             invalidPath += cnt++;
         }
 
@@ -190,7 +190,7 @@
         String propPath = null;
         for (PropertyIterator it = testRootNode.getProperties(); it.hasNext();) {
             String path = it.nextProperty().getPath();
-            if (!getJsr283Session(superuser).nodeExists(path)) {
+            if (! superuser.nodeExists(path)) {
                 propPath = path;
                 break;
             }

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyEffectTest.java
(from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyEffectTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyEffectTest.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyEffectTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyEffectTest.java&r1=771295&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyEffectTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyEffectTest.java
Mon May  4 14:02:55 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.retention;
+package org.apache.jackrabbit.test.api.retention;
 
 import javax.jcr.Node;
 import javax.jcr.Property;

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyTest.java
(from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyTest.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyTest.java&r1=771295&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/RetentionPolicyTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/RetentionPolicyTest.java
Mon May  4 14:02:55 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.retention;
+package org.apache.jackrabbit.test.api.retention;
 
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Node;
@@ -161,7 +161,7 @@
     public void testNonExistingNodePath() throws RepositoryException, NotExecutableException
{
         String invalidPath = testNodePath + "/nonexisting";
         int cnt = 0;
-        while (getJsr283Session(superuser).nodeExists(invalidPath)) {
+        while (superuser.nodeExists(invalidPath)) {
             invalidPath += cnt++;
         }
 
@@ -189,7 +189,7 @@
         String propPath = null;
         for (PropertyIterator it = testRootNode.getProperties(); it.hasNext();) {
             String path = it.nextProperty().getPath();
-            if (!getJsr283Session(superuser).nodeExists(path)) {
+            if (!superuser.nodeExists(path)) {
                 propPath = path;
                 break;
             }
@@ -234,7 +234,7 @@
     }
 
     public void testReadOnlySession() throws NotExecutableException, RepositoryException
{
-        javax.jcr.Session s = helper.getReadOnlySession();
+        Session s = helper.getReadOnlySession();
         try {
             RetentionManager rmgr = getRetentionManager(s);
             try {
@@ -258,7 +258,7 @@
         String childPath = getLockedChildNode().getPath();
 
         // get another session.
-        javax.jcr.Session otherS = helper.getSuperuserSession();
+        Session otherS = helper.getSuperuserSession();
         try {
             RetentionManager rmgr = getRetentionManager(otherS);
             rmgr.setRetentionPolicy(childPath, getApplicableRetentionPolicy());
@@ -282,7 +282,7 @@
         retentionMgr.setRetentionPolicy(childPath, getApplicableRetentionPolicy());
         testRootNode.save();
 
-        javax.jcr.Session otherS = helper.getSuperuserSession();
+        Session otherS = helper.getSuperuserSession();
         try {
             RetentionManager rmgr = getRetentionManager(otherS);
             rmgr.removeRetentionPolicy(childPath);
@@ -324,7 +324,7 @@
         String childPath = child.getPath();
 
         // get another session.
-        javax.jcr.Session otherS = helper.getSuperuserSession();
+        Session otherS = helper.getSuperuserSession();
         try {
             RetentionManager rmgr = getRetentionManager(otherS);
             rmgr.setRetentionPolicy(childPath, getApplicableRetentionPolicy());
@@ -353,7 +353,7 @@
         superuser.save();
         child.checkin();
 
-        javax.jcr.Session otherS = helper.getSuperuserSession();
+        Session otherS = helper.getSuperuserSession();
         try {
             RetentionManager rmgr = getRetentionManager(otherS);
             rmgr.removeRetentionPolicy(child.getPath());

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/TestAll.java
(from r771295, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/TestAll.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/TestAll.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java&r1=771295&r2=771308&rev=771308&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/retention/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/retention/TestAll.java
Mon May  4 14:02:55 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283.retention;
+package org.apache.jackrabbit.test.api.retention;
 
 import junit.framework.Test;
 import junit.framework.TestCase;



Mime
View raw message