You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2009/03/13 14:02:28 UTC
svn commit: r753225 -
/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
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