jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r753225 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Date Fri, 13 Mar 2009 13:02:28 GMT
Author: angela
Date: Fri Mar 13 13:02:27 2009
New Revision: 753225

URL: http://svn.apache.org/viewvc?rev=753225&view=rev
Log:
add checkSupportedOption utility method

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java?rev=753225&r1=753224&r2=753225&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Fri Mar 13 13:02:27 2009
@@ -575,6 +575,20 @@
     }
 
     /**
+     * Throws a <code>NotExecutableException</code> if the repository does
+     * not support the feature identified by the given <code>discriptorKey</code>.
+     *
+     * @param descriptorKey the descriptor key.
+     * @throws RepositoryException if an error occurs.
+     * @throws NotExecutableException If the feature is not supported.
+     */
+    protected void checkSupportedOption(String descriptorKey) throws RepositoryException,
NotExecutableException {
+        if (Boolean.FALSE.toString().equals(helper.getRepository().getDescriptor(descriptorKey)))
{
+            throw new NotExecutableException();
+        }
+    }
+
+    /**
      * Checks that the repository supports multiple workspace, otherwise aborts with
      * {@link NotExecutableException}.
      * @throws NotExecutableException when the repository only supports a single



Mime
View raw message